|
@@ -49,6 +49,14 @@ public class DebugEvents {
|
|
|
}
|
|
|
|
|
|
public static void debugEvents() {
|
|
|
+ BlockEvent.BREAK.register((world, pos, state, player, xp) -> {
|
|
|
+ SINK.accept(player.getScoreboardName() + " breaks " + toShortString(pos) + logSide(player.level));
|
|
|
+ return InteractionResult.PASS;
|
|
|
+ });
|
|
|
+ BlockEvent.PLACE.register((world, pos, state, placer) -> {
|
|
|
+ SINK.accept(Optional.ofNullable(placer).map(Entity::getScoreboardName).orElse("null") + " places block at " + toShortString(pos) + logSide(world));
|
|
|
+ return InteractionResult.PASS;
|
|
|
+ });
|
|
|
ChatEvent.SERVER.register((player, message, component) -> {
|
|
|
SINK.accept("Server chat received: " + message);
|
|
|
return InteractionResultHolder.pass(component);
|
|
@@ -78,10 +86,6 @@ public class DebugEvents {
|
|
|
}
|
|
|
return InteractionResult.PASS;
|
|
|
});
|
|
|
- EntityEvent.PLACE_BLOCK.register((world, pos, state, placer) -> {
|
|
|
- SINK.accept(Optional.ofNullable(placer).map(Entity::getScoreboardName).orElse("null") + " places block at " + toShortString(pos) + logSide(world));
|
|
|
- return InteractionResult.PASS;
|
|
|
- });
|
|
|
ExplosionEvent.DETONATE.register((world, explosion, affectedEntities) -> {
|
|
|
SINK.accept(world.dimension().location() + " explodes at " + toShortString(ExplosionHooks.getPosition(explosion)) + logSide(world));
|
|
|
});
|
|
@@ -155,10 +159,6 @@ public class DebugEvents {
|
|
|
SINK.accept(player.getScoreboardName() + " drops " + new TranslatableComponent(entity.getItem().getDescriptionId()).getString() + logSide(player.level));
|
|
|
return InteractionResult.PASS;
|
|
|
});
|
|
|
- PlayerEvent.BREAK_BLOCK.register((world, pos, state, player, xp) -> {
|
|
|
- SINK.accept(player.getScoreboardName() + " breaks " + toShortString(pos) + logSide(player.level));
|
|
|
- return InteractionResult.PASS;
|
|
|
- });
|
|
|
PlayerEvent.OPEN_MENU.register((player, menu) -> {
|
|
|
SINK.accept(player.getScoreboardName() + " opens " + toSimpleName(menu) + logSide(player.level));
|
|
|
});
|