mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 01:17:42 +01:00
fix config options in patches
This commit is contained in:
@@ -55,7 +55,7 @@ index 218eaf5f18162422b3376335e32f25d03c0655ec..9d9cb6e697c4f09badc3ca121f2ef987
|
||||
return this.brain;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ambient/Bat.java b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
|
||||
index 7798e8df6156d71878b7c1f60c5636be64a25591..0dc811f18724d3142561c0dddf840dbbb28bb12e 100644
|
||||
index 2ac0c8a7335450c192352da9c34151a70a2645dd..45297abb703c82f13cc206896758458afcfb3b51 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ambient/Bat.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
|
||||
@@ -278,6 +278,18 @@ public class Bat extends AmbientCreature {
|
||||
@@ -158,7 +158,7 @@ index 3ac30ed0a411384be5102de498815561915a7903..d26a44d634fe02e595654e573d02243b
|
||||
protected void registerGoals() {
|
||||
this.goalSelector.addGoal(0, new FloatGoal(this));
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Dolphin.java b/src/main/java/net/minecraft/world/entity/animal/Dolphin.java
|
||||
index 057ebdba945caa27db8982fe140d858bdb84fa39..b206686fe55f56b9c4d94a7b54927bf74842b46c 100644
|
||||
index b9a2064fd3a08aa21f1a25d3f367342852185974..08e9fd3581578195e5df079b086811c5964fd17a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Dolphin.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Dolphin.java
|
||||
@@ -154,6 +154,11 @@ public class Dolphin extends WaterAnimal {
|
||||
@@ -775,7 +775,7 @@ index 5a2eb6775ecb3b01fd136c796258395b4270f7a8..f160933af318becaf99befc0ecc0204b
|
||||
return Mob.createMobAttributes().add(Attributes.MAX_HEALTH, 200.0D);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
||||
index cfde1cde09112251410495203f7daa457c5ed728..e942a677fe90f30f08100ad544aa773ead563954 100644
|
||||
index 2a8f6b1fb7f3aac3100e5dc9ee64c53c0edd165b..38800a318f675ab11eeba17cb1966e9a294c69e1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
||||
@@ -112,6 +112,11 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
|
||||
@@ -1053,7 +1053,7 @@ index aad51022eac584fbc058c2b25e2bf1929fccca6f..b472309f97b24f1d7b97d8b6d464c479
|
||||
return Monster.createMonsterAttributes().add(Attributes.MOVEMENT_SPEED, (double)0.2F);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Phantom.java b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
|
||||
index ea613fe67fcd977aebaae891f95272970ba23698..cd6a25bb101555d6c763a7023d1b05691e671b5f 100644
|
||||
index 519d7667e6a8bcb39c200546af5ebbf74e0e9368..2189058a752986179165fb904513796e7220438e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Phantom.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
|
||||
@@ -150,7 +150,10 @@ public class Phantom extends FlyingMob implements Enemy {
|
||||
@@ -1504,7 +1504,7 @@ index d434b96b878652190fac4e2882b7b7373febbbd5..62deb4a443bf65655d2a4310c0dd9f40
|
||||
protected void registerGoals() {
|
||||
this.goalSelector.addGoal(0, new FloatGoal(this));
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index ec168b917d60cc6d8c48620eb4dcd89b0b121aea..2bd21bcd94e63048f29bf7e833fabb0751308447 100644
|
||||
index ec168b917d60cc6d8c48620eb4dcd89b0b121aea..d16e7c78f6da209a94ab0fd95fb8e178b1a61609 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -114,94 +114,188 @@ public class PurpurWorldConfig {
|
||||
@@ -1858,7 +1858,7 @@ index ec168b917d60cc6d8c48620eb4dcd89b0b121aea..2bd21bcd94e63048f29bf7e833fabb07
|
||||
}
|
||||
|
||||
public boolean frogRidable = false;
|
||||
@@ -300,147 +475,319 @@ public class PurpurWorldConfig {
|
||||
@@ -300,147 +475,316 @@ public class PurpurWorldConfig {
|
||||
public boolean ghastRidableInWater = true;
|
||||
public boolean ghastControllable = true;
|
||||
public double ghastMaxY = 320D;
|
||||
@@ -2047,9 +2047,6 @@ index ec168b917d60cc6d8c48620eb4dcd89b0b121aea..2bd21bcd94e63048f29bf7e833fabb07
|
||||
llamaRidable = getBoolean("mobs.llama.ridable", llamaRidable);
|
||||
llamaRidableInWater = getBoolean("mobs.llama.ridable-in-water", llamaRidableInWater);
|
||||
llamaControllable = getBoolean("mobs.llama.controllable", llamaControllable);
|
||||
+ llamaRidable = getBoolean("mobs.llama.ridable", llamaRidable);
|
||||
+ llamaRidableInWater = getBoolean("mobs.llama.ridable-in-water", llamaRidableInWater);
|
||||
+ llamaControllable = getBoolean("mobs.llama.controllable", llamaControllable);
|
||||
+ if (PurpurConfig.version < 10) {
|
||||
+ double oldMin = getDouble("mobs.llama.attributes.max-health.min", llamaMaxHealthMin);
|
||||
+ double oldMax = getDouble("mobs.llama.attributes.max-health.max", llamaMaxHealthMax);
|
||||
@@ -2178,7 +2175,7 @@ index ec168b917d60cc6d8c48620eb4dcd89b0b121aea..2bd21bcd94e63048f29bf7e833fabb07
|
||||
}
|
||||
|
||||
public boolean phantomRidable = false;
|
||||
@@ -450,6 +797,10 @@ public class PurpurWorldConfig {
|
||||
@@ -450,6 +794,10 @@ public class PurpurWorldConfig {
|
||||
public float phantomFlameDamage = 1.0F;
|
||||
public int phantomFlameFireTime = 8;
|
||||
public boolean phantomAllowGriefing = false;
|
||||
@@ -2189,7 +2186,7 @@ index ec168b917d60cc6d8c48620eb4dcd89b0b121aea..2bd21bcd94e63048f29bf7e833fabb07
|
||||
private void phantomSettings() {
|
||||
phantomRidable = getBoolean("mobs.phantom.ridable", phantomRidable);
|
||||
phantomRidableInWater = getBoolean("mobs.phantom.ridable-in-water", phantomRidableInWater);
|
||||
@@ -458,189 +809,361 @@ public class PurpurWorldConfig {
|
||||
@@ -458,189 +806,361 @@ public class PurpurWorldConfig {
|
||||
phantomFlameDamage = (float) getDouble("mobs.phantom.flames.damage", phantomFlameDamage);
|
||||
phantomFlameFireTime = getInt("mobs.phantom.flames.fire-time", phantomFlameFireTime);
|
||||
phantomAllowGriefing = getBoolean("mobs.phantom.allow-griefing", phantomAllowGriefing);
|
||||
@@ -2551,7 +2548,7 @@ index ec168b917d60cc6d8c48620eb4dcd89b0b121aea..2bd21bcd94e63048f29bf7e833fabb07
|
||||
}
|
||||
|
||||
public boolean tadpoleRidable = false;
|
||||
@@ -655,64 +1178,125 @@ public class PurpurWorldConfig {
|
||||
@@ -655,64 +1175,125 @@ public class PurpurWorldConfig {
|
||||
public boolean traderLlamaRidable = false;
|
||||
public boolean traderLlamaRidableInWater = false;
|
||||
public boolean traderLlamaControllable = true;
|
||||
@@ -2677,7 +2674,7 @@ index ec168b917d60cc6d8c48620eb4dcd89b0b121aea..2bd21bcd94e63048f29bf7e833fabb07
|
||||
}
|
||||
|
||||
public boolean wardenRidable = false;
|
||||
@@ -727,81 +1311,160 @@ public class PurpurWorldConfig {
|
||||
@@ -727,81 +1308,165 @@ public class PurpurWorldConfig {
|
||||
public boolean witchRidable = false;
|
||||
public boolean witchRidableInWater = true;
|
||||
public boolean witchControllable = true;
|
||||
@@ -2816,6 +2813,11 @@ index ec168b917d60cc6d8c48620eb4dcd89b0b121aea..2bd21bcd94e63048f29bf7e833fabb07
|
||||
zombieVillagerRidable = getBoolean("mobs.zombie_villager.ridable", zombieVillagerRidable);
|
||||
zombieVillagerRidableInWater = getBoolean("mobs.zombie_villager.ridable-in-water", zombieVillagerRidableInWater);
|
||||
zombieVillagerControllable = getBoolean("mobs.zombie_villager.controllable", zombieVillagerControllable);
|
||||
+ if (PurpurConfig.version < 10) {
|
||||
+ double oldValue = getDouble("mobs.zombie_villager.attributes.max-health", zombieVillagerMaxHealth);
|
||||
+ set("mobs.zombie_villager.attributes.max-health", null);
|
||||
+ set("mobs.zombie_villager.attributes.max_health", oldValue);
|
||||
+ }
|
||||
+ zombieVillagerMaxHealth = getDouble("mobs.zombie_villager.attributes.max_health", zombieVillagerMaxHealth);
|
||||
+ zombieVillagerSpawnReinforcements = getDouble("mobs.zombie_villager.attributes.spawn_reinforcements", zombieVillagerSpawnReinforcements);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user