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

@@ -68,6 +68,12 @@ public class ProjectStart extends Appliance {
entry(GameRules.FALL_DAMAGE, true),
entry(GameRules.FIRE_DAMAGE, true)
);
private final Map<GameRule<Integer>, Integer> intGameRulesAfterStart = Map.of(
GameRules.FIRE_SPREAD_RADIUS_AROUND_PLAYER, -1
);
private final Map<GameRule<Integer>, Integer> intGameRulesBeforeStart = Map.of(
GameRules.FIRE_SPREAD_RADIUS_AROUND_PLAYER, 0
);
public ProjectStart() {
super("countdown");
@@ -121,6 +127,7 @@ public class ProjectStart extends Appliance {
IteratorUtil.worlds(World::getWorldBorder, worldBorder -> worldBorder.setSize(worldBorder.getMaxSize()));
IteratorUtil.worlds(world -> IteratorUtil.setGameRules(this.gameRulesAfterStart, false));
IteratorUtil.worlds(world -> IteratorUtil.setIntGameRules(this.intGameRulesAfterStart));
Bukkit.getWorlds().getFirst().setFullTime(0);
this.netherFireLocations.forEach(location -> Objects.requireNonNull(this.startWorld).getBlockAt(location).setType(Material.FIRE));
@@ -168,6 +175,7 @@ public class ProjectStart extends Appliance {
});
IteratorUtil.worlds(world -> world, world -> IteratorUtil.setGameRules(this.gameRulesAfterStart, true));
IteratorUtil.worlds(world -> world, world -> IteratorUtil.setIntGameRules(this.intGameRulesBeforeStart));
this.resetAdvancements();
this.blockCycle.reset();