mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
add migrations for explosions configs
This commit is contained in:
@@ -27,10 +27,10 @@ index f1a7c5202d4efbfaf5d88609d243f25f6817ecbe..812a93197774b8fbcb5745a5590717e1
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index ed3170c111741fe7e0d0044d3c02da2d6352268d..a6a38979b3d7ea8a4a2bcba2f9c74df547ffcc75 100644
|
||||
index 4421f48e9dd433cdcff5b7c5ac249bae49a67bd8..e619b2cf060a8137bc8b3e7d8062e702b3f9e799 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -291,6 +291,22 @@ public class PurpurWorldConfig {
|
||||
@@ -291,6 +291,27 @@ public class PurpurWorldConfig {
|
||||
});
|
||||
}
|
||||
|
||||
@@ -39,13 +39,18 @@ index ed3170c111741fe7e0d0044d3c02da2d6352268d..a6a38979b3d7ea8a4a2bcba2f9c74df5
|
||||
+ public boolean bedExplosionFire = true;
|
||||
+ public net.minecraft.world.level.Level.ExplosionInteraction bedExplosionEffect = net.minecraft.world.level.Level.ExplosionInteraction.BLOCK;
|
||||
+ private void bedSettings() {
|
||||
+ if (PurpurConfig.version < 31) {
|
||||
+ if ("DESTROY".equals(getString("blocks.bed.explosion-effect", bedExplosionEffect.name()))) {
|
||||
+ set("blocks.bed.explosion-effect", "BLOCK");
|
||||
+ }
|
||||
+ }
|
||||
+ bedExplode = getBoolean("blocks.bed.explode", bedExplode);
|
||||
+ bedExplosionPower = getDouble("blocks.bed.explosion-power", bedExplosionPower);
|
||||
+ bedExplosionFire = getBoolean("blocks.bed.explosion-fire", bedExplosionFire);
|
||||
+ try {
|
||||
+ bedExplosionEffect = net.minecraft.world.level.Level.ExplosionInteraction.valueOf(getString("blocks.bed.explosion-effect", bedExplosionEffect.name()));
|
||||
+ } catch (IllegalArgumentException e) {
|
||||
+ log(Level.SEVERE, "Unknown value for `blocks.bed.explosion-effect`! Using default of `DESTROY`");
|
||||
+ log(Level.SEVERE, "Unknown value for `blocks.bed.explosion-effect`! Using default of `BLOCK`");
|
||||
+ bedExplosionEffect = net.minecraft.world.level.Level.ExplosionInteraction.BLOCK;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
Reference in New Issue
Block a user