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 <github@me.minecraftchest2.us>
This commit is contained in:
dragonruler1000 2025-05-19 22:22:13 -05:00 committed by dragonruler1000
parent a540f3bf60
commit 9cad3a926e

View file

@ -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);