Various fixes

Fixed images rendering incorrectly in the books and made the drawbridge
accept only real blocks(and only opaque blocks for camo)
This commit is contained in:
Arthur Uzulin committed 2013-07-27 20:21:29 +10:00
1 parent 81afd9c00e
commit 770c72be39
6 files changed
+22 -12

No files matched your search

+10 -3
View File
@@ -1,12 +1,13 @@
package tconstruct.inventory;
import tconstruct.blocks.logic.DrawbridgeLogic;
import tconstruct.landmine.inventory.SlotBlocksOnly;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
public class DrawbridgeSlot extends Slot
public class DrawbridgeSlot extends SlotBlocksOnly
{
DrawbridgeLogic logic;
public DrawbridgeSlot(IInventory iinventory, int par2, int par3, int par4, DrawbridgeLogic logic)
@@ -15,14 +16,20 @@ public class DrawbridgeSlot extends Slot
this.logic = logic;
}
@Override
public boolean isItemValid(ItemStack par1ItemStack)
{
return !logic.hasExtended();
return !logic.hasExtended() && super.isItemValid(par1ItemStack);
}
@Override
public boolean canTakeStack(EntityPlayer par1EntityPlayer)
{
return !logic.hasExtended();
}
@Override
public int getSlotStackLimit(){
return inventory.getInventoryStackLimit();
}
}