瀏覽代碼

Add lightning strikes to the debug mod

shedaniel 4 年之前
父節點
當前提交
6cbafd06a7
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      testmod-common/src/main/java/me/shedaniel/architectury/test/events/DebugEvents.java

+ 3 - 0
testmod-common/src/main/java/me/shedaniel/architectury/test/events/DebugEvents.java

@@ -168,6 +168,9 @@ public class DebugEvents {
         PlayerEvent.CHANGE_DIMENSION.register((player, oldLevel, newLevel) -> {
             SINK.accept(player.getScoreboardName() + " switched from " + oldLevel.location() + " to " + newLevel.location() + logSide(player.level));
         });
+        LightningEvent.STRIKE.register((bolt, level, pos, toStrike) -> {
+            SINK.accept(bolt.getScoreboardName() + " struck at " + toShortString(pos) + logSide(level));
+        });
     }
     
     public static String toShortString(Vec3i pos) {