diff options
author | miozune <miozune@gmail.com> | 2022-08-30 03:42:55 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-29 19:42:55 +0100 |
commit | ce1bd5b2138093a61e9b17989ffea7c126a00c12 (patch) | |
tree | a32a55f5037f6ed740b15c4d4c34e8896b3c7653 /src/main/java/gregtech/common | |
parent | 5bae549b906c9b4855d36acf7fef4e2aece9a0fc (diff) | |
download | GT5-Unofficial-ce1bd5b2138093a61e9b17989ffea7c126a00c12.tar.gz GT5-Unofficial-ce1bd5b2138093a61e9b17989ffea7c126a00c12.tar.bz2 GT5-Unofficial-ce1bd5b2138093a61e9b17989ffea7c126a00c12.zip |
Fix right-clicking against air cannot open configuration circuit GUI (#1320)
Diffstat (limited to 'src/main/java/gregtech/common')
-rw-r--r-- | src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java b/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java index 74dab0e74e..9f269342d7 100644 --- a/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java +++ b/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java @@ -244,19 +244,9 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo } @Override - public boolean onItemUse( - ItemStack stack, - EntityPlayer player, - World world, - int x, - int y, - int z, - int side, - float xOffset, - float yOffset, - float zOffset) { + public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { // nothing on server side or fake player - if (player instanceof FakePlayer || !world.isRemote) return false; + if (player instanceof FakePlayer || !world.isRemote) return stack; // check if any screwdriver ItemStack configuratorStack; if (player.capabilities.isCreativeMode) { @@ -276,12 +266,12 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo } player.addChatComponentMessage(new ChatComponentTranslation( "GT5U.item.programmed_circuit.no_screwdriver." + XSTR.XSTR_INSTANCE.nextInt(count))); - return false; + return stack; } configuratorStack = player.inventory.mainInventory[configurator.getKey()]; } openSelectorGui(configuratorStack, stack.getItemDamage()); - return true; + return stack; } private void openSelectorGui(ItemStack configurator, int meta) { |