@Override public void a(OTileEntityDispenser paramOTileEntityDispenser) { Dispenser dis = new Dispenser(paramOTileEntityDispenser); String name = paramOTileEntityDispenser.c(); if ((Boolean) manager.callHook(PluginLoader.Hook.OPEN_INVENTORY, getPlayer(), dis)) return; if (dis != null) name = dis.getName(); af(); a.b(new OPacket100OpenWindow(bI, 3, name, paramOTileEntityDispenser.a())); k = new OContainerDispenser(i, paramOTileEntityDispenser); k.f = bI; // CanaryMod: Make sure this gets cast correctly, or mutant puppies will // spawn and eat your items. k.a((OICrafting) this); }
@Override public void a(OTileEntityDispenser var1) { // CanaryMod - onOpenInventory - Dispenser CanaryDispenser dispenser = var1.getDispenser(); CancelableHook hook = (CancelableHook) Canary.hooks() .callCancelableHook( new InventoryHook(canaryPlayer, dispenser.getInventory(), false)); if (!hook.isCanceled()) { this.bc(); this.a.b( (new OPacket100OpenWindow(this.cl, 3, var1.getInventoryName(), var1.getInventorySize()))); this.m = new OContainerDispenser(this.k, var1); this.m.f = this.cl; this.m.a((OICrafting) this); this.m.setInventory(dispenser.getInventory()); } }