diff options
author | draknyte1 <draknyte1@hotmail.com> | 2016-11-02 15:49:00 +1000 |
---|---|---|
committer | draknyte1 <draknyte1@hotmail.com> | 2016-11-02 15:49:00 +1000 |
commit | d594987b2cfdefa447ee585a68d4a4bef4ece3a5 (patch) | |
tree | 814813fc14ce5dcd8dfa7aeaecd939ac42d12877 /src/Java/gtPlusPlus/core/slots/SlotBlueprint.java | |
parent | 26292158575a0f0acb51ae50715887f871d2b5a0 (diff) | |
parent | 49a520da5da01594b5c42652d9db5c7c04e49ad8 (diff) | |
download | GT5-Unofficial-d594987b2cfdefa447ee585a68d4a4bef4ece3a5.tar.gz GT5-Unofficial-d594987b2cfdefa447ee585a68d4a4bef4ece3a5.tar.bz2 GT5-Unofficial-d594987b2cfdefa447ee585a68d4a4bef4ece3a5.zip |
Merge branch 'master' of https://github.com/draknyte1/GTplusplus
Diffstat (limited to 'src/Java/gtPlusPlus/core/slots/SlotBlueprint.java')
-rw-r--r-- | src/Java/gtPlusPlus/core/slots/SlotBlueprint.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/core/slots/SlotBlueprint.java b/src/Java/gtPlusPlus/core/slots/SlotBlueprint.java new file mode 100644 index 0000000000..3c5c30966e --- /dev/null +++ b/src/Java/gtPlusPlus/core/slots/SlotBlueprint.java @@ -0,0 +1,30 @@ +package gtPlusPlus.core.slots; + +import gtPlusPlus.core.interfaces.IItemBlueprint; +import gtPlusPlus.core.util.Utils; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class SlotBlueprint extends Slot{ + + public SlotBlueprint(IInventory inventory, int x, int y, int z) { + super(inventory, x, y, z); + } + + @Override + public boolean isItemValid(ItemStack itemstack) { + if (itemstack.getItem() instanceof IItemBlueprint){ + Utils.LOG_WARNING(itemstack.getDisplayName()+" is a valid Blueprint."); + return true; + } + Utils.LOG_WARNING(itemstack.getDisplayName()+" is not a valid Blueprint."); + return false; + } + + @Override + public int getSlotStackLimit() { + return 1; + } + +} |