Fix TNTPhase
All checks were successful
SteamWarCI Build successful

This commit is contained in:
2025-09-29 16:23:54 +02:00
parent 52828c8b4e
commit d0d353b24d

View File

@ -23,6 +23,7 @@ import de.steamwar.bausystem.features.simulator.data.SimulatorPhase;
import de.steamwar.bausystem.features.simulator.execute.SimulatorAction;
import de.steamwar.bausystem.region.Region;
import de.steamwar.bausystem.region.flags.Flag;
import de.steamwar.bausystem.region.flags.FreezeMode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@ -64,7 +65,7 @@ public final class TNTPhase extends SimulatorPhase {
@Override
public void accept(World world) {
Location location = position.toLocation(world);
if (Region.getRegion(location).getFlags().get(Flag.FREEZE).isPresent()) return;
if (Region.getRegion(location).getFlags().get(Flag.FREEZE).isWithDefault(FreezeMode.ACTIVE)) return;
TNTPrimed tnt = world.spawn(location, TNTPrimed.class);
if (!xJump) tnt.setVelocity(tnt.getVelocity().setX(0));
if (!yJump) tnt.setVelocity(tnt.getVelocity().setY(0));