fixed game rules

This commit is contained in:
jannis committed 2026-10-13 22:29:33 +02:00
1 parent cf3fd2f38f
commit a1ab06a80d
2 files changed
+12

No files matched your search

@@ -31,6 +31,10 @@ public class IteratorUtil {
rules.forEach((gameRule, value) -> IteratorUtil.worlds(world -> world.setGameRule(gameRule, value ^ inverse)));
}
public static void setIntGameRules(Map<GameRule<Integer>, Integer> rules) {
rules.forEach((gameRule, value) -> IteratorUtil.worlds(world -> world.setGameRule(gameRule, value)));
}
public static void times(int times, Runnable callback) {
IntStream.range(0, times).forEach(value -> callback.run());
}