diff --git a/CHANGELOG.md b/CHANGELOG.md index 00ed57b00..515835b67 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### 1.9 - Port to Minecraft 1.16 (raoulvdberge) - Introduced new save system that should make saving network data more robust. RS previously used standard Minecraft-provided mechanisms for this, but those were unreliable (Darkere) +- Fixed wrench requiring shift click to rotate blocks (raoulvdberge) ### 1.8.8 - Fixed duplication bug and weird behavior in the Crafting Grid matrix (Darkere) diff --git a/src/main/java/com/refinedmods/refinedstorage/item/WrenchItem.java b/src/main/java/com/refinedmods/refinedstorage/item/WrenchItem.java index 230c46e53..265abaec7 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/WrenchItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/WrenchItem.java @@ -7,6 +7,7 @@ import com.refinedmods.refinedstorage.util.NetworkUtils; import com.refinedmods.refinedstorage.util.WorldUtils; import net.minecraft.block.BlockState; import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; import net.minecraft.item.ItemUseContext; import net.minecraft.util.ActionResultType; import net.minecraft.util.Rotation; @@ -19,13 +20,9 @@ public class WrenchItem extends Item { } @Override - public ActionResultType onItemUse(ItemUseContext ctx) { - if (!ctx.getPlayer().isCrouching()) { - return ActionResultType.FAIL; - } - + public ActionResultType onItemUseFirst(ItemStack stack, ItemUseContext ctx) { if (ctx.getWorld().isRemote) { - return ActionResultType.SUCCESS; + return ActionResultType.CONSUME; } INetwork network = NetworkUtils.getNetworkFromNode(NetworkUtils.getNodeFromTile(ctx.getWorld().getTileEntity(ctx.getPos()))); @@ -39,6 +36,6 @@ public class WrenchItem extends Item { ctx.getWorld().setBlockState(ctx.getPos(), state.rotate(Rotation.CLOCKWISE_90)); - return ActionResultType.SUCCESS; + return ActionResultType.CONSUME; } } \ No newline at end of file