Files
Chisel/src/main/java/com/cricketcraft/chisel/inventory/SlotChiselInput.java
T
tterrag1098 82792ed22e The great format and clean up. IMPORTANT: Read below.
All devs and contributors should use the provided formatter settings. 
If your IDE does not support the format, the rules are simple, it is the
default java formatting rules, with 200char line lengths and 1 extra
line after class definitions.
2015-01-07 19:50:18 -05:00

41 lines
902 B
Java

package com.cricketcraft.chisel.inventory;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
public class SlotChiselInput extends Slot {
public SlotChiselInput(ContainerChisel container, InventoryChiselSelection inv, int i, int j, int k) {
super(inv, i, j, k);
selInventory = inv;
this.container = container;
}
@Override
public boolean isItemValid(ItemStack itemstack) {
if (container.finished)
return false;
return super.isItemValid(itemstack);
}
@Override
public boolean canTakeStack(EntityPlayer par1EntityPlayer) {
return !container.finished && super.canTakeStack(par1EntityPlayer);
}
@Override
public void onSlotChanged() {
if (container.finished)
return;
super.onSlotChanged();
selInventory.updateItems();
}
ContainerChisel container;
InventoryChiselSelection selInventory;
}