mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@eb48ada Merge chunk task urgent executor thread into the worker queue PaperMC/Paper@d9fb602 Expose vanilla BiomeProvider from WorldInfo (#7295) PaperMC/Paper@7d7ae7b Updated Upstream (Bukkit/CraftBukkit/Spigot) (#7246)
698 lines
50 KiB
Diff
698 lines
50 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Encode42 <me@encode42.dev>
|
|
Date: Tue, 5 Jan 2021 22:21:56 -0500
|
|
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 66628b9c301da2fee3afe42ed321a2c31fc63d2b..cb825b7edfcee31ba431e5f166ec9008ea9f2060 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
@@ -1690,7 +1690,7 @@ public abstract class LivingEntity extends Entity {
|
|
boolean flag = false;
|
|
|
|
if (this.dead && adversary instanceof WitherBoss) { // Paper
|
|
- if (this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
|
|
+ if (this.level.purpurConfig.witherBypassMobGriefing || this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) { // Purpur
|
|
BlockPos blockposition = this.blockPosition();
|
|
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 0e7fcda7cd4d9008ba3aeb15a50301b8dcb8ba24..fa23e24708f4d9e1f50e54cda76113a9a7695c0a 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
|
@@ -666,7 +666,7 @@ public abstract class Mob extends LivingEntity {
|
|
public void aiStep() {
|
|
super.aiStep();
|
|
this.level.getProfiler().push("looting");
|
|
- if (!this.level.isClientSide && this.canPickUpLoot() && this.isAlive() && !this.dead && this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
|
|
+ if (!this.level.isClientSide && this.canPickUpLoot() && this.isAlive() && !this.dead && (this.level.purpurConfig.entitiesPickUpLootBypassMobGriefing || this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING))) {
|
|
List<ItemEntity> list = this.level.getEntitiesOfClass(ItemEntity.class, this.getBoundingBox().inflate(1.0D, 0.0D, 1.0D));
|
|
Iterator iterator = list.iterator();
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/HarvestFarmland.java b/src/main/java/net/minecraft/world/entity/ai/behavior/HarvestFarmland.java
|
|
index 7d4457da2fe82ebe91b99cf91ae5e70b491d34e7..f4c1b7ad19cb7c9c81ab9f277751024c21bcb573 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/HarvestFarmland.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/HarvestFarmland.java
|
|
@@ -41,7 +41,7 @@ public class HarvestFarmland extends Behavior<Villager> {
|
|
}
|
|
|
|
protected boolean checkExtraStartConditions(ServerLevel world, Villager entity) {
|
|
- if (!world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
|
|
+ if (!world.purpurConfig.villagerBypassMobGriefing && !world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) { // Purpur
|
|
return false;
|
|
} else if (entity.getVillagerData().getProfession() != VillagerProfession.FARMER && !(world.purpurConfig.villagerClericsFarmWarts && entity.getVillagerData().getProfession() == VillagerProfession.CLERIC)) { // Purpur
|
|
return false;
|
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/BreakDoorGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/BreakDoorGoal.java
|
|
index fe045f8e35fe2aac51032a67ce52b27a53a8eff0..56d2849276b322436544512521e3b4ea0c679bcc 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/ai/goal/BreakDoorGoal.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/BreakDoorGoal.java
|
|
@@ -33,7 +33,7 @@ public class BreakDoorGoal extends DoorInteractGoal {
|
|
|
|
@Override
|
|
public boolean canUse() {
|
|
- return !super.canUse() ? false : (!this.mob.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) ? false : this.isValidDifficulty(this.mob.level.getDifficulty()) && !this.isOpen());
|
|
+ return !super.canUse() ? false : ((!this.mob.level.purpurConfig.zombieBypassMobGriefing && !this.mob.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) ? false : this.isValidDifficulty(this.mob.level.getDifficulty()) && !this.isOpen()); // Purpur
|
|
}
|
|
|
|
@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 14ed3f0524773e22a792efb8b41a9217bad50f27..8a4080a77bd5b73ac812e3ae67c6f21dcd270215 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
|
|
@@ -70,7 +70,7 @@ public class EatBlockGoal extends Goal {
|
|
|
|
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
|
|
this.level.destroyBlock(blockposition, false);
|
|
}
|
|
|
|
@@ -81,7 +81,7 @@ public class EatBlockGoal extends Goal {
|
|
|
|
if (this.level.getBlockState(blockposition1).is(Blocks.GRASS_BLOCK)) {
|
|
// CraftBukkit
|
|
- if (!CraftEventFactory.callEntityChangeBlockEvent(this.mob, blockposition1, Blocks.AIR.defaultBlockState(), !this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)).isCancelled()) {
|
|
+ if (!CraftEventFactory.callEntityChangeBlockEvent(this.mob, blockposition1, Blocks.AIR.defaultBlockState(), !this.level.purpurConfig.sheepBypassMobGriefing && !this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)).isCancelled()) { // Purpur
|
|
this.level.levelEvent(2001, blockposition1, Block.getId(Blocks.GRASS_BLOCK.defaultBlockState()));
|
|
this.level.setBlock(blockposition1, Blocks.DIRT.defaultBlockState(), 2);
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java
|
|
index 027ef44d46cb1dda19c5c239f6970c90285fb961..fd0ed33487305093bbdf6c9bf23313a58c81b231 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java
|
|
@@ -40,7 +40,7 @@ public class RemoveBlockGoal extends MoveToBlockGoal {
|
|
|
|
@Override
|
|
public boolean canUse() {
|
|
- if (!this.removerMob.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
|
|
+ if (!this.removerMob.level.purpurConfig.zombieBypassMobGriefing && !this.removerMob.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) { // Purpur
|
|
return false;
|
|
} 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 f7f5a75f29a5092a7d8ee689cd3679d8eaac7c7d..d667159664c05e4e45fe3c22a52f5e228a91409a 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
|
@@ -1356,7 +1356,7 @@ public class Fox extends Animal {
|
|
}
|
|
|
|
protected void onReachedTarget() {
|
|
- if (Fox.this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
|
|
+ if (Fox.this.level.purpurConfig.foxBypassMobGriefing || Fox.this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) { // Purpur
|
|
BlockState iblockdata = Fox.this.level.getBlockState(this.blockPos);
|
|
|
|
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 dd6e51be94189679d169f55805c9252107560be2..a65e2addade6b7e5ad47d0f7d25ebc1790b7329f 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/Rabbit.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/Rabbit.java
|
|
@@ -611,7 +611,7 @@ public class Rabbit extends Animal {
|
|
@Override
|
|
public boolean canUse() {
|
|
if (this.nextStartTick <= 0) {
|
|
- if (!this.rabbit.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
|
|
+ if (!this.rabbit.level.purpurConfig.rabbitBypassMobGriefing && !this.rabbit.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) { // Purpur
|
|
return false;
|
|
}
|
|
|
|
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 10d68856c98b705158fe90623ef2b9ad41bef2f2..0c22b4502be1bf886307ad9b35c49ca617c28dbb 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/SnowGolem.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/SnowGolem.java
|
|
@@ -128,7 +128,7 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM
|
|
this.hurt(CraftEventFactory.MELTING, 1.0F); // CraftBukkit - DamageSource.BURN -> CraftEventFactory.MELTING
|
|
}
|
|
|
|
- if (!this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
|
|
+ if (!this.level.purpurConfig.snowGolemBypassMobGriefing && !this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) { // Purpur
|
|
return;
|
|
}
|
|
|
|
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 9d4dd8c460d1d69ab56e166e10fd7137ddc47603..f237bcff01e4102f68663bbaa1254bbd5b98ee0c 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
|
|
@@ -560,7 +560,7 @@ public class EnderDragon extends Mob implements Enemy {
|
|
BlockState iblockdata = this.level.getBlockState(blockposition);
|
|
|
|
if (!iblockdata.isAir() && iblockdata.getMaterial() != Material.FIRE) {
|
|
- if (this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && !iblockdata.is((Tag) BlockTags.DRAGON_IMMUNE)) {
|
|
+ if ((this.level.purpurConfig.enderDragonBypassMobGriefing || this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) && !iblockdata.is((Tag) BlockTags.DRAGON_IMMUNE)) { // Purpur
|
|
// CraftBukkit start - Add blocks to list rather than destroying them
|
|
// 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 93cc8dbf2ff435777a5edc11a834ca1b190638ab..cf36bf3067f86572ffb75c2a155dbfc8e3750a12 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
|
|
@@ -386,7 +386,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
|
|
i = this.getInvulnerableTicks() - 1;
|
|
this.bossEvent.setProgress(1.0F - (float) i / 220.0F);
|
|
if (i <= 0) {
|
|
- Explosion.BlockInteraction explosion_effect = this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.NONE;
|
|
+ Explosion.BlockInteraction explosion_effect = (this.level.purpurConfig.witherBypassMobGriefing || this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.NONE; // Purpur
|
|
// CraftBukkit start
|
|
// this.level.explode(this, this.getX(), this.getEyeY(), this.getZ(), 7.0F, false, explosion_effect);
|
|
ExplosionPrimeEvent event = new ExplosionPrimeEvent(this.getBukkitEntity(), 7.0F, false);
|
|
@@ -482,7 +482,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
|
|
|
|
if (this.destroyBlocksTick > 0) {
|
|
--this.destroyBlocksTick;
|
|
- if (this.destroyBlocksTick == 0 && this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
|
|
+ if (this.destroyBlocksTick == 0 && (this.level.purpurConfig.witherBypassMobGriefing || this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING))) { // Purpur
|
|
i = Mth.floor(this.getY());
|
|
j = Mth.floor(this.getX());
|
|
int i1 = Mth.floor(this.getZ());
|
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/Creeper.java b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
|
index bb32bc0989ebbdd7522fe5f70ae3e6414f909388..8ac278f8e55ad7a090ad332db2da1e1eaef0db4d 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
|
@@ -344,7 +344,7 @@ public class Creeper extends Monster implements PowerableMob {
|
|
|
|
public void explodeCreeper() {
|
|
if (!this.level.isClientSide) {
|
|
- Explosion.BlockInteraction explosion_effect = this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && level.purpurConfig.creeperAllowGriefing ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.NONE; // Purpur
|
|
+ Explosion.BlockInteraction explosion_effect = (this.level.purpurConfig.creeperBypassMobGriefing || this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) && level.purpurConfig.creeperAllowGriefing ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.NONE; // Purpur
|
|
float f = this.isPowered() ? 2.0F : 1.0F;
|
|
|
|
// CraftBukkit start
|
|
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 3945038b07393cd4692b340f32a988404117fe6f..8486b37d37fda4cc380a81edb1675e469e1a4e91 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
|
@@ -507,7 +507,7 @@ public class EnderMan extends Monster implements NeutralMob {
|
|
@Override
|
|
public boolean canUse() {
|
|
if (!enderman.level.purpurConfig.endermanAllowGriefing) return false; // Purpur
|
|
- return this.enderman.getCarriedBlock() == null ? false : (!this.enderman.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) ? false : this.enderman.getRandom().nextInt(reducedTickDelay(2000)) == 0);
|
|
+ return this.enderman.getCarriedBlock() != null ? false : (!this.enderman.level.purpurConfig.endermanBypassMobGriefing && !this.enderman.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) ? false : this.enderman.getRandom().nextInt(reducedTickDelay(2000)) == 0); // Purpur
|
|
}
|
|
|
|
@Override
|
|
@@ -555,7 +555,7 @@ public class EnderMan extends Monster implements NeutralMob {
|
|
@Override
|
|
public boolean canUse() {
|
|
if (!enderman.level.purpurConfig.endermanAllowGriefing) return false; // Purpur
|
|
- return this.enderman.getCarriedBlock() != null ? false : (!this.enderman.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) ? false : this.enderman.getRandom().nextInt(reducedTickDelay(20)) == 0);
|
|
+ return this.enderman.getCarriedBlock() == null ? false : (!this.enderman.level.purpurConfig.endermanBypassMobGriefing && !this.enderman.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) ? false : this.enderman.getRandom().nextInt(reducedTickDelay(2000)) == 0); // Purpur
|
|
}
|
|
|
|
@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 eb794368625d96aef6883f2c45c6a21e06e33d0b..f0f8d81539ce6a5d0b84488b6dc15fe53e0b1083 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/Evoker.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Evoker.java
|
|
@@ -317,7 +317,7 @@ public class Evoker extends SpellcasterIllager {
|
|
return false;
|
|
} else if (Evoker.this.tickCount < this.nextAttackTickCount) {
|
|
return false;
|
|
- } else if (!Evoker.this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
|
|
+ } else if (!Evoker.this.level.purpurConfig.evokerBypassMobGriefing && !Evoker.this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) { // Purpur
|
|
return false;
|
|
} 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 b289e0fa4324f012464c655d82ccf59469ae6466..a9681016023be8586268a366914273334e3e7f9e 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/Ravager.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Ravager.java
|
|
@@ -185,7 +185,7 @@ public class Ravager extends Raider {
|
|
this.getAttribute(Attributes.MOVEMENT_SPEED).setBaseValue(Mth.lerp(0.1D, d1, d0));
|
|
}
|
|
|
|
- if (this.horizontalCollision && this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
|
|
+ if (this.horizontalCollision && (this.level.purpurConfig.ravagerBypassMobGriefing || this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING))) { // Purpur
|
|
boolean flag = false;
|
|
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 cd26c22664fb23457f99fe04607146c8c6545307..5057b9b6ad2c47a11ca11b281393ccf6a6e8dd6f 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
|
|
@@ -197,7 +197,7 @@ public class Silverfish extends Monster {
|
|
continue;
|
|
}
|
|
// CraftBukkit end
|
|
- if (world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
|
|
+ if (world.purpurConfig.silverfishBypassMobGriefing || world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) { // Purpur
|
|
world.destroyBlock(blockposition1, true, this.silverfish);
|
|
} else {
|
|
world.setBlock(blockposition1, ((InfestedBlock) block).hostStateByInfested(world.getBlockState(blockposition1)), 3);
|
|
@@ -235,7 +235,7 @@ public class Silverfish extends Monster {
|
|
} else {
|
|
Random random = this.mob.getRandom();
|
|
|
|
- if (this.mob.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && random.nextInt(reducedTickDelay(10)) == 0) {
|
|
+ if ((this.mob.level.purpurConfig.silverfishBypassMobGriefing || this.mob.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) && random.nextInt(reducedTickDelay(10)) == 0) { // Purpur
|
|
this.selectedDirection = Direction.getRandom(random);
|
|
BlockPos blockposition = (new BlockPos(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 70be752683291c34248ba7bafa42034f22fec9a9..107afea31c75f11e82672def7300d277dec7af1d 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
|
|
@@ -407,7 +407,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
|
|
|
|
@Override
|
|
public boolean wantsToPickUp(ItemStack stack) {
|
|
- return this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && this.canPickUpLoot() && PiglinAi.wantsToPickup(this, stack);
|
|
+ return (this.level.purpurConfig.piglinBypassMobGriefing || this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) && this.canPickUpLoot() && PiglinAi.wantsToPickup(this, stack);
|
|
}
|
|
|
|
protected boolean canReplaceCurrentItem(ItemStack stack) {
|
|
diff --git a/src/main/java/net/minecraft/world/entity/projectile/LargeFireball.java b/src/main/java/net/minecraft/world/entity/projectile/LargeFireball.java
|
|
index e69213b43c8aa5a7c04add7a87482d531fbf52d2..f51ea103238b4a50439f5162a248cd9aa7f1a19b 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/projectile/LargeFireball.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/LargeFireball.java
|
|
@@ -18,20 +18,20 @@ public class LargeFireball extends Fireball {
|
|
|
|
public LargeFireball(EntityType<? extends LargeFireball> type, Level world) {
|
|
super(type, world);
|
|
- isIncendiary = this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING); // CraftBukkit
|
|
+ isIncendiary = this.level.purpurConfig.fireballsBypassMobGriefing || this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING); // CraftBukkit // Purpur
|
|
}
|
|
|
|
public LargeFireball(Level world, LivingEntity owner, double velocityX, double velocityY, double velocityZ, int explosionPower) {
|
|
super(EntityType.FIREBALL, owner, velocityX, velocityY, velocityZ, world);
|
|
this.explosionPower = explosionPower;
|
|
- isIncendiary = this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING); // CraftBukkit
|
|
+ isIncendiary = this.level.purpurConfig.fireballsBypassMobGriefing || this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING); // CraftBukkit // Purpur
|
|
}
|
|
|
|
@Override
|
|
protected void onHit(HitResult hitResult) {
|
|
super.onHit(hitResult);
|
|
if (!this.level.isClientSide) {
|
|
- boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING);
|
|
+ boolean flag = this.level.purpurConfig.fireballsBypassMobGriefing || this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING); // Purpur
|
|
|
|
// CraftBukkit start - fire ExplosionPrimeEvent
|
|
ExplosionPrimeEvent event = new ExplosionPrimeEvent((org.bukkit.entity.Explosive) this.getBukkitEntity());
|
|
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
|
index 97609bedb82dee6a200ff8b825622c427d7dcf73..39422e7fb1e04c007ec136ea709af22a558ff066 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
|
@@ -320,6 +320,6 @@ public abstract class Projectile extends Entity {
|
|
public boolean mayInteract(Level world, BlockPos pos) {
|
|
Entity entity = this.getOwner();
|
|
|
|
- return entity instanceof Player ? entity.mayInteract(world, pos) : entity == null || world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING);
|
|
+ return entity instanceof Player ? entity.mayInteract(world, pos) : entity == null || world.purpurConfig.projectilesBypassMobGriefing || world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING);
|
|
}
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/world/entity/projectile/SmallFireball.java b/src/main/java/net/minecraft/world/entity/projectile/SmallFireball.java
|
|
index 226b33921c90ca3904a7397a68dc8169948f8faa..e2a652277f2a63e0f0501db4137d7813e2d603c4 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/projectile/SmallFireball.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/SmallFireball.java
|
|
@@ -24,7 +24,7 @@ public class SmallFireball extends Fireball {
|
|
super(EntityType.SMALL_FIREBALL, owner, velocityX, velocityY, velocityZ, world);
|
|
// CraftBukkit start
|
|
if (this.getOwner() != null && this.getOwner() instanceof Mob) {
|
|
- isIncendiary = this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING);
|
|
+ isIncendiary = this.level.purpurConfig.fireballsBypassMobGriefing || this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING); // Purpur
|
|
}
|
|
// CraftBukkit end
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java b/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java
|
|
index 8613008090a9d7cf5cd7c2a598f2c725b5b0cdc6..a66e9826b8283366cec5adb54f79efee47d9df22 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java
|
|
@@ -93,7 +93,7 @@ public class WitherSkull extends AbstractHurtingProjectile {
|
|
protected void onHit(HitResult hitResult) {
|
|
super.onHit(hitResult);
|
|
if (!this.level.isClientSide) {
|
|
- Explosion.BlockInteraction explosion_effect = this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.NONE;
|
|
+ Explosion.BlockInteraction explosion_effect = (this.level.purpurConfig.witherBypassMobGriefing || this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.NONE; // Purpur
|
|
|
|
// CraftBukkit start
|
|
// this.level.createExplosion(this, this.locX(), this.locY(), this.locZ(), 1.0F, false, explosion_effect);
|
|
diff --git a/src/main/java/net/minecraft/world/entity/raid/Raider.java b/src/main/java/net/minecraft/world/entity/raid/Raider.java
|
|
index 74a0866513ea04f635089badfd5cde132d2d1355..a66e456582743f11a458ff22ad8b0467a7e40813 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/raid/Raider.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/raid/Raider.java
|
|
@@ -313,7 +313,7 @@ public abstract class Raider extends PatrollingMonster {
|
|
|
|
@Override
|
|
public boolean canUse() {
|
|
- if (!this.mob.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) || !this.mob.canPickUpLoot()) return false; // Paper - respect game and entity rules for picking up items
|
|
+ if ((!this.mob.level.purpurConfig.pillagerBypassMobGriefing && !this.mob.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) || !this.mob.canPickUpLoot()) return false; // Paper - respect game and entity rules for picking up items // Purpur
|
|
Raid raid = this.mob.getCurrentRaid();
|
|
|
|
if (this.mob.hasActiveRaid() && !this.mob.getCurrentRaid().isOver() && this.mob.canBeLeader() && !ItemStack.matches(this.mob.getItemBySlot(EquipmentSlot.HEAD), Raid.getLeaderBannerInstance())) {
|
|
diff --git a/src/main/java/net/minecraft/world/level/block/CropBlock.java b/src/main/java/net/minecraft/world/level/block/CropBlock.java
|
|
index b4fd9af8805f451c87a91f319c15fa132b91faf7..e9087a46e401bc99b73c2cf2731fdac3e68719f8 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/CropBlock.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/CropBlock.java
|
|
@@ -164,7 +164,7 @@ public class CropBlock extends BushBlock implements BonemealableBlock {
|
|
@Override
|
|
public void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) {
|
|
if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper
|
|
- if (entity instanceof Ravager && !CraftEventFactory.callEntityChangeBlockEvent(entity, pos, Blocks.AIR.defaultBlockState(), !world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)).isCancelled()) { // CraftBukkit
|
|
+ if (entity instanceof Ravager && !CraftEventFactory.callEntityChangeBlockEvent(entity, pos, Blocks.AIR.defaultBlockState(), (!world.purpurConfig.ravagerBypassMobGriefing && !world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING))).isCancelled()) { // CraftBukkit // Purpur
|
|
world.destroyBlock(pos, true, entity);
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/block/FarmBlock.java b/src/main/java/net/minecraft/world/level/block/FarmBlock.java
|
|
index f55a32c7c4e260b41a36b9fc3be01edb50b4951a..4c80e2a10715ce4d4442ea4636808d1e10025494 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/FarmBlock.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/FarmBlock.java
|
|
@@ -99,7 +99,7 @@ public class FarmBlock extends Block {
|
|
@Override
|
|
public void fallOn(Level world, BlockState state, BlockPos pos, Entity entity, float fallDistance) {
|
|
super.fallOn(world, state, pos, entity, fallDistance); // CraftBukkit - moved here as game rules / events shouldn't affect fall damage.
|
|
- if (!world.isClientSide && world.random.nextFloat() < fallDistance - 0.5F && entity instanceof LivingEntity && (entity instanceof Player || world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) && entity.getBbWidth() * entity.getBbWidth() * entity.getBbHeight() > 0.512F) {
|
|
+ if (!world.isClientSide && world.random.nextFloat() < fallDistance - 0.5F && entity instanceof LivingEntity && (entity instanceof Player || world.purpurConfig.farmlandBypassMobGriefing || world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) && entity.getBbWidth() * entity.getBbWidth() * entity.getBbHeight() > 0.512F) { // Purpur
|
|
// CraftBukkit start - Interact soil
|
|
org.bukkit.event.Cancellable cancellable;
|
|
if (entity instanceof Player) {
|
|
diff --git a/src/main/java/net/minecraft/world/level/block/PowderSnowBlock.java b/src/main/java/net/minecraft/world/level/block/PowderSnowBlock.java
|
|
index 5e22a1cd1a0902d63f091bbfb8ae518b12c66f09..8fad9dfd25794c4f202e2104e4ae32b0c436f438 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/PowderSnowBlock.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/PowderSnowBlock.java
|
|
@@ -72,7 +72,7 @@ public class PowderSnowBlock extends Block implements BucketPickup {
|
|
if (!world.isClientSide) {
|
|
// CraftBukkit start
|
|
if (entity.isOnFire() && entity.mayInteract(world, pos)) {
|
|
- if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, pos, Blocks.AIR.defaultBlockState(), !(world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) || entity instanceof Player)).isCancelled()) {
|
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, pos, Blocks.AIR.defaultBlockState(), !((world.purpurConfig.powderSnowBypassMobGriefing || world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) || entity instanceof Player)).isCancelled()) {
|
|
return;
|
|
}
|
|
// CraftBukkit end
|
|
diff --git a/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java b/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java
|
|
index b942e7c85e6c8f9a7664d9e5bf93bcd79e0651f1..5b29f3fced5435e172dd69f6f4eb265e760b6454 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java
|
|
@@ -205,7 +205,7 @@ public class TurtleEggBlock extends Block {
|
|
return false;
|
|
}
|
|
if (entity instanceof LivingEntity && !(entity instanceof Player)) {
|
|
- return world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING);
|
|
+ return world.purpurConfig.turtleEggsBypassMobGriefing || world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING);
|
|
}
|
|
return true;
|
|
// Purpur end
|
|
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
index 23b684830df37277dd35cedf5f415995e052eaf4..3875a19e5217e0752738d4d7ed52e7a0f4a0bd4b 100644
|
|
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
@@ -108,8 +108,11 @@ public class PurpurWorldConfig {
|
|
public boolean boatsDoFallDamage = true;
|
|
public boolean disableDropsOnCrammingDeath = false;
|
|
public boolean entitiesCanUsePortals = true;
|
|
+ public boolean entitiesPickUpLootBypassMobGriefing = false;
|
|
+ public boolean fireballsBypassMobGriefing = false;
|
|
public boolean milkCuresBadOmen = true;
|
|
public boolean persistentDroppableEntityDisplayNames = false;
|
|
+ public boolean projectilesBypassMobGriefing = false;
|
|
public double tridentLoyaltyVoidReturnHeight = 0.0D;
|
|
public double voidDamageHeight = -64.0D;
|
|
public double voidDamageDealt = 4.0D;
|
|
@@ -121,8 +124,11 @@ public class PurpurWorldConfig {
|
|
boatsDoFallDamage = getBoolean("gameplay-mechanics.boat.do-fall-damage", boatsDoFallDamage);
|
|
disableDropsOnCrammingDeath = getBoolean("gameplay-mechanics.disable-drops-on-cramming-death", disableDropsOnCrammingDeath);
|
|
entitiesCanUsePortals = getBoolean("gameplay-mechanics.entities-can-use-portals", entitiesCanUsePortals);
|
|
+ entitiesPickUpLootBypassMobGriefing = getBoolean("gameplay-mechanics.entities-pick-up-loot-bypass-mob-griefing", entitiesPickUpLootBypassMobGriefing);
|
|
+ fireballsBypassMobGriefing = getBoolean("gameplay-mechanics.fireballs-bypass-mob-griefing", fireballsBypassMobGriefing);
|
|
milkCuresBadOmen = getBoolean("gameplay-mechanics.milk-cures-bad-omen", milkCuresBadOmen);
|
|
persistentDroppableEntityDisplayNames = getBoolean("gameplay-mechanics.persistent-droppable-entity-display-names", persistentDroppableEntityDisplayNames);
|
|
+ projectilesBypassMobGriefing = getBoolean("gameplay-mechanics.projectiles-bypass-mob-griefing", projectilesBypassMobGriefing);
|
|
tridentLoyaltyVoidReturnHeight = getDouble("gameplay-mechanics.trident-loyalty-void-return-height", tridentLoyaltyVoidReturnHeight);
|
|
voidDamageHeight = getDouble("gameplay-mechanics.void-damage-height", voidDamageHeight);
|
|
voidDamageDealt = getDouble("gameplay-mechanics.void-damage-dealt", voidDamageDealt);
|
|
@@ -430,9 +436,11 @@ public class PurpurWorldConfig {
|
|
dispenserPlaceAnvils = getBoolean("blocks.dispenser.place-anvils", dispenserPlaceAnvils);
|
|
}
|
|
|
|
+ public boolean farmlandBypassMobGriefing = false;
|
|
public boolean farmlandGetsMoistFromBelow = false;
|
|
public boolean farmlandAlpha = false;
|
|
private void farmlandSettings() {
|
|
+ farmlandBypassMobGriefing = getBoolean("blocks.farmland.bypass-mob-griefing", farmlandBypassMobGriefing);
|
|
farmlandGetsMoistFromBelow = getBoolean("blocks.farmland.gets-moist-from-below", farmlandGetsMoistFromBelow);
|
|
farmlandAlpha = getBoolean("blocks.farmland.use-alpha-farmland", farmlandAlpha);
|
|
}
|
|
@@ -459,6 +467,11 @@ public class PurpurWorldConfig {
|
|
lavaSpeedNotNether = getInt("blocks.lava.speed.not-nether", lavaSpeedNotNether);
|
|
}
|
|
|
|
+ public boolean powderSnowBypassMobGriefing = false;
|
|
+ private void powderSnowSettings() {
|
|
+ powderSnowBypassMobGriefing = getBoolean("blocks.powder_snow.bypass-mob-griefing", powderSnowBypassMobGriefing);
|
|
+ }
|
|
+
|
|
public boolean respawnAnchorExplode = true;
|
|
public double respawnAnchorExplosionPower = 5.0D;
|
|
public boolean respawnAnchorExplosionFire = true;
|
|
@@ -493,10 +506,12 @@ public class PurpurWorldConfig {
|
|
public boolean turtleEggsBreakFromExpOrbs = true;
|
|
public boolean turtleEggsBreakFromItems = true;
|
|
public boolean turtleEggsBreakFromMinecarts = true;
|
|
+ public boolean turtleEggsBypassMobGriefing = false;
|
|
private void turtleEggSettings() {
|
|
turtleEggsBreakFromExpOrbs = getBoolean("blocks.turtle_egg.break-from-exp-orbs", turtleEggsBreakFromExpOrbs);
|
|
turtleEggsBreakFromItems = getBoolean("blocks.turtle_egg.break-from-items", turtleEggsBreakFromItems);
|
|
turtleEggsBreakFromMinecarts = getBoolean("blocks.turtle_egg.break-from-minecarts", turtleEggsBreakFromMinecarts);
|
|
+ turtleEggsBypassMobGriefing = getBoolean("blocks.turtle_egg.bypass-mob-griefing", turtleEggsBypassMobGriefing);
|
|
}
|
|
|
|
public boolean waterInfinite = true;
|
|
@@ -676,6 +691,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() {
|
|
creeperRidable = getBoolean("mobs.creeper.ridable", creeperRidable);
|
|
creeperRidableInWater = getBoolean("mobs.creeper.ridable-in-water", creeperRidableInWater);
|
|
@@ -687,6 +703,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 boolean dolphinRidable = false;
|
|
@@ -774,6 +791,7 @@ public class PurpurWorldConfig {
|
|
public double enderDragonMaxY = 256D;
|
|
public double enderDragonMaxHealth = 200.0D;
|
|
public boolean enderDragonAlwaysDropsFullExp = false;
|
|
+ public boolean enderDragonBypassMobGriefing = false;
|
|
private void enderDragonSettings() {
|
|
enderDragonRidable = getBoolean("mobs.ender_dragon.ridable", enderDragonRidable);
|
|
enderDragonRidableInWater = getBoolean("mobs.ender_dragon.ridable-in-water", enderDragonRidableInWater);
|
|
@@ -789,6 +807,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;
|
|
@@ -796,6 +815,7 @@ public class PurpurWorldConfig {
|
|
public double endermanMaxHealth = 40.0D;
|
|
public boolean endermanAllowGriefing = true;
|
|
public boolean endermanDespawnEvenWithBlock = false;
|
|
+ public boolean endermanBypassMobGriefing = false;
|
|
private void endermanSettings() {
|
|
endermanRidable = getBoolean("mobs.enderman.ridable", endermanRidable);
|
|
endermanRidableInWater = getBoolean("mobs.enderman.ridable-in-water", endermanRidableInWater);
|
|
@@ -807,6 +827,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 boolean endermiteRidable = false;
|
|
@@ -826,6 +847,7 @@ public class PurpurWorldConfig {
|
|
public boolean evokerRidable = false;
|
|
public boolean evokerRidableInWater = false;
|
|
public double evokerMaxHealth = 24.0D;
|
|
+ public boolean evokerBypassMobGriefing = false;
|
|
private void evokerSettings() {
|
|
evokerRidable = getBoolean("mobs.evoker.ridable", evokerRidable);
|
|
evokerRidableInWater = getBoolean("mobs.evoker.ridable-in-water", evokerRidableInWater);
|
|
@@ -835,6 +857,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;
|
|
@@ -842,6 +865,7 @@ public class PurpurWorldConfig {
|
|
public double foxMaxHealth = 10.0D;
|
|
public boolean foxTypeChangesWithTulips = false;
|
|
public int foxBreedingTicks = 6000;
|
|
+ public boolean foxBypassMobGriefing = false;
|
|
private void foxSettings() {
|
|
foxRidable = getBoolean("mobs.fox.ridable", foxRidable);
|
|
foxRidableInWater = getBoolean("mobs.fox.ridable-in-water", foxRidableInWater);
|
|
@@ -853,6 +877,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 boolean ghastRidable = false;
|
|
@@ -1248,6 +1273,7 @@ public class PurpurWorldConfig {
|
|
public boolean piglinRidable = false;
|
|
public boolean piglinRidableInWater = false;
|
|
public double piglinMaxHealth = 16.0D;
|
|
+ public boolean piglinBypassMobGriefing = false;
|
|
private void piglinSettings() {
|
|
piglinRidable = getBoolean("mobs.piglin.ridable", piglinRidable);
|
|
piglinRidableInWater = getBoolean("mobs.piglin.ridable-in-water", piglinRidableInWater);
|
|
@@ -1257,6 +1283,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 boolean piglinBruteRidable = false;
|
|
@@ -1276,6 +1303,7 @@ public class PurpurWorldConfig {
|
|
public boolean pillagerRidable = false;
|
|
public boolean pillagerRidableInWater = false;
|
|
public double pillagerMaxHealth = 24.0D;
|
|
+ public boolean pillagerBypassMobGriefing = false;
|
|
private void pillagerSettings() {
|
|
pillagerRidable = getBoolean("mobs.pillager.ridable", pillagerRidable);
|
|
pillagerRidableInWater = getBoolean("mobs.pillager.ridable-in-water", pillagerRidableInWater);
|
|
@@ -1285,6 +1313,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 boolean polarBearRidable = false;
|
|
@@ -1326,6 +1355,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() {
|
|
rabbitRidable = getBoolean("mobs.rabbit.ridable", rabbitRidable);
|
|
rabbitRidableInWater = getBoolean("mobs.rabbit.ridable-in-water", rabbitRidableInWater);
|
|
@@ -1338,11 +1368,13 @@ 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 double ravagerMaxHealth = 100.0D;
|
|
+ public boolean ravagerBypassMobGriefing = false;
|
|
private void ravagerSettings() {
|
|
ravagerRidable = getBoolean("mobs.ravager.ridable", ravagerRidable);
|
|
ravagerRidableInWater = getBoolean("mobs.ravager.ridable-in-water", ravagerRidableInWater);
|
|
@@ -1352,6 +1384,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 boolean salmonRidable = false;
|
|
@@ -1370,6 +1403,7 @@ public class PurpurWorldConfig {
|
|
public boolean sheepRidableInWater = false;
|
|
public double sheepMaxHealth = 8.0D;
|
|
public int sheepBreedingTicks = 6000;
|
|
+ public boolean sheepBypassMobGriefing = false;
|
|
private void sheepSettings() {
|
|
sheepRidable = getBoolean("mobs.sheep.ridable", sheepRidable);
|
|
sheepRidableInWater = getBoolean("mobs.sheep.ridable-in-water", sheepRidableInWater);
|
|
@@ -1380,6 +1414,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 boolean shulkerRidable = false;
|
|
@@ -1399,6 +1434,7 @@ public class PurpurWorldConfig {
|
|
public boolean silverfishRidable = false;
|
|
public boolean silverfishRidableInWater = false;
|
|
public double silverfishMaxHealth = 8.0D;
|
|
+ public boolean silverfishBypassMobGriefing = false;
|
|
private void silverfishSettings() {
|
|
silverfishRidable = getBoolean("mobs.silverfish.ridable", silverfishRidable);
|
|
silverfishRidableInWater = getBoolean("mobs.silverfish.ridable-in-water", silverfishRidableInWater);
|
|
@@ -1408,6 +1444,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 boolean skeletonRidable = false;
|
|
@@ -1475,6 +1512,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() {
|
|
snowGolemRidable = getBoolean("mobs.snow_golem.ridable", snowGolemRidable);
|
|
snowGolemRidableInWater = getBoolean("mobs.snow_golem.ridable-in-water", snowGolemRidableInWater);
|
|
@@ -1491,6 +1529,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 boolean squidRidable = false;
|
|
@@ -1642,6 +1681,7 @@ public class PurpurWorldConfig {
|
|
public int villagerBreedingTicks = 6000;
|
|
public boolean villagerClericsFarmWarts = false;
|
|
public boolean villagerClericFarmersThrowWarts = true;
|
|
+ public boolean villagerBypassMobGriefing = false;
|
|
private void villagerSettings() {
|
|
villagerRidable = getBoolean("mobs.villager.ridable", villagerRidable);
|
|
villagerRidableInWater = getBoolean("mobs.villager.ridable-in-water", villagerRidableInWater);
|
|
@@ -1661,6 +1701,7 @@ public class PurpurWorldConfig {
|
|
villagerBreedingTicks = getInt("mobs.villager.breeding-delay-ticks", villagerBreedingTicks);
|
|
villagerClericsFarmWarts = getBoolean("mobs.villager.clerics-farm-warts", villagerClericsFarmWarts);
|
|
villagerClericFarmersThrowWarts = getBoolean("mobs.villager.cleric-wart-farmers-throw-warts-at-villagers", villagerClericFarmersThrowWarts);
|
|
+ villagerBypassMobGriefing = getBoolean("mobs.villager.bypass-mob-griefing", villagerBypassMobGriefing);
|
|
}
|
|
|
|
public boolean vindicatorRidable = false;
|
|
@@ -1717,6 +1758,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() {
|
|
witherRidable = getBoolean("mobs.wither.ridable", witherRidable);
|
|
witherRidableInWater = getBoolean("mobs.wither.ridable-in-water", witherRidableInWater);
|
|
@@ -1733,6 +1775,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 boolean witherSkeletonRidable = false;
|
|
@@ -1797,6 +1840,7 @@ public class PurpurWorldConfig {
|
|
public double zombieJockeyChance = 0.05D;
|
|
public boolean zombieJockeyTryExistingChickens = true;
|
|
public boolean zombieAggressiveTowardsVillagerWhenLagging = true;
|
|
+ public boolean zombieBypassMobGriefing = false;
|
|
private void zombieSettings() {
|
|
zombieRidable = getBoolean("mobs.zombie.ridable", zombieRidable);
|
|
zombieRidableInWater = getBoolean("mobs.zombie.ridable-in-water", zombieRidableInWater);
|
|
@@ -1811,6 +1855,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 boolean zombieHorseRidableInWater = false;
|