From 3e7d69f4607ff54738bd1e2fab595d2af06cc6ba Mon Sep 17 00:00:00 2001 From: ghostflyby Date: Sat, 25 Nov 2023 16:02:12 +0800 Subject: [PATCH] Open conduit connection GUI with more wrenches (#139) --- dependencies.gradle | 2 +- .../java/crazypants/enderio/conduit/BlockConduitBundle.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dependencies.gradle b/dependencies.gradle index 5e0bf60b82..e784f012fe 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -15,7 +15,7 @@ dependencies { compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.44.83:dev') {transitive = false} compileOnly('com.github.GTNewHorizons:Railcraft:9.15.1:api') {transitive = false} compileOnly('com.github.GTNewHorizons:StorageDrawers:1.12.1-GTNH:api') {transitive = false} - implementation('com.github.GTNewHorizons:Chisel:2.12.2-GTNH:dev') {transitive = false} + compileOnly('com.github.GTNewHorizons:Chisel:2.12.2-GTNH:dev') {transitive = false} compileOnly('com.github.GTNewHorizons:OpenComputers:1.9.19-GTNH:api') {transitive = false} compileOnly('curse.maven:minefactory-reloaded-66672:2366150') // https://www.curseforge.com/minecraft/mc-mods/minefactory-reloaded/files/2366150 compileOnly('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev') diff --git a/src/main/java/crazypants/enderio/conduit/BlockConduitBundle.java b/src/main/java/crazypants/enderio/conduit/BlockConduitBundle.java index d9b971e8d7..5441880c77 100644 --- a/src/main/java/crazypants/enderio/conduit/BlockConduitBundle.java +++ b/src/main/java/crazypants/enderio/conduit/BlockConduitBundle.java @@ -641,8 +641,8 @@ public void breakBlock(World world, int x, int y, int z, Block par5, int par6) { @Override public void onBlockClicked(World world, int x, int y, int z, EntityPlayer player) { - ItemStack equipped = player.getCurrentEquippedItem(); - if (!player.isSneaking() || equipped == null || equipped.getItem() != EnderIO.itemYetaWench) { + ITool tool = ToolUtil.getEquippedTool(player); + if (!player.isSneaking() || tool == null || !tool.canUse(player.getCurrentEquippedItem(), player, x, y, z)) { return; } ConduitUtil.openConduitGui(world, x, y, z, player);