From b1aa7032fe9e6bfedccf1bb08952c68100002489 Mon Sep 17 00:00:00 2001 From: Draknyte1 Date: Mon, 10 Oct 2016 23:17:59 +1000 Subject: + Added Blueprints - These are capable of storing a crafting recipe in it, to be used with the workbench. % More Internal work on the Workbench and it's handling of shit. + Added an interface for blueprints and other shit to utilize. --- src/Java/gtPlusPlus/core/slots/SlotBlueprint.java | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/Java/gtPlusPlus/core/slots/SlotBlueprint.java (limited to 'src/Java/gtPlusPlus/core/slots/SlotBlueprint.java') 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; + } + +} -- cgit