mirror of
https://github.com/GTNewHorizons/WirelessCraftingTerminal.git
synced 2026-11-17 19:05:05 +00:00
Add a Method to the API that checks if the crafting terminal is enabled on the item
This commit is contained in:
1 parent
aa28f078e4
commit
a2bcbf0e2d
3 files changed
+8
-1
No files matched your search
@@ -10,4 +10,7 @@ public interface IWirelessCraftingTerminalItem extends IWirelessCraftingTermHand
|
||||
// checks if an Infinity Booster Caqrd is installed on the WCT
|
||||
public boolean checkForBooster(final ItemStack wirelessTerminal);
|
||||
|
||||
// checks if the Wireless Crafting Terminal is enabled on your item (need for ExtraCells Universal Terminal)
|
||||
public boolean isWirelessCraftingEnabled(final ItemStack wirelessTerminal);
|
||||
|
||||
}
|
||||
@@ -51,7 +51,7 @@ public class KeybindHandler {
|
||||
return;
|
||||
}
|
||||
IWirelessCraftingTerminalItem wirelessTerm = (IWirelessCraftingTerminalItem) is.getItem();
|
||||
if (wirelessTerm != null) {
|
||||
if (wirelessTerm != null && wirelessTerm.isWirelessCraftingEnabled(is)) {
|
||||
if (!FMLClientHandler.instance().isGUIOpen(GuiWirelessCraftingTerminal.class)) {
|
||||
NetworkHandler.instance.sendToServer(new PacketOpenGui(Reference.GUI_WCT));
|
||||
}
|
||||
|
||||
@@ -91,6 +91,10 @@ public class ItemWirelessCraftingTerminal extends AERootPoweredItem implements I
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isWirelessCraftingEnabled(final ItemStack wirelessTerminal) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(final ItemStack is, final World w, final Entity e, int i, boolean f) {
|
||||
|
||||
Reference in new issue
Block a user