From d962b7d8b7fb91dd71d0d8e9b38b01e553c43205 Mon Sep 17 00:00:00 2001 From: dragonruler1000 Date: Fri, 16 May 2025 08:47:54 -0500 Subject: [PATCH] trying `use` to see if it works instead of `onBlockActivated` --- .../us/minecraftchest2/hdm_mod/block/custom/Window.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 060818a..e043c36 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 @@ -5,7 +5,6 @@ package us.minecraftchest2.hdm_mod.block.custom; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.HorizontalBlock; -import net.minecraft.client.Minecraft; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.BlockItemUseContext; import net.minecraft.server.MinecraftServer; @@ -41,7 +40,7 @@ public class Window extends HorizontalBlock { } // VoxelShapes define the physical shape of the block for each direction (NORTH, EAST, SOUTH, WEST) - // These shapes are made up of multiple cubic sections combined together + // These shapes are made up of multiple cubic sections combined private static final VoxelShape SHAPE_N = Stream.of( Block.makeCuboidShape(5, 11, 5, 6, 13, 11), // Window frame pieces Block.makeCuboidShape(4, 0, 4, 12, 1, 12), // Base @@ -102,6 +101,10 @@ public class Window extends HorizontalBlock { @Override public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { + String message = "blockActivated"; + ITextComponent msg = new StringTextComponent(message); + player.sendMessage(msg, player.getUniqueID()); + // Client-side: Only show a status message if (worldIn.isRemote()) { player.sendStatusMessage(new StringTextComponent("Client: Block activated!"), true);