not sure how to do that, there's a lot of redundant parameter in there, but this
@Mod("examplemod")
public class ExampleMod {
private static final Logger LOGGER = LogManager.getLogger();
public ExampleMod() {
MinecraftForge.EVENT_BUS.register(this);
}
@SubscribeEvent
public void onLeftClickBlock(final LeftClickBlock event) {
BlockPos position = event.getPos();
Level world = event.getWorld();
LOGGER.error("Time: {}, Thread: {}, hand: {}, side: {}, destroy progress: {}",
new Date().getTime(),
Thread.currentThread(),
event.getHand(),
event.getSide(),
world.getBlockState(event.getPos()).getDestroyProgress(event.getPlayer(),
new PathNavigationRegion(world, position, position), position));
}
}
gives this
[20:03:08] [Server thread/ERROR]: Time: 1632441788687, Thread: Thread[Server thread,5,SERVER], hand: MAIN_HAND, side: SERVER, destroy progress: 0.055555556
[20:03:08] [Server thread/ERROR]: Time: 1632441788787, Thread: Thread[Server thread,5,SERVER], hand: MAIN_HAND, side: SERVER, destroy progress: 0.055555556