mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 00:47:42 +01:00
Implement respawn anchor explosion options
This commit is contained in:
committed by
granny
parent
a4af6baa0d
commit
ce40bab666
@@ -308,6 +308,27 @@ public class PurpurWorldConfig {
|
||||
lavaSpeedNotNether = getInt("blocks.lava.speed.not-nether", lavaSpeedNotNether);
|
||||
}
|
||||
|
||||
public boolean respawnAnchorExplode = true;
|
||||
public double respawnAnchorExplosionPower = 5.0D;
|
||||
public boolean respawnAnchorExplosionFire = true;
|
||||
public net.minecraft.world.level.Level.ExplosionInteraction respawnAnchorExplosionEffect = net.minecraft.world.level.Level.ExplosionInteraction.BLOCK;
|
||||
private void respawnAnchorSettings() {
|
||||
if (PurpurConfig.version < 31) {
|
||||
if ("DESTROY".equals(getString("blocks.respawn_anchor.explosion-effect", respawnAnchorExplosionEffect.name()))) {
|
||||
set("blocks.respawn_anchor.explosion-effect", "BLOCK");
|
||||
}
|
||||
}
|
||||
respawnAnchorExplode = getBoolean("blocks.respawn_anchor.explode", respawnAnchorExplode);
|
||||
respawnAnchorExplosionPower = getDouble("blocks.respawn_anchor.explosion-power", respawnAnchorExplosionPower);
|
||||
respawnAnchorExplosionFire = getBoolean("blocks.respawn_anchor.explosion-fire", respawnAnchorExplosionFire);
|
||||
try {
|
||||
respawnAnchorExplosionEffect = net.minecraft.world.level.Level.ExplosionInteraction.valueOf(getString("blocks.respawn_anchor.explosion-effect", respawnAnchorExplosionEffect.name()));
|
||||
} catch (IllegalArgumentException e) {
|
||||
log(Level.SEVERE, "Unknown value for `blocks.respawn_anchor.explosion-effect`! Using default of `BLOCK`");
|
||||
respawnAnchorExplosionEffect = net.minecraft.world.level.Level.ExplosionInteraction.BLOCK;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean turtleEggsBreakFromExpOrbs = false;
|
||||
public boolean turtleEggsBreakFromItems = false;
|
||||
public boolean turtleEggsBreakFromMinecarts = false;
|
||||
|
||||
Reference in New Issue
Block a user