123456789101112131415161718192021222324252627282930313233 |
- package me.km.snuviscript;
- import me.km.KajetansMod;
- import me.km.inventory.CustomContainer;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.entity.player.EntityPlayerMP;
- import net.minecraft.inventory.ClickType;
- public class ScriptInventoryHolder extends CustomContainer
- {
- private final MinecraftScript qd;
- private final ScriptEvents e;
- public ScriptInventoryHolder(SnuviInventory inv, EntityPlayerMP p, MinecraftScript qd)
- {
- super(inv, p);
- this.qd = qd;
- this.e = KajetansMod.scripts.getEvent(ScriptEvents.class);
- }
- @Override
- public void onButtonClick(int slot, int dragType, ClickType click, EntityPlayerMP p)
- {
- e.onInventoryClick(qd, (SnuviInventory) inv, slot, click, p);
- }
- @Override
- public void onContainerClosed(EntityPlayer p)
- {
- e.onInventoryClose(qd, (SnuviInventory) inv, p);
- super.onContainerClosed(p);
- }
- }
|