Add client-side status message on block activation

This change ensures players receive immediate client-side feedback when a block is activated. The addition improves user experience by providing clearer interaction confirmation.

Signed-off-by: dragonruler1000 <github@me.minecraftchest2.us>
This commit is contained in:
dragonruler1000 2025-05-15 09:08:38 -05:00
parent 670cd542c9
commit 5b390d20c6

View file

@ -104,6 +104,7 @@ public class Window extends HorizontalBlock {
String message = "blockActivated";
ITextComponent msg = new StringTextComponent(message);
player.sendMessage(msg, player.getUniqueID());
player.sendStatusMessage(new StringTextComponent("Client: Block activated!"), true);
if (!worldIn.isRemote()) return super.onBlockActivated(state, worldIn, pos, player, handIn, hit);
if (player.isCrouching()) return super.onBlockActivated(state, worldIn, pos, player, handIn, hit);