mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 18:37:42 +01:00
save stuff here
This commit is contained in:
@@ -5,7 +5,7 @@ Subject: [PATCH] Add mobGriefing bypass to everything affected
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 1d0d22c9d3b8c907502b8fb044ebf8c5c49f6885..eac15c03b842840a47a0b2d1b0f3ea3920a621a5 100644
|
||||
index 27df4e881e850a73947651ce7ad98df5159f4c1c..182436020d2376101f5863f80b4b6d3d9ebd6a2e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1767,7 +1767,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -18,7 +18,7 @@ index 1d0d22c9d3b8c907502b8fb044ebf8c5c49f6885..eac15c03b842840a47a0b2d1b0f3ea39
|
||||
BlockState iblockdata = Blocks.WITHER_ROSE.defaultBlockState();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 4fbc1fa9d3d37129b2ef243b65844dce9fe44884..1f1c7a8668dcdf7850720b46b395322601dbf9a0 100644
|
||||
index 0bdd8bcb37a899c1a4191ba13c0922f3385f020f..b0ce2885a304cb15964a1d3bf047c49f95ab594d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -701,7 +701,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||
@@ -57,7 +57,7 @@ index 4253b3b1263a7ae5a2f5f3a34674dfea615a81ea..a987c94fd321f51241c405659d6a0b23
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/EatBlockGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/EatBlockGoal.java
|
||||
index abf796c3369da6b73c8587dfc05f56d0b8933fde..95dc62687d10e5c6f54baadda4a725094c52c07f 100644
|
||||
index abf796c3369da6b73c8587dfc05f56d0b8933fde..f169bb0ca0d1f7bd1507436beca806a790d6b7d2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/goal/EatBlockGoal.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/EatBlockGoal.java
|
||||
@@ -69,7 +69,7 @@ public class EatBlockGoal extends Goal {
|
||||
@@ -65,7 +65,7 @@ index abf796c3369da6b73c8587dfc05f56d0b8933fde..95dc62687d10e5c6f54baadda4a72509
|
||||
if (EatBlockGoal.IS_TALL_GRASS.test(this.level.getBlockState(blockposition))) {
|
||||
// CraftBukkit
|
||||
- if (!CraftEventFactory.callEntityChangeBlockEvent(this.mob, blockposition, Blocks.AIR.defaultBlockState(), !this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)).isCancelled()) {
|
||||
+ if (!CraftEventFactory.callEntityChangeBlockEvent(this.mob, blockposition, Blocks.AIR.defaultBlockState(), !this.level.purpurConfig.sheepBypassMobGriefing && !this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)).isCancelled()) { // Purpur
|
||||
+ if (!CraftEventFactory.callEntityChangeBlockEvent(this.mob, blockposition, Blocks.AIR.defaultBlockState(), !this.level().purpurConfig.sheepBypassMobGriefing && !this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)).isCancelled()) { // Purpur
|
||||
this.level.destroyBlock(blockposition, false);
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ index abf796c3369da6b73c8587dfc05f56d0b8933fde..95dc62687d10e5c6f54baadda4a72509
|
||||
if (this.level.getBlockState(blockposition1).is(Blocks.GRASS_BLOCK)) {
|
||||
// CraftBukkit
|
||||
- if (!CraftEventFactory.callEntityChangeBlockEvent(this.mob, blockposition1, Blocks.DIRT.defaultBlockState(), !this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)).isCancelled()) { // Paper - Fix wrong block state
|
||||
+ if (!CraftEventFactory.callEntityChangeBlockEvent(this.mob, blockposition1, Blocks.DIRT.defaultBlockState(), !this.level.purpurConfig.sheepBypassMobGriefing && !this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)).isCancelled()) { // Paper - Fix wrong block state // Purpur
|
||||
+ if (!CraftEventFactory.callEntityChangeBlockEvent(this.mob, blockposition1, Blocks.DIRT.defaultBlockState(), !this.level().purpurConfig.sheepBypassMobGriefing && !this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)).isCancelled()) { // Paper - Fix wrong block state // Purpur
|
||||
this.level.levelEvent(2001, blockposition1, Block.getId(Blocks.GRASS_BLOCK.defaultBlockState()));
|
||||
this.level.setBlock(blockposition1, Blocks.DIRT.defaultBlockState(), 2);
|
||||
}
|
||||
@@ -92,7 +92,7 @@ index 0035461aff86fa3f44c860e7d77589b974446048..8c08457b5a9ade9b602851c9a12b015e
|
||||
} else if (this.nextStartTick > 0) {
|
||||
--this.nextStartTick;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
index 2232af2cef82014570596c122e11a47d3ae15b9b..eca7c43ac555417b0746ebb20f67978fa801af59 100644
|
||||
index 989dc460d8a21b8e54ff4464998c2b02a6a9dd37..aa190c36d32aef0413e6bf89621fa9b42be16d82 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
@@ -1377,7 +1377,7 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
|
||||
@@ -105,7 +105,7 @@ index 2232af2cef82014570596c122e11a47d3ae15b9b..eca7c43ac555417b0746ebb20f67978f
|
||||
|
||||
if (iblockdata.is(Blocks.SWEET_BERRY_BUSH)) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Rabbit.java b/src/main/java/net/minecraft/world/entity/animal/Rabbit.java
|
||||
index 857d4a70c8a9678e689ee0807f42cd5f7cc4902d..59aaa76f9c5b4639a632ef6ee67092983e7edf35 100644
|
||||
index c21d48eb213dac6c932edfe7c4161e76510450a4..c5de6e469030615d9afc64f24cc50f901a557840 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Rabbit.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Rabbit.java
|
||||
@@ -637,7 +637,7 @@ public class Rabbit extends Animal implements VariantHolder<Rabbit.Variant> {
|
||||
@@ -118,7 +118,7 @@ index 857d4a70c8a9678e689ee0807f42cd5f7cc4902d..59aaa76f9c5b4639a632ef6ee6709298
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/SnowGolem.java b/src/main/java/net/minecraft/world/entity/animal/SnowGolem.java
|
||||
index f43c37505e9e7c171b62cfc0621e425f5726dc3d..1db7bb084674cea5dd2bbf4d5ed05048414aa85c 100644
|
||||
index ecc0f221fca332b6f4d8feb72dbafc52e1002a23..dc6b0446336b8d689f8273c9ffe1d3c27cf1281a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/SnowGolem.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/SnowGolem.java
|
||||
@@ -127,7 +127,7 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM
|
||||
@@ -131,7 +131,7 @@ index f43c37505e9e7c171b62cfc0621e425f5726dc3d..1db7bb084674cea5dd2bbf4d5ed05048
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
index 587a6cd7bd4cb724a778f98677eb09b0eb494349..ce82644310d6f5fe4a60294004cd663c2c12f06b 100644
|
||||
index 81cf89bc57af0f43d05ba93256255155bf0c4d53..2b0aac1e4291549efa6391cb3b41492184c9aeda 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
@@ -612,7 +612,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
@@ -144,7 +144,7 @@ index 587a6cd7bd4cb724a778f98677eb09b0eb494349..ce82644310d6f5fe4a60294004cd663c
|
||||
// flag1 = this.level().removeBlock(blockposition, false) || flag1;
|
||||
flag1 = true;
|
||||
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 52f6459b0bfff7991da6cb0deda1b15664c4d00b..aabc5523343e16974d7fb2af476ba84c9059f119 100644
|
||||
index b39a7dfb910e99f04275fa8e246581f5ccc27afa..f68f330e5a36f1c3cbf956a39b5b2886e30a37d2 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
|
||||
@@ -496,7 +496,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
|
||||
@@ -157,7 +157,7 @@ index 52f6459b0bfff7991da6cb0deda1b15664c4d00b..aabc5523343e16974d7fb2af476ba84c
|
||||
j = Mth.floor(this.getX());
|
||||
int i1 = Mth.floor(this.getZ());
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
||||
index 094ed658eaedcd88461330de0816e29b7db8acd2..2189cf09f7d9299ff9a3e4b62d3e199caedfbc0d 100644
|
||||
index 47b82549b401acca5e9a5702d41674652ab6853f..87960051bd908822cf8c0d5c7b2d1faa6396c92f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
||||
@@ -532,7 +532,15 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||
@@ -195,7 +195,7 @@ index 094ed658eaedcd88461330de0816e29b7db8acd2..2189cf09f7d9299ff9a3e4b62d3e199c
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Evoker.java b/src/main/java/net/minecraft/world/entity/monster/Evoker.java
|
||||
index f113c96af07eeceef2e51cd310d46b2763c8224b..629e29bfeb26f686d41a27218b3caca601018bed 100644
|
||||
index f71a70a72ba0bb01c26291ad9dbdd3b01bbf6ee7..ea2a2c56f94d03b73a5e3a06f91aee7fcb0867f4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Evoker.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Evoker.java
|
||||
@@ -341,7 +341,7 @@ public class Evoker extends SpellcasterIllager {
|
||||
@@ -208,7 +208,7 @@ index f113c96af07eeceef2e51cd310d46b2763c8224b..629e29bfeb26f686d41a27218b3caca6
|
||||
} else {
|
||||
List<Sheep> list = Evoker.this.level().getNearbyEntities(Sheep.class, this.wololoTargeting, Evoker.this, Evoker.this.getBoundingBox().inflate(16.0D, 4.0D, 16.0D));
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Ravager.java b/src/main/java/net/minecraft/world/entity/monster/Ravager.java
|
||||
index c35266d89bfacf193662738366a8c91943b29250..62ffd3ca6276df8e111198aae523ec7de47df691 100644
|
||||
index 990a4ef6e2eccc228b06ba4cb3aadfce0733de5f..e62cb511e78c272346a8735081d1b4b93a6d3c5d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Ravager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Ravager.java
|
||||
@@ -190,7 +190,7 @@ public class Ravager extends Raider {
|
||||
@@ -221,7 +221,7 @@ index c35266d89bfacf193662738366a8c91943b29250..62ffd3ca6276df8e111198aae523ec7d
|
||||
AABB axisalignedbb = this.getBoundingBox().inflate(0.2D);
|
||||
Iterator iterator = BlockPos.betweenClosed(Mth.floor(axisalignedbb.minX), Mth.floor(axisalignedbb.minY), Mth.floor(axisalignedbb.minZ), Mth.floor(axisalignedbb.maxX), Mth.floor(axisalignedbb.maxY), Mth.floor(axisalignedbb.maxZ)).iterator();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Silverfish.java b/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
|
||||
index 1d91686e354cffeec7431f0a70e22b39225ed2b7..b4b5f2d564accb4e7b0361af4f67d22185755d51 100644
|
||||
index 0a78b3231700ff4ec4bc6ab9d3cbaebc261601e1..dbde54c4a616d6baba672a470b9886c9714133b9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
|
||||
@@ -208,7 +208,7 @@ public class Silverfish extends Monster {
|
||||
@@ -243,7 +243,7 @@ index 1d91686e354cffeec7431f0a70e22b39225ed2b7..b4b5f2d564accb4e7b0361af4f67d221
|
||||
BlockPos blockposition = BlockPos.containing(this.mob.getX(), this.mob.getY() + 0.5D, this.mob.getZ()).relative(this.selectedDirection);
|
||||
BlockState iblockdata = this.mob.level().getBlockState(blockposition);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
|
||||
index bd084cfaecee1098b29e03f75d64e3fecd10a1ea..98ee31528c93ae1a1d294d47c7722ac8b017edbe 100644
|
||||
index 24b8fc91775bc3a305b0293916600d34fdd7eb00..b40e43c94c7a7bb39e4428c4fa35f5697d8e954c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
|
||||
@@ -428,7 +428,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
|
||||
@@ -374,7 +374,7 @@ index 1942649e868fc985a488034c411a6721595ecc67..7495e0e8beedad59fff24ebf189b58b3
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 06cb62b768168c06a7b454e0e7bb105b750729c3..86ad2600050ad695942ed3fdd5af910d5d6d8db0 100644
|
||||
index 63b8d72db812f29fbd82bc62fd21d0d53413bd79..3b53d35be4e5ddf0514556d8515c31ddf3bf6b3a 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -117,8 +117,11 @@ public class PurpurWorldConfig {
|
||||
@@ -437,236 +437,243 @@ index 06cb62b768168c06a7b454e0e7bb105b750729c3..86ad2600050ad695942ed3fdd5af910d
|
||||
+ turtleEggsBypassMobGriefing = getBoolean("blocks.turtle_egg.bypass-mob-griefing", turtleEggsBypassMobGriefing);
|
||||
}
|
||||
|
||||
public double axolotlMaxHealth = 14.0D;
|
||||
@@ -657,6 +672,7 @@ public class PurpurWorldConfig {
|
||||
public boolean babiesAreRidable = true;
|
||||
@@ -719,6 +734,7 @@ public class PurpurWorldConfig {
|
||||
public double creeperMaxHealth = 20.0D;
|
||||
public double creeperChargedChance = 0.0D;
|
||||
public boolean creeperAllowGriefing = true;
|
||||
+ public boolean creeperBypassMobGriefing = false;
|
||||
private void creeperSettings() {
|
||||
if (PurpurConfig.version < 10) {
|
||||
double oldValue = getDouble("mobs.creeper.attributes.max-health", creeperMaxHealth);
|
||||
@@ -666,6 +682,7 @@ public class PurpurWorldConfig {
|
||||
creeperRidable = getBoolean("mobs.creeper.ridable", creeperRidable);
|
||||
creeperRidableInWater = getBoolean("mobs.creeper.ridable-in-water", creeperRidableInWater);
|
||||
@@ -731,6 +747,7 @@ public class PurpurWorldConfig {
|
||||
creeperMaxHealth = getDouble("mobs.creeper.attributes.max_health", creeperMaxHealth);
|
||||
creeperChargedChance = getDouble("mobs.creeper.naturally-charged-chance", creeperChargedChance);
|
||||
creeperAllowGriefing = getBoolean("mobs.creeper.allow-griefing", creeperAllowGriefing);
|
||||
+ creeperBypassMobGriefing = getBoolean("mobs.creeper.bypass-mob-griefing", creeperBypassMobGriefing);
|
||||
}
|
||||
|
||||
public double dolphinMaxHealth = 10.0D;
|
||||
@@ -734,6 +751,7 @@ public class PurpurWorldConfig {
|
||||
|
||||
public boolean dolphinRidable = false;
|
||||
@@ -842,6 +859,7 @@ public class PurpurWorldConfig {
|
||||
public double enderDragonMaxY = 320D;
|
||||
public double enderDragonMaxHealth = 200.0D;
|
||||
public boolean enderDragonAlwaysDropsFullExp = false;
|
||||
+ public boolean enderDragonBypassMobGriefing = false;
|
||||
private void enderDragonSettings() {
|
||||
if (PurpurConfig.version < 8) {
|
||||
double oldValue = getDouble("mobs.ender_dragon.max-health", enderDragonMaxHealth);
|
||||
@@ -746,11 +764,13 @@ public class PurpurWorldConfig {
|
||||
enderDragonRidable = getBoolean("mobs.ender_dragon.ridable", enderDragonRidable);
|
||||
enderDragonRidableInWater = getBoolean("mobs.ender_dragon.ridable-in-water", enderDragonRidableInWater);
|
||||
@@ -858,6 +876,7 @@ public class PurpurWorldConfig {
|
||||
}
|
||||
enderDragonMaxHealth = getDouble("mobs.ender_dragon.attributes.max_health", enderDragonMaxHealth);
|
||||
enderDragonAlwaysDropsFullExp = getBoolean("mobs.ender_dragon.always-drop-full-exp", enderDragonAlwaysDropsFullExp);
|
||||
+ enderDragonBypassMobGriefing = getBoolean("mobs.ender_dragon.bypass-mob-griefing", enderDragonBypassMobGriefing);
|
||||
}
|
||||
|
||||
public boolean endermanRidable = false;
|
||||
@@ -866,6 +885,7 @@ public class PurpurWorldConfig {
|
||||
public double endermanMaxHealth = 40.0D;
|
||||
public boolean endermanAllowGriefing = true;
|
||||
public boolean endermanDespawnEvenWithBlock = false;
|
||||
+ public boolean endermanBypassMobGriefing = false;
|
||||
private void endermanSettings() {
|
||||
if (PurpurConfig.version < 10) {
|
||||
double oldValue = getDouble("mobs.enderman.attributes.max-health", endermanMaxHealth);
|
||||
@@ -760,6 +780,7 @@ public class PurpurWorldConfig {
|
||||
endermanRidable = getBoolean("mobs.enderman.ridable", endermanRidable);
|
||||
endermanRidableInWater = getBoolean("mobs.enderman.ridable-in-water", endermanRidableInWater);
|
||||
@@ -878,6 +898,7 @@ public class PurpurWorldConfig {
|
||||
endermanMaxHealth = getDouble("mobs.enderman.attributes.max_health", endermanMaxHealth);
|
||||
endermanAllowGriefing = getBoolean("mobs.enderman.allow-griefing", endermanAllowGriefing);
|
||||
endermanDespawnEvenWithBlock = getBoolean("mobs.enderman.can-despawn-with-held-block", endermanDespawnEvenWithBlock);
|
||||
+ endermanBypassMobGriefing = getBoolean("mobs.enderman.bypass-mob-griefing", endermanBypassMobGriefing);
|
||||
}
|
||||
|
||||
public double endermiteMaxHealth = 8.0D;
|
||||
@@ -773,6 +794,7 @@ public class PurpurWorldConfig {
|
||||
}
|
||||
|
||||
public boolean endermiteRidable = false;
|
||||
@@ -900,6 +921,7 @@ public class PurpurWorldConfig {
|
||||
public boolean evokerRidableInWater = true;
|
||||
public boolean evokerControllable = true;
|
||||
public double evokerMaxHealth = 24.0D;
|
||||
+ public boolean evokerBypassMobGriefing = false;
|
||||
private void evokerSettings() {
|
||||
if (PurpurConfig.version < 10) {
|
||||
double oldValue = getDouble("mobs.evoker.attributes.max-health", evokerMaxHealth);
|
||||
@@ -780,11 +802,13 @@ public class PurpurWorldConfig {
|
||||
evokerRidable = getBoolean("mobs.evoker.ridable", evokerRidable);
|
||||
evokerRidableInWater = getBoolean("mobs.evoker.ridable-in-water", evokerRidableInWater);
|
||||
@@ -910,6 +932,7 @@ public class PurpurWorldConfig {
|
||||
set("mobs.evoker.attributes.max_health", oldValue);
|
||||
}
|
||||
evokerMaxHealth = getDouble("mobs.evoker.attributes.max_health", evokerMaxHealth);
|
||||
+ evokerBypassMobGriefing = getBoolean("mobs.evoker.bypass-mob-griefing", evokerBypassMobGriefing);
|
||||
}
|
||||
|
||||
public boolean foxRidable = false;
|
||||
@@ -918,6 +941,7 @@ public class PurpurWorldConfig {
|
||||
public double foxMaxHealth = 10.0D;
|
||||
public boolean foxTypeChangesWithTulips = false;
|
||||
public int foxBreedingTicks = 6000;
|
||||
+ public boolean foxBypassMobGriefing = false;
|
||||
private void foxSettings() {
|
||||
if (PurpurConfig.version < 10) {
|
||||
double oldValue = getDouble("mobs.fox.attributes.max-health", foxMaxHealth);
|
||||
@@ -794,6 +818,7 @@ public class PurpurWorldConfig {
|
||||
foxRidable = getBoolean("mobs.fox.ridable", foxRidable);
|
||||
foxRidableInWater = getBoolean("mobs.fox.ridable-in-water", foxRidableInWater);
|
||||
@@ -930,6 +954,7 @@ public class PurpurWorldConfig {
|
||||
foxMaxHealth = getDouble("mobs.fox.attributes.max_health", foxMaxHealth);
|
||||
foxTypeChangesWithTulips = getBoolean("mobs.fox.tulips-change-type", foxTypeChangesWithTulips);
|
||||
foxBreedingTicks = getInt("mobs.fox.breeding-delay-ticks", foxBreedingTicks);
|
||||
+ foxBypassMobGriefing = getBoolean("mobs.fox.bypass-mob-griefing", foxBypassMobGriefing);
|
||||
}
|
||||
|
||||
public int frogBreedingTicks = 6000;
|
||||
@@ -1114,6 +1139,7 @@ public class PurpurWorldConfig {
|
||||
}
|
||||
|
||||
public boolean frogRidable = false;
|
||||
@@ -1374,6 +1399,7 @@ public class PurpurWorldConfig {
|
||||
public boolean piglinRidableInWater = true;
|
||||
public boolean piglinControllable = true;
|
||||
public double piglinMaxHealth = 16.0D;
|
||||
+ public boolean piglinBypassMobGriefing = false;
|
||||
private void piglinSettings() {
|
||||
if (PurpurConfig.version < 10) {
|
||||
double oldValue = getDouble("mobs.piglin.attributes.max-health", piglinMaxHealth);
|
||||
@@ -1121,6 +1147,7 @@ public class PurpurWorldConfig {
|
||||
piglinRidable = getBoolean("mobs.piglin.ridable", piglinRidable);
|
||||
piglinRidableInWater = getBoolean("mobs.piglin.ridable-in-water", piglinRidableInWater);
|
||||
@@ -1384,6 +1410,7 @@ public class PurpurWorldConfig {
|
||||
set("mobs.piglin.attributes.max_health", oldValue);
|
||||
}
|
||||
piglinMaxHealth = getDouble("mobs.piglin.attributes.max_health", piglinMaxHealth);
|
||||
+ piglinBypassMobGriefing = getBoolean("mobs.piglin.bypass-mob-griefing", piglinBypassMobGriefing);
|
||||
}
|
||||
|
||||
public double piglinBruteMaxHealth = 50.0D;
|
||||
@@ -1134,6 +1161,7 @@ public class PurpurWorldConfig {
|
||||
}
|
||||
|
||||
public boolean piglinBruteRidable = false;
|
||||
@@ -1406,6 +1433,7 @@ public class PurpurWorldConfig {
|
||||
public boolean pillagerRidableInWater = true;
|
||||
public boolean pillagerControllable = true;
|
||||
public double pillagerMaxHealth = 24.0D;
|
||||
+ public boolean pillagerBypassMobGriefing = false;
|
||||
private void pillagerSettings() {
|
||||
if (PurpurConfig.version < 10) {
|
||||
double oldValue = getDouble("mobs.pillager.attributes.max-health", pillagerMaxHealth);
|
||||
@@ -1141,6 +1169,7 @@ public class PurpurWorldConfig {
|
||||
pillagerRidable = getBoolean("mobs.pillager.ridable", pillagerRidable);
|
||||
pillagerRidableInWater = getBoolean("mobs.pillager.ridable-in-water", pillagerRidableInWater);
|
||||
@@ -1416,6 +1444,7 @@ public class PurpurWorldConfig {
|
||||
set("mobs.pillager.attributes.max_health", oldValue);
|
||||
}
|
||||
pillagerMaxHealth = getDouble("mobs.pillager.attributes.max_health", pillagerMaxHealth);
|
||||
+ pillagerBypassMobGriefing = getBoolean("mobs.pillager.bypass-mob-griefing", pillagerBypassMobGriefing);
|
||||
}
|
||||
|
||||
public double polarBearMaxHealth = 30.0D;
|
||||
@@ -1174,6 +1203,7 @@ public class PurpurWorldConfig {
|
||||
public boolean polarBearRidable = false;
|
||||
@@ -1462,6 +1491,7 @@ public class PurpurWorldConfig {
|
||||
public double rabbitNaturalToast = 0.0D;
|
||||
public double rabbitNaturalKiller = 0.0D;
|
||||
public int rabbitBreedingTicks = 6000;
|
||||
+ public boolean rabbitBypassMobGriefing = false;
|
||||
private void rabbitSettings() {
|
||||
if (PurpurConfig.version < 10) {
|
||||
double oldValue = getDouble("mobs.rabbit.attributes.max-health", rabbitMaxHealth);
|
||||
@@ -1184,9 +1214,11 @@ public class PurpurWorldConfig {
|
||||
rabbitRidable = getBoolean("mobs.rabbit.ridable", rabbitRidable);
|
||||
rabbitRidableInWater = getBoolean("mobs.rabbit.ridable-in-water", rabbitRidableInWater);
|
||||
@@ -1475,12 +1505,14 @@ public class PurpurWorldConfig {
|
||||
rabbitNaturalToast = getDouble("mobs.rabbit.spawn-toast-chance", rabbitNaturalToast);
|
||||
rabbitNaturalKiller = getDouble("mobs.rabbit.spawn-killer-rabbit-chance", rabbitNaturalKiller);
|
||||
rabbitBreedingTicks = getInt("mobs.rabbit.breeding-delay-ticks", rabbitBreedingTicks);
|
||||
+ rabbitBypassMobGriefing = getBoolean("mobs.rabbit.bypass-mob-griefing", rabbitBypassMobGriefing);
|
||||
}
|
||||
|
||||
public boolean ravagerRidable = false;
|
||||
public boolean ravagerRidableInWater = false;
|
||||
public boolean ravagerControllable = true;
|
||||
public double ravagerMaxHealth = 100.0D;
|
||||
+ public boolean ravagerBypassMobGriefing = false;
|
||||
private void ravagerSettings() {
|
||||
if (PurpurConfig.version < 10) {
|
||||
double oldValue = getDouble("mobs.ravager.attributes.max-health", ravagerMaxHealth);
|
||||
@@ -1194,6 +1226,7 @@ public class PurpurWorldConfig {
|
||||
ravagerRidable = getBoolean("mobs.ravager.ridable", ravagerRidable);
|
||||
ravagerRidableInWater = getBoolean("mobs.ravager.ridable-in-water", ravagerRidableInWater);
|
||||
@@ -1491,6 +1523,7 @@ public class PurpurWorldConfig {
|
||||
set("mobs.ravager.attributes.max_health", oldValue);
|
||||
}
|
||||
ravagerMaxHealth = getDouble("mobs.ravager.attributes.max_health", ravagerMaxHealth);
|
||||
+ ravagerBypassMobGriefing = getBoolean("mobs.ravager.bypass-mob-griefing", ravagerBypassMobGriefing);
|
||||
}
|
||||
|
||||
public double salmonMaxHealth = 3.0D;
|
||||
@@ -1208,6 +1241,7 @@ public class PurpurWorldConfig {
|
||||
|
||||
public boolean salmonRidable = false;
|
||||
@@ -1512,6 +1545,7 @@ public class PurpurWorldConfig {
|
||||
public boolean sheepControllable = true;
|
||||
public double sheepMaxHealth = 8.0D;
|
||||
public int sheepBreedingTicks = 6000;
|
||||
+ public boolean sheepBypassMobGriefing = false;
|
||||
private void sheepSettings() {
|
||||
if (PurpurConfig.version < 10) {
|
||||
double oldValue = getDouble("mobs.sheep.attributes.max-health", sheepMaxHealth);
|
||||
@@ -1216,6 +1250,7 @@ public class PurpurWorldConfig {
|
||||
sheepRidable = getBoolean("mobs.sheep.ridable", sheepRidable);
|
||||
sheepRidableInWater = getBoolean("mobs.sheep.ridable-in-water", sheepRidableInWater);
|
||||
@@ -1523,6 +1557,7 @@ public class PurpurWorldConfig {
|
||||
}
|
||||
sheepMaxHealth = getDouble("mobs.sheep.attributes.max_health", sheepMaxHealth);
|
||||
sheepBreedingTicks = getInt("mobs.sheep.breeding-delay-ticks", sheepBreedingTicks);
|
||||
+ sheepBypassMobGriefing = getBoolean("mobs.sheep.bypass-mob-griefing", sheepBypassMobGriefing);
|
||||
}
|
||||
|
||||
public double shulkerMaxHealth = 30.0D;
|
||||
@@ -1229,6 +1264,7 @@ public class PurpurWorldConfig {
|
||||
}
|
||||
|
||||
public boolean shulkerRidable = false;
|
||||
@@ -1545,6 +1580,7 @@ public class PurpurWorldConfig {
|
||||
public boolean silverfishRidableInWater = true;
|
||||
public boolean silverfishControllable = true;
|
||||
public double silverfishMaxHealth = 8.0D;
|
||||
+ public boolean silverfishBypassMobGriefing = false;
|
||||
private void silverfishSettings() {
|
||||
if (PurpurConfig.version < 10) {
|
||||
double oldValue = getDouble("mobs.silverfish.attributes.max-health", silverfishMaxHealth);
|
||||
@@ -1236,6 +1272,7 @@ public class PurpurWorldConfig {
|
||||
silverfishRidable = getBoolean("mobs.silverfish.ridable", silverfishRidable);
|
||||
silverfishRidableInWater = getBoolean("mobs.silverfish.ridable-in-water", silverfishRidableInWater);
|
||||
@@ -1555,6 +1591,7 @@ public class PurpurWorldConfig {
|
||||
set("mobs.silverfish.attributes.max_health", oldValue);
|
||||
}
|
||||
silverfishMaxHealth = getDouble("mobs.silverfish.attributes.max_health", silverfishMaxHealth);
|
||||
+ silverfishBypassMobGriefing = getBoolean("mobs.silverfish.bypass-mob-griefing", silverfishBypassMobGriefing);
|
||||
}
|
||||
|
||||
public double skeletonMaxHealth = 20.0D;
|
||||
@@ -1293,6 +1330,7 @@ public class PurpurWorldConfig {
|
||||
public boolean skeletonRidable = false;
|
||||
@@ -1631,6 +1668,7 @@ public class PurpurWorldConfig {
|
||||
public int snowGolemSnowBallMax = 20;
|
||||
public float snowGolemSnowBallModifier = 10.0F;
|
||||
public double snowGolemAttackDistance = 1.25D;
|
||||
+ public boolean snowGolemBypassMobGriefing = false;
|
||||
private void snowGolemSettings() {
|
||||
snowGolemLeaveTrailWhenRidden = getBoolean("mobs.snow_golem.leave-trail-when-ridden", snowGolemLeaveTrailWhenRidden);
|
||||
if (PurpurConfig.version < 10) {
|
||||
@@ -1307,6 +1345,7 @@ public class PurpurWorldConfig {
|
||||
snowGolemRidable = getBoolean("mobs.snow_golem.ridable", snowGolemRidable);
|
||||
snowGolemRidableInWater = getBoolean("mobs.snow_golem.ridable-in-water", snowGolemRidableInWater);
|
||||
@@ -1648,6 +1686,7 @@ public class PurpurWorldConfig {
|
||||
snowGolemSnowBallMax = getInt("mobs.snow_golem.max-shoot-interval-ticks", snowGolemSnowBallMax);
|
||||
snowGolemSnowBallModifier = (float) getDouble("mobs.snow_golem.snow-ball-modifier", snowGolemSnowBallModifier);
|
||||
snowGolemAttackDistance = getDouble("mobs.snow_golem.attack-distance", snowGolemAttackDistance);
|
||||
+ snowGolemBypassMobGriefing = getBoolean("mobs.snow_golem.bypass-mob-griefing", snowGolemBypassMobGriefing);
|
||||
}
|
||||
|
||||
public double snifferMaxHealth = 14.0D;
|
||||
@@ -1429,6 +1468,7 @@ public class PurpurWorldConfig {
|
||||
public boolean snifferRidable = false;
|
||||
@@ -1832,6 +1871,7 @@ public class PurpurWorldConfig {
|
||||
public boolean villagerCanBeLeashed = false;
|
||||
public boolean villagerCanBreed = true;
|
||||
public int villagerBreedingTicks = 6000;
|
||||
+ public boolean villagerBypassMobGriefing = false;
|
||||
private void villagerSettings() {
|
||||
if (PurpurConfig.version < 10) {
|
||||
double oldValue = getDouble("mobs.villager.attributes.max-health", villagerMaxHealth);
|
||||
@@ -1440,6 +1480,7 @@ public class PurpurWorldConfig {
|
||||
villagerRidable = getBoolean("mobs.villager.ridable", villagerRidable);
|
||||
villagerRidableInWater = getBoolean("mobs.villager.ridable-in-water", villagerRidableInWater);
|
||||
@@ -1846,6 +1886,7 @@ public class PurpurWorldConfig {
|
||||
villagerCanBeLeashed = getBoolean("mobs.villager.can-be-leashed", villagerCanBeLeashed);
|
||||
villagerCanBreed = getBoolean("mobs.villager.can-breed", villagerCanBreed);
|
||||
villagerBreedingTicks = getInt("mobs.villager.breeding-delay-ticks", villagerBreedingTicks);
|
||||
+ villagerBypassMobGriefing = getBoolean("mobs.villager.bypass-mob-griefing", villagerBypassMobGriefing);
|
||||
}
|
||||
|
||||
public double vindicatorMaxHealth = 24.0D;
|
||||
@@ -1481,6 +1522,7 @@ public class PurpurWorldConfig {
|
||||
public boolean vindicatorRidable = false;
|
||||
@@ -1918,6 +1959,7 @@ public class PurpurWorldConfig {
|
||||
public double witherMaxHealth = 300.0D;
|
||||
public float witherHealthRegenAmount = 1.0f;
|
||||
public int witherHealthRegenDelay = 20;
|
||||
+ public boolean witherBypassMobGriefing = false;
|
||||
private void witherSettings() {
|
||||
if (PurpurConfig.version < 8) {
|
||||
double oldValue = getDouble("mobs.wither.max-health", witherMaxHealth);
|
||||
@@ -1494,6 +1536,7 @@ public class PurpurWorldConfig {
|
||||
witherRidable = getBoolean("mobs.wither.ridable", witherRidable);
|
||||
witherRidableInWater = getBoolean("mobs.wither.ridable-in-water", witherRidableInWater);
|
||||
@@ -1935,6 +1977,7 @@ public class PurpurWorldConfig {
|
||||
witherMaxHealth = getDouble("mobs.wither.attributes.max_health", witherMaxHealth);
|
||||
witherHealthRegenAmount = (float) getDouble("mobs.wither.health-regen-amount", witherHealthRegenAmount);
|
||||
witherHealthRegenDelay = getInt("mobs.wither.health-regen-delay", witherHealthRegenDelay);
|
||||
+ witherBypassMobGriefing = getBoolean("mobs.wither.bypass-mob-griefing", witherBypassMobGriefing);
|
||||
}
|
||||
|
||||
public double witherSkeletonMaxHealth = 20.0D;
|
||||
@@ -1544,6 +1587,7 @@ public class PurpurWorldConfig {
|
||||
public boolean witherSkeletonRidable = false;
|
||||
@@ -2006,6 +2049,7 @@ public class PurpurWorldConfig {
|
||||
public double zombieJockeyChance = 0.05D;
|
||||
public boolean zombieJockeyTryExistingChickens = true;
|
||||
public boolean zombieAggressiveTowardsVillagerWhenLagging = true;
|
||||
+ public boolean zombieBypassMobGriefing = false;
|
||||
private void zombieSettings() {
|
||||
if (PurpurConfig.version < 10) {
|
||||
double oldValue = getDouble("mobs.zombie.attributes.max-health", zombieMaxHealth);
|
||||
@@ -1556,6 +1600,7 @@ public class PurpurWorldConfig {
|
||||
zombieRidable = getBoolean("mobs.zombie.ridable", zombieRidable);
|
||||
zombieRidableInWater = getBoolean("mobs.zombie.ridable-in-water", zombieRidableInWater);
|
||||
@@ -2021,6 +2065,7 @@ public class PurpurWorldConfig {
|
||||
zombieJockeyChance = getDouble("mobs.zombie.jockey.chance", zombieJockeyChance);
|
||||
zombieJockeyTryExistingChickens = getBoolean("mobs.zombie.jockey.try-existing-chickens", zombieJockeyTryExistingChickens);
|
||||
zombieAggressiveTowardsVillagerWhenLagging = getBoolean("mobs.zombie.aggressive-towards-villager-when-lagging", zombieAggressiveTowardsVillagerWhenLagging);
|
||||
+ zombieBypassMobGriefing = getBoolean("mobs.zombie.bypass-mob-griefing", zombieBypassMobGriefing);
|
||||
}
|
||||
|
||||
public double zombieHorseMaxHealthMin = 15.0D;
|
||||
public boolean zombieHorseRidableInWater = false;
|
||||
|
||||
Reference in New Issue
Block a user