From 9cad3a926e397474a6721b6a570431ba757eb404 Mon Sep 17 00:00:00 2001 From: dragonruler1000 Date: Mon, 19 May 2025 22:22:13 -0500 Subject: [PATCH] Fix incorrect remote check in Window block activation Previously, the remote check in the `onBlockActivated` method was reversed, causing improper behavior. This update corrects the logic to handle block activation appropriately on the client side. Additionally, an unused import line was cleaned up for clarity. Signed-off-by: dragonruler1000 --- .../java/us/minecraftchest2/hdm_mod/block/custom/Window.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/us/minecraftchest2/hdm_mod/block/custom/Window.java b/src/main/java/us/minecraftchest2/hdm_mod/block/custom/Window.java index 1b83e9a..374e5ca 100644 --- a/src/main/java/us/minecraftchest2/hdm_mod/block/custom/Window.java +++ b/src/main/java/us/minecraftchest2/hdm_mod/block/custom/Window.java @@ -22,6 +22,7 @@ import net.minecraft.util.text.StringTextComponent; import net.minecraft.world.IBlockReader; import net.minecraft.world.World; import net.minecraft.world.server.ServerWorld; +//import us.minecraftchest2.hdm_mod.world.dimension.ModDimensions; import us.minecraftchest2.hdm_mod.world.dimension.ModDimensions; import us.minecraftchest2.hdm_mod.world.dimension.SimpleTeleporter; @@ -101,7 +102,7 @@ public class Window extends HorizontalBlock { @SuppressWarnings("deprecation") @Override public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { - if (!worldIn.isRemote()) return super.onBlockActivated(state, worldIn, pos, player, handIn, hit); + if (worldIn.isRemote()) return super.onBlockActivated(state, worldIn, pos, player, handIn, hit); if (player.isCrouching()) return super.onBlockActivated(state, worldIn, pos, player, handIn, hit);