AttackBlock
com.jsmacrosce.jsmacros.client.api.event.impl.player.EventAttackBlock
Fires when the client's startDestroyBlock call returns true for a block target. This does not guarantee a new break request was sent or that the block was destroyed.
js
JsMacros.on("AttackBlock", JavaWrapper.methodToJava(function (event) {
Chat.log(`Breaking ${event.block.getId()} at ${event.block.getX()}, ${event.block.getY()}, ${event.block.getZ()}`);
}))Constructors
new EventAttackBlock
new EventAttackBlock(BlockDataHelper block, int side)#Initializes the event with the client's core and stores the supplied block helper and side value unchanged. This does not break, destroy, or update the world, or dispatch the event.
Parameters:
block: the supplied helper for the target blockside: the provided hit-face code
Fields
block
The block at the target position, using the client's current block state and block entity.
side
The hit face as the direction's 3D data value:
0 down, 1 up, 2 north, 3 south, 4 west and 5 east.