Updated Upstream (Paper, Tuinity, & Airplane)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
bca97a8f7 replace spaces in world key (touches #5397)
de94f6485 Refactor chat message composition (#5396)
e27f334bb [CI-SKIP] Fix makemcdevsrc.sh for nms relocations (#5389)
ae15e85da Updated Upstream (CraftBukkit)
26fe0ac5a Only set despawnTimer for Wandering Traders spawned by MobSpawnerTrader (#5391)
b748eb7b8 Fix VanillaMobGoalTest#testBukkitMap (#5390)
18dbbb578 [Auto] Updated Upstream (CraftBukkit)
fac9cc5d5 [CI-SKIP] Ignore .gitignore
087aa70e7 Deprecate ItemStack#setLore(List<String>) and ItemStack#getLore, add Component based alternatives
9889c651c apply fixup
c310f0a61 Updated Upstream (Bukkit/CraftBukkit)
f17560ab0 wtf is this t file -jmp
347f3a9b8 fix compile
700e9e6a5 rebase
cf4dc464a Revert de5f4e469...c270abe96
6870db613 script & POM fix
743c6533c Replace ** with * (BSD/macOS)
376d7b097 Don't remove the .java
fcb3fd42a Fix macOS/BSD support
8cfc05249 Link correctly
ba1031ca7 Rename work dir
c8d844ab7 Actually fix preloading this time
e62aa5e3e Fix class preloading
1c03cf898 It's mojang math, not minecraft math
1034873df Apply fixups
39b125771 Use revision file
956150da7 Welcome to 1.16.5-R0.2
ccb217c01 Change cache keys
0d217001c more work
f6d820f07 It compiles
0f78e9525 More work
1718f61bf Updated Upstream (CraftBukkit/Spigot)
b28d46114 Update scripts for NMS repackaging

Tuinity Changes:
9bdcb9b8e Delete work dir when running jar
6351d7ca7 Update Upstream (Paper)
932c199a6 Generate md-dev correctly
bf3e73778 Make packet limiter work from IDE
1686f3861 Fix packet limiter config
f40f7b425 Update README.md styling (#264)
da1c3ace5 GH Actions Changes (#213)
5f325ecf1 Update Upstream (Paper)
0f83fe48d Update Upstream (Paper)

Airplane Changes:
f94d39947 Merge pull request #18 from notOM3GA/upstream/nms-repackage
0fc622631 Force build for Flare update
08439d6a9 Update Upstream (Tuinity)
This commit is contained in:
BillyGalbreath
2021-03-21 21:35:08 -05:00
parent 5bf86159f2
commit 1362f49b24
195 changed files with 17670 additions and 16826 deletions

View File

@@ -5,111 +5,81 @@ Subject: [PATCH] Add mobGriefing bypass to everything affected
This adds the "bypass-mob-griefing" world config option to everything that is affected by the gamerule.
diff --git a/src/main/java/net/minecraft/server/BlockCampfire.java b/src/main/java/net/minecraft/server/BlockCampfire.java
index 99decab11b3561edb0fea8964bfb97ccc997b772..e4cc567d28a5368f975e29c7d18dba007d914584 100644
--- a/src/main/java/net/minecraft/server/BlockCampfire.java
+++ b/src/main/java/net/minecraft/server/BlockCampfire.java
@@ -139,7 +139,7 @@ public class BlockCampfire extends BlockTileEntity implements IBlockWaterlogged
public void a(World world, IBlockData iblockdata, MovingObjectPositionBlock movingobjectpositionblock, IProjectile iprojectile) {
if (!world.isClientSide && iprojectile.isBurning()) {
Entity entity = iprojectile.getShooter();
- boolean flag = entity == null || entity instanceof EntityHuman || world.getGameRules().getBoolean(GameRules.MOB_GRIEFING);
+ boolean flag = entity == null || entity instanceof EntityHuman || world.purpurConfig.fireballsBypassMobGriefing || world.getGameRules().getBoolean(GameRules.MOB_GRIEFING); // Purpur
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index f3f528065eb9ee2f385edbaceeeddef39552485c..1e57358c02e67a6b062149926ada46696da24487 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -1571,7 +1571,7 @@ public abstract class EntityLiving extends Entity {
boolean flag = false;
if (flag && !(Boolean) iblockdata.get(BlockCampfire.LIT) && !(Boolean) iblockdata.get(BlockCampfire.d)) {
BlockPosition blockposition = movingobjectpositionblock.getBlockPosition();
diff --git a/src/main/java/net/minecraft/server/BlockCrops.java b/src/main/java/net/minecraft/server/BlockCrops.java
index 0fdc960fa3bbe6506185480a7a86d5009d70b385..d49c309d7c31b3be0a21544ba23c0fd663f3317b 100644
--- a/src/main/java/net/minecraft/server/BlockCrops.java
+++ b/src/main/java/net/minecraft/server/BlockCrops.java
@@ -144,7 +144,7 @@ public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement
if (this.killed && entityliving instanceof EntityWither) { // Paper
- if (this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
+ if (this.world.purpurConfig.witherBypassMobGriefing || this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) { // Purpur
BlockPosition blockposition = this.getChunkCoordinates();
IBlockData iblockdata = Blocks.WITHER_ROSE.getBlockData();
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalBreakDoor.java b/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalBreakDoor.java
index d785066e2a52699c18315f7244d80db6cab0c736..6c40b070c674f2b120b860b78a63d0a6635d2f5b 100644
--- a/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalBreakDoor.java
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalBreakDoor.java
@@ -34,7 +34,7 @@ public class PathfinderGoalBreakDoor extends PathfinderGoalDoorInteract {
@Override
public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
- if (entity instanceof EntityRavager && !CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.AIR.getBlockData(), !world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)).isCancelled()) { // CraftBukkit
+ if (entity instanceof EntityRavager && !CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.AIR.getBlockData(), (!world.purpurConfig.ravagerBypassMobGriefing && !world.getGameRules().getBoolean(GameRules.MOB_GRIEFING))).isCancelled()) { // CraftBukkit // Purpur
world.a(blockposition, true, entity);
}
public boolean a() {
- return !super.a() ? false : (!this.entity.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) ? false : this.a(this.entity.world.getDifficulty()) && !this.g());
+ return !super.a() ? false : ((!this.entity.world.purpurConfig.zombieBypassMobGriefing && !this.entity.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) ? false : this.a(this.entity.world.getDifficulty()) && !this.g()); // Purpur
}
diff --git a/src/main/java/net/minecraft/server/BlockSoil.java b/src/main/java/net/minecraft/server/BlockSoil.java
index 099e0d3df219408ebe2a741a02e53eb9f7def28e..73dc0f499c456c21d298013fbab8c79ebcdecd6b 100644
--- a/src/main/java/net/minecraft/server/BlockSoil.java
+++ b/src/main/java/net/minecraft/server/BlockSoil.java
@@ -76,7 +76,7 @@ public class BlockSoil extends Block {
@Override
public void fallOn(World world, BlockPosition blockposition, Entity entity, float f) {
super.fallOn(world, blockposition, entity, f); // CraftBukkit - moved here as game rules / events shouldn't affect fall damage.
- if (!world.isClientSide && world.random.nextFloat() < f - 0.5F && entity instanceof EntityLiving && (entity instanceof EntityHuman || world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) && entity.getWidth() * entity.getWidth() * entity.getHeight() > 0.512F) {
+ if (!world.isClientSide && world.random.nextFloat() < f - 0.5F && entity instanceof EntityLiving && (entity instanceof EntityHuman || world.purpurConfig.farmlandBypassMobGriefing || world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) && entity.getWidth() * entity.getWidth() * entity.getHeight() > 0.512F) { // Purpur
// CraftBukkit start - Interact soil
org.bukkit.event.Cancellable cancellable;
if (entity instanceof EntityHuman) {
diff --git a/src/main/java/net/minecraft/server/BlockTurtleEgg.java b/src/main/java/net/minecraft/server/BlockTurtleEgg.java
index 0f147dc938cef428452bd3137c68b52a78f9fbde..276aac9afd5d987cf388a87718453c4737049073 100644
--- a/src/main/java/net/minecraft/server/BlockTurtleEgg.java
+++ b/src/main/java/net/minecraft/server/BlockTurtleEgg.java
@@ -177,7 +177,7 @@ public class BlockTurtleEgg extends Block {
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalEatTile.java b/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalEatTile.java
index 6737dd77c8f46edf353f951b5adb4399142a1753..06dbce54602d02382e9d47b7e6925cfc686d26f6 100644
--- a/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalEatTile.java
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalEatTile.java
@@ -19,7 +19,7 @@ public class PathfinderGoalEatTile extends PathfinderGoal {
private static final Predicate<IBlockData> a = BlockStatePredicate.a(Blocks.GRASS);
private final EntityInsentient b;
- private final World c;
+ private final World c; private final World getWorld() { return c; } // Purpur - OBFHELPER
private int d;
public PathfinderGoalEatTile(EntityInsentient entityinsentient) {
@@ -68,7 +68,7 @@ public class PathfinderGoalEatTile extends PathfinderGoal {
if (PathfinderGoalEatTile.a.test(this.c.getType(blockposition))) {
// CraftBukkit
- if (!CraftEventFactory.callEntityChangeBlockEvent(this.b, blockposition, Blocks.AIR.getBlockData(), !this.c.getGameRules().getBoolean(GameRules.MOB_GRIEFING)).isCancelled()) {
+ if (!CraftEventFactory.callEntityChangeBlockEvent(this.b, blockposition, Blocks.AIR.getBlockData(), !this.getWorld().purpurConfig.sheepBypassMobGriefing && !this.c.getGameRules().getBoolean(GameRules.MOB_GRIEFING)).isCancelled()) { // Purpur
this.c.b(blockposition, false);
}
@@ -78,7 +78,7 @@ public class PathfinderGoalEatTile extends PathfinderGoal {
if (this.c.getType(blockposition1).a(Blocks.GRASS_BLOCK)) {
// CraftBukkit
- if (!CraftEventFactory.callEntityChangeBlockEvent(this.b, blockposition, Blocks.AIR.getBlockData(), !this.c.getGameRules().getBoolean(GameRules.MOB_GRIEFING)).isCancelled()) {
+ if (!CraftEventFactory.callEntityChangeBlockEvent(this.b, blockposition, Blocks.AIR.getBlockData(), !this.getWorld().purpurConfig.sheepBypassMobGriefing && !this.c.getGameRules().getBoolean(GameRules.MOB_GRIEFING)).isCancelled()) { // Purpur
this.c.triggerEffect(2001, blockposition1, Block.getCombinedId(Blocks.GRASS_BLOCK.getBlockData()));
this.c.setTypeAndData(blockposition1, Blocks.DIRT.getBlockData(), 2);
}
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalRemoveBlock.java b/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalRemoveBlock.java
index 61a62c093b24c43064f116630d85096159e082d3..2519a78f7e5dd759680a1f47a1047885d4ad32f1 100644
--- a/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalRemoveBlock.java
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalRemoveBlock.java
@@ -41,7 +41,7 @@ public class PathfinderGoalRemoveBlock extends PathfinderGoalGotoTarget {
@Override
public boolean a() {
- if (!this.entity.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
+ if (!this.entity.world.purpurConfig.zombieBypassMobGriefing && !this.entity.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) { // Purpur
return false;
}
if (entity instanceof EntityLiving && !(entity instanceof EntityHuman)) {
- return world.getGameRules().getBoolean(GameRules.MOB_GRIEFING);
+ return world.purpurConfig.turtleEggsBypassMobGriefing || world.getGameRules().getBoolean(GameRules.MOB_GRIEFING); // Purpur
}
return true;
// Purpur end
diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
index 75e834caaf7bb64a3d51d793e86aa702f6ccb0ae..e2377c6e8a98be431953533bf0b2060028caad45 100644
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
@@ -489,7 +489,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster {
Block block = iblockdata.getBlock();
if (!iblockdata.isAir() && iblockdata.getMaterial() != Material.FIRE) {
- if (this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) && !TagsBlock.DRAGON_IMMUNE.isTagged(block)) {
+ if ((this.world.purpurConfig.enderDragonBypassMobGriefing || this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) && !TagsBlock.DRAGON_IMMUNE.isTagged(block)) { // Purpur
// CraftBukkit start - Add blocks to list rather than destroying them
// flag1 = this.world.a(blockposition, false) || flag1;
flag1 = true;
diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java
index c03232ac1e2b450b64430f8d56bfebd30fa37155..4d575d29cd446cd65cea7cdeb2541e0c3112d660 100644
--- a/src/main/java/net/minecraft/server/EntityEnderman.java
+++ b/src/main/java/net/minecraft/server/EntityEnderman.java
@@ -399,7 +399,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable {
@Override
public boolean a() {
if (!enderman.world.purpurConfig.endermanAllowGriefing) return false; // Purpur
- return this.enderman.getCarried() != null ? false : (!this.enderman.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) ? false : this.enderman.getRandom().nextInt(20) == 0);
+ return this.enderman.getCarried() != null ? false : (!this.enderman.world.purpurConfig.endermanBypassMobGriefing && !this.enderman.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) ? false : this.enderman.getRandom().nextInt(20) == 0); // Purpur
}
@Override
@@ -442,7 +442,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable {
@Override
public boolean a() {
if (!getEnderman().world.purpurConfig.endermanAllowGriefing) return false; // Purpur
- return this.a.getCarried() == null ? false : (!this.a.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) ? false : this.a.getRandom().nextInt(2000) == 0);
+ return this.a.getCarried() == null ? false : (!this.a.world.purpurConfig.endermanBypassMobGriefing && !this.a.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) ? false : this.a.getRandom().nextInt(2000) == 0); // Purpur
}
@Override
diff --git a/src/main/java/net/minecraft/server/EntityEvoker.java b/src/main/java/net/minecraft/server/EntityEvoker.java
index f0ecc6e6ef5843714a6423af5d6619856ef23977..5f24c36bf45a656e220475449113786732a47c56 100644
--- a/src/main/java/net/minecraft/server/EntityEvoker.java
+++ b/src/main/java/net/minecraft/server/EntityEvoker.java
@@ -134,7 +134,7 @@ public class EntityEvoker extends EntityIllagerWizard {
return false;
} else if (EntityEvoker.this.ticksLived < this.c) {
return false;
- } else if (!EntityEvoker.this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
+ } else if (!EntityEvoker.this.world.purpurConfig.evokerBypassMobGriefing && !EntityEvoker.this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) { // Purpur
return false;
} else {
List<EntitySheep> list = EntityEvoker.this.world.a(EntitySheep.class, this.e, EntityEvoker.this, EntityEvoker.this.getBoundingBox().grow(16.0D, 4.0D, 16.0D));
diff --git a/src/main/java/net/minecraft/server/EntityFox.java b/src/main/java/net/minecraft/server/EntityFox.java
index 7a3fb7a41e987adee675fbfd11f2648cf5de3e53..ff78bd607f19a1b9f37281946db3f705c844f7cc 100644
--- a/src/main/java/net/minecraft/server/EntityFox.java
+++ b/src/main/java/net/minecraft/server/EntityFox.java
@@ -1002,7 +1002,7 @@ public class EntityFox extends EntityAnimal {
} else if (this.c > 0) {
--this.c;
diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityFox.java b/src/main/java/net/minecraft/world/entity/animal/EntityFox.java
index b8b0ee65798dc94d707fa64bd53fdda5506331d9..355735c2efbba62481d059b8e733c9c70e834be1 100644
--- a/src/main/java/net/minecraft/world/entity/animal/EntityFox.java
+++ b/src/main/java/net/minecraft/world/entity/animal/EntityFox.java
@@ -1075,7 +1075,7 @@ public class EntityFox extends EntityAnimal {
}
protected void n() {
@@ -118,11 +88,142 @@ index 7a3fb7a41e987adee675fbfd11f2648cf5de3e53..ff78bd607f19a1b9f37281946db3f705
IBlockData iblockdata = EntityFox.this.world.getType(this.e);
if (iblockdata.a(Blocks.SWEET_BERRY_BUSH)) {
diff --git a/src/main/java/net/minecraft/server/EntityLargeFireball.java b/src/main/java/net/minecraft/server/EntityLargeFireball.java
index d12de20cf4bb2345c616d3cc0b9f50bddb5135ee..3f3be1b2ded6ad118ae7860c1231c7affc0715b6 100644
--- a/src/main/java/net/minecraft/server/EntityLargeFireball.java
+++ b/src/main/java/net/minecraft/server/EntityLargeFireball.java
@@ -8,19 +8,19 @@ public class EntityLargeFireball extends EntityFireballFireball {
diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityRabbit.java b/src/main/java/net/minecraft/world/entity/animal/EntityRabbit.java
index 284c52276b2fd816990c23b7b8a9ee50e70ab005..acb4c79b23fada090c5605cd352a573bdb0667bf 100644
--- a/src/main/java/net/minecraft/world/entity/animal/EntityRabbit.java
+++ b/src/main/java/net/minecraft/world/entity/animal/EntityRabbit.java
@@ -518,7 +518,7 @@ public class EntityRabbit extends EntityAnimal {
@Override
public boolean a() {
if (this.c <= 0) {
- if (!this.entity.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
+ if (!this.entity.world.purpurConfig.rabbitBypassMobGriefing && !this.entity.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) { // Purpur
return false;
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/EntitySnowman.java b/src/main/java/net/minecraft/world/entity/animal/EntitySnowman.java
index 88db8ff8cb415b84ab98cc0550c705d5a472230c..17f27d2bf5be746a0fa0e1e0fecab8158b2b3587 100644
--- a/src/main/java/net/minecraft/world/entity/animal/EntitySnowman.java
+++ b/src/main/java/net/minecraft/world/entity/animal/EntitySnowman.java
@@ -123,7 +123,7 @@ public class EntitySnowman extends EntityGolem implements IShearable, IRangedEnt
this.damageEntity(CraftEventFactory.MELTING, 1.0F); // CraftBukkit - DamageSource.BURN -> CraftEventFactory.MELTING
}
- if (!this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
+ if (!this.world.purpurConfig.snowGolemBypassMobGriefing && !this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) { // Purpur
return;
}
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java
index 999a6d17eccd6305c0063e1558abfe70d72c39fe..a81d782877ff6116477792fa4cec0846e56ed384 100644
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java
@@ -539,7 +539,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster {
Block block = iblockdata.getBlock();
if (!iblockdata.isAir() && iblockdata.getMaterial() != Material.FIRE) {
- if (this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) && !TagsBlock.DRAGON_IMMUNE.isTagged(block)) {
+ if ((this.world.purpurConfig.enderDragonBypassMobGriefing || this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) && !TagsBlock.DRAGON_IMMUNE.isTagged(block)) { // Purpur
// CraftBukkit start - Add blocks to list rather than destroying them
// flag1 = this.world.a(blockposition, false) || flag1;
flag1 = true;
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/EntityWither.java b/src/main/java/net/minecraft/world/entity/boss/wither/EntityWither.java
index beb4d59faf4bd7501468b2eaa0e866613625e963..fa6b72c7a12b20f8ccffa360a3895e4d8f4277e4 100644
--- a/src/main/java/net/minecraft/world/entity/boss/wither/EntityWither.java
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/EntityWither.java
@@ -380,7 +380,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
if (this.getInvul() > 0) {
i = this.getInvul() - 1;
if (i <= 0) {
- Explosion.Effect explosion_effect = this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) ? Explosion.Effect.DESTROY : Explosion.Effect.NONE;
+ Explosion.Effect explosion_effect = (this.world.purpurConfig.witherBypassMobGriefing || this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) ? Explosion.Effect.DESTROY : Explosion.Effect.NONE; // Purpur
// CraftBukkit start
// this.world.createExplosion(this, this.locX(), this.getHeadY(), this.locZ(), 7.0F, false, explosion_effect);
ExplosionPrimeEvent event = new ExplosionPrimeEvent(this.getBukkitEntity(), 7.0F, false);
@@ -492,7 +492,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
if (this.bw > 0) {
--this.bw;
- if (this.bw == 0 && this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
+ if (this.bw == 0 && (this.world.purpurConfig.witherBypassMobGriefing || this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING))) { // Purpur
i = MathHelper.floor(this.locY());
j = MathHelper.floor(this.locX());
int j1 = MathHelper.floor(this.locZ());
diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java
index 478ac5bfdc69b5c3e24906bb5e0ea1dff81cea98..ea500a6080f73dcc35d83a3b5a170f57dedaa431 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java
@@ -455,7 +455,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable {
@Override
public boolean a() {
if (!enderman.world.purpurConfig.endermanAllowGriefing) return false; // Purpur
- return this.enderman.getCarried() != null ? false : (!this.enderman.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) ? false : this.enderman.getRandom().nextInt(20) == 0);
+ return this.enderman.getCarried() != null ? false : (!this.enderman.world.purpurConfig.endermanBypassMobGriefing && !this.enderman.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) ? false : this.enderman.getRandom().nextInt(20) == 0); // Purpur
}
@Override
@@ -498,7 +498,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable {
@Override
public boolean a() {
if (!getEnderman().world.purpurConfig.endermanAllowGriefing) return false; // Purpur
- return this.a.getCarried() == null ? false : (!this.a.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) ? false : this.a.getRandom().nextInt(2000) == 0);
+ return this.a.getCarried() == null ? false : (!this.a.world.purpurConfig.endermanBypassMobGriefing && !this.a.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) ? false : this.a.getRandom().nextInt(2000) == 0); // Purpur
}
@Override
diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityEvoker.java b/src/main/java/net/minecraft/world/entity/monster/EntityEvoker.java
index 8d7b8d2ac9a7340e2cfd0d1b8963e4e4d97e8bc8..8a219ac18307c715913f5c2a80b1ff35a2ea8b93 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EntityEvoker.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EntityEvoker.java
@@ -171,7 +171,7 @@ public class EntityEvoker extends EntityIllagerWizard {
return false;
} else if (EntityEvoker.this.ticksLived < this.c) {
return false;
- } else if (!EntityEvoker.this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
+ } else if (!EntityEvoker.this.world.purpurConfig.evokerBypassMobGriefing && !EntityEvoker.this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) { // Purpur
return false;
} else {
List<EntitySheep> list = EntityEvoker.this.world.a(EntitySheep.class, this.e, EntityEvoker.this, EntityEvoker.this.getBoundingBox().grow(16.0D, 4.0D, 16.0D));
diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityRavager.java b/src/main/java/net/minecraft/world/entity/monster/EntityRavager.java
index 80c3cd540a46e249e85586e8d7a2f0f6226091fc..6809c93fe435d183a27204fb4460fd68a86aa04f 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EntityRavager.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EntityRavager.java
@@ -179,7 +179,7 @@ public class EntityRavager extends EntityRaider {
this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(MathHelper.d(0.1D, d1, d0));
}
- if (this.positionChanged && this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
+ if (this.positionChanged && (this.world.purpurConfig.ravagerBypassMobGriefing || this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING))) { // Purpur
boolean flag = false;
AxisAlignedBB axisalignedbb = this.getBoundingBox().g(0.2D);
Iterator iterator = BlockPosition.b(MathHelper.floor(axisalignedbb.minX), MathHelper.floor(axisalignedbb.minY), MathHelper.floor(axisalignedbb.minZ), MathHelper.floor(axisalignedbb.maxX), MathHelper.floor(axisalignedbb.maxY), MathHelper.floor(axisalignedbb.maxZ)).iterator();
diff --git a/src/main/java/net/minecraft/world/entity/monster/EntitySilverfish.java b/src/main/java/net/minecraft/world/entity/monster/EntitySilverfish.java
index a0a1e5977a3cbc8e9befd827dd1e15352a2c0c39..cbdb512c924ac54e925f8c52558d24d3286d31ce 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EntitySilverfish.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EntitySilverfish.java
@@ -172,7 +172,7 @@ public class EntitySilverfish extends EntityMonster {
} else {
Random random = this.a.getRandom();
- if (this.a.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) && random.nextInt(10) == 0) {
+ if ((this.a.world.purpurConfig.silverfishBypassMobGriefing || this.a.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) && random.nextInt(10) == 0) { // Purpur
this.h = EnumDirection.a(random);
BlockPosition blockposition = (new BlockPosition(this.a.locX(), this.a.locY() + 0.5D, this.a.locZ())).shift(this.h);
IBlockData iblockdata = this.a.world.getType(blockposition);
@@ -260,7 +260,7 @@ public class EntitySilverfish extends EntityMonster {
continue;
}
// CraftBukkit end
- if (world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
+ if (world.purpurConfig.silverfishBypassMobGriefing || world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) { // Purpur
world.a(blockposition1, true, this.silverfish);
} else {
world.setTypeAndData(blockposition1, ((BlockMonsterEggs) block).c().getBlockData(), 3);
diff --git a/src/main/java/net/minecraft/world/entity/projectile/EntityLargeFireball.java b/src/main/java/net/minecraft/world/entity/projectile/EntityLargeFireball.java
index e860737bacfea0a1d728dbaaf41d62165658ad89..61f06eacb4ea4ef869b60c9014cc23b25583eead 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/EntityLargeFireball.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/EntityLargeFireball.java
@@ -19,19 +19,19 @@ public class EntityLargeFireball extends EntityFireballFireball {
public EntityLargeFireball(EntityTypes<? extends EntityLargeFireball> entitytypes, World world) {
super(entitytypes, world);
@@ -145,85 +246,11 @@ index d12de20cf4bb2345c616d3cc0b9f50bddb5135ee..3f3be1b2ded6ad118ae7860c1231c7af
// CraftBukkit start - fire ExplosionPrimeEvent
ExplosionPrimeEvent event = new ExplosionPrimeEvent((org.bukkit.entity.Explosive) this.getBukkitEntity());
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 96e9be81429aa7bf215d2c2cdf865606e3a2707c..8b8e6b8cfbdc591eb8681bc672975ae6198ef263 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -1475,7 +1475,7 @@ public abstract class EntityLiving extends Entity {
boolean flag = false;
if (this.killed && entityliving instanceof EntityWither) { // Paper
- if (this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
+ if (this.world.purpurConfig.witherBypassMobGriefing || this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) { // Purpur
BlockPosition blockposition = this.getChunkCoordinates();
IBlockData iblockdata = Blocks.WITHER_ROSE.getBlockData();
diff --git a/src/main/java/net/minecraft/server/EntityRabbit.java b/src/main/java/net/minecraft/server/EntityRabbit.java
index 75f42e91449de71e154e2169ea986ff09224e2f0..9017e56d4ecff810b07271362dce1c1354a3404d 100644
--- a/src/main/java/net/minecraft/server/EntityRabbit.java
+++ b/src/main/java/net/minecraft/server/EntityRabbit.java
@@ -462,7 +462,7 @@ public class EntityRabbit extends EntityAnimal {
@Override
public boolean a() {
if (this.c <= 0) {
- if (!this.entity.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
+ if (!this.entity.world.purpurConfig.rabbitBypassMobGriefing && !this.entity.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) { // Purpur
return false;
}
diff --git a/src/main/java/net/minecraft/server/EntityRaider.java b/src/main/java/net/minecraft/server/EntityRaider.java
index ad2a2c27f0ef064064ded28cc049a6856d476808..e07f224289a937689a26d58639899abbfd6a6302 100644
--- a/src/main/java/net/minecraft/server/EntityRaider.java
+++ b/src/main/java/net/minecraft/server/EntityRaider.java
@@ -496,7 +496,7 @@ public abstract class EntityRaider extends EntityMonsterPatrolling {
@Override
public boolean a() {
- if (!getRaider().world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) || !getRaider().canPickupLoot()) return false; // Paper - respect game and entity rules for picking up items
+ if ((!getRaider().world.purpurConfig.pillagerBypassMobGriefing && !getRaider().world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) || !getRaider().canPickupLoot()) return false; // Paper - respect game and entity rules for picking up items // Purpur
Raid raid = this.b.fa();
if (this.b.fb() && !this.b.fa().a() && this.b.eN() && !ItemStack.matches(this.b.getEquipment(EnumItemSlot.HEAD), Raid.s())) {
diff --git a/src/main/java/net/minecraft/server/EntityRavager.java b/src/main/java/net/minecraft/server/EntityRavager.java
index 820938c76e787fac6c65eb000491232d5b749dee..3606440e41ab3193fadebb455c0967dbc0ccbb63 100644
--- a/src/main/java/net/minecraft/server/EntityRavager.java
+++ b/src/main/java/net/minecraft/server/EntityRavager.java
@@ -137,7 +137,7 @@ public class EntityRavager extends EntityRaider {
this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(MathHelper.d(0.1D, d1, d0));
}
- if (this.positionChanged && this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
+ if (this.positionChanged && (this.world.purpurConfig.ravagerBypassMobGriefing || this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING))) { // Purpur
boolean flag = false;
AxisAlignedBB axisalignedbb = this.getBoundingBox().g(0.2D);
Iterator iterator = BlockPosition.b(MathHelper.floor(axisalignedbb.minX), MathHelper.floor(axisalignedbb.minY), MathHelper.floor(axisalignedbb.minZ), MathHelper.floor(axisalignedbb.maxX), MathHelper.floor(axisalignedbb.maxY), MathHelper.floor(axisalignedbb.maxZ)).iterator();
diff --git a/src/main/java/net/minecraft/server/EntitySilverfish.java b/src/main/java/net/minecraft/server/EntitySilverfish.java
index 6bd00f0b5735d694e370cf85fdbf508c31fc7c27..9ccb7a805adf8c1e429f3fab2bc261c4dad5eda8 100644
--- a/src/main/java/net/minecraft/server/EntitySilverfish.java
+++ b/src/main/java/net/minecraft/server/EntitySilverfish.java
@@ -144,7 +144,7 @@ public class EntitySilverfish extends EntityMonster {
} else {
Random random = this.a.getRandom();
- if (this.a.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) && random.nextInt(10) == 0) {
+ if ((this.a.world.purpurConfig.silverfishBypassMobGriefing || this.a.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) && random.nextInt(10) == 0) { // Purpur
this.h = EnumDirection.a(random);
BlockPosition blockposition = (new BlockPosition(this.a.locX(), this.a.locY() + 0.5D, this.a.locZ())).shift(this.h);
IBlockData iblockdata = this.a.world.getType(blockposition);
@@ -232,7 +232,7 @@ public class EntitySilverfish extends EntityMonster {
continue;
}
// CraftBukkit end
- if (world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
+ if (world.purpurConfig.silverfishBypassMobGriefing || world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) { // Purpur
world.a(blockposition1, true, this.silverfish);
} else {
world.setTypeAndData(blockposition1, ((BlockMonsterEggs) block).c().getBlockData(), 3);
diff --git a/src/main/java/net/minecraft/server/EntitySmallFireball.java b/src/main/java/net/minecraft/server/EntitySmallFireball.java
index 4ed7a20bfed267776628457a4b33178bac7d1972..e7e12ce2338102b875444c3f3cc767858de38dca 100644
--- a/src/main/java/net/minecraft/server/EntitySmallFireball.java
+++ b/src/main/java/net/minecraft/server/EntitySmallFireball.java
@@ -12,7 +12,7 @@ public class EntitySmallFireball extends EntityFireballFireball {
diff --git a/src/main/java/net/minecraft/world/entity/projectile/EntitySmallFireball.java b/src/main/java/net/minecraft/world/entity/projectile/EntitySmallFireball.java
index bf747cbf6e1ef9ea9d1d41d0441b29a46ce874c0..53e02e512b8bcebac105e421991b3554a7ad699a 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/EntitySmallFireball.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/EntitySmallFireball.java
@@ -26,7 +26,7 @@ public class EntitySmallFireball extends EntityFireballFireball {
super(EntityTypes.SMALL_FIREBALL, entityliving, d0, d1, d2, world);
// CraftBukkit start
if (this.getShooter() != null && this.getShooter() instanceof EntityInsentient) {
@@ -232,46 +259,11 @@ index 4ed7a20bfed267776628457a4b33178bac7d1972..e7e12ce2338102b875444c3f3cc76785
}
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/EntitySnowman.java b/src/main/java/net/minecraft/server/EntitySnowman.java
index 1dd13dfea91a05b1e83b065328092a17d41a605f..eb6344a5671408ae9fdd6013774baa13addf304b 100644
--- a/src/main/java/net/minecraft/server/EntitySnowman.java
+++ b/src/main/java/net/minecraft/server/EntitySnowman.java
@@ -86,7 +86,7 @@ public class EntitySnowman extends EntityGolem implements IShearable, IRangedEnt
this.damageEntity(CraftEventFactory.MELTING, 1.0F); // CraftBukkit - DamageSource.BURN -> CraftEventFactory.MELTING
}
- if (!this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
+ if (!this.world.purpurConfig.snowGolemBypassMobGriefing && !this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) { // Purpur
return;
}
diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java
index edc58c5cb178ea9a53f960bd4a460f394b13ab64..27bfef57cfa1386e81c6409be49ea6898057e631 100644
--- a/src/main/java/net/minecraft/server/EntityWither.java
+++ b/src/main/java/net/minecraft/server/EntityWither.java
@@ -323,7 +323,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
if (this.getInvul() > 0) {
i = this.getInvul() - 1;
if (i <= 0) {
- Explosion.Effect explosion_effect = this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) ? Explosion.Effect.DESTROY : Explosion.Effect.NONE;
+ Explosion.Effect explosion_effect = (this.world.purpurConfig.witherBypassMobGriefing || this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) ? Explosion.Effect.DESTROY : Explosion.Effect.NONE; // Purpur
// CraftBukkit start
// this.world.createExplosion(this, this.locX(), this.getHeadY(), this.locZ(), 7.0F, false, explosion_effect);
ExplosionPrimeEvent event = new ExplosionPrimeEvent(this.getBukkitEntity(), 7.0F, false);
@@ -435,7 +435,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
if (this.bw > 0) {
--this.bw;
- if (this.bw == 0 && this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
+ if (this.bw == 0 && (this.world.purpurConfig.witherBypassMobGriefing || this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING))) { // Purpur
i = MathHelper.floor(this.locY());
j = MathHelper.floor(this.locX());
int j1 = MathHelper.floor(this.locZ());
diff --git a/src/main/java/net/minecraft/server/EntityWitherSkull.java b/src/main/java/net/minecraft/server/EntityWitherSkull.java
index 4a97a7517dc1a2a25c578d9e168240cc19ab0831..fedc78e4111864d1413e6fcd588b9951595b463a 100644
--- a/src/main/java/net/minecraft/server/EntityWitherSkull.java
+++ b/src/main/java/net/minecraft/server/EntityWitherSkull.java
@@ -73,7 +73,7 @@ public class EntityWitherSkull extends EntityFireball {
diff --git a/src/main/java/net/minecraft/world/entity/projectile/EntityWitherSkull.java b/src/main/java/net/minecraft/world/entity/projectile/EntityWitherSkull.java
index 2fe0e32a1158cccb3060f5a986c9fc41a0237aa8..616b5267d1d94b2be37ec48983b45e4478502fb5 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/EntityWitherSkull.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/EntityWitherSkull.java
@@ -94,7 +94,7 @@ public class EntityWitherSkull extends EntityFireball {
protected void a(MovingObjectPosition movingobjectposition) {
super.a(movingobjectposition);
if (!this.world.isClientSide) {
@@ -280,65 +272,73 @@ index 4a97a7517dc1a2a25c578d9e168240cc19ab0831..fedc78e4111864d1413e6fcd588b9951
// CraftBukkit start
// this.world.createExplosion(this, this.locX(), this.locY(), this.locZ(), 1.0F, false, explosion_effect);
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalBreakDoor.java b/src/main/java/net/minecraft/server/PathfinderGoalBreakDoor.java
index 23870a271b759a953a095df835e08ea2a09f4218..c31bacf786ea750e922c938c042656515d8b0041 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalBreakDoor.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalBreakDoor.java
@@ -27,7 +27,7 @@ public class PathfinderGoalBreakDoor extends PathfinderGoalDoorInteract {
diff --git a/src/main/java/net/minecraft/world/entity/raid/EntityRaider.java b/src/main/java/net/minecraft/world/entity/raid/EntityRaider.java
index ff41ee884e3e46af1b1e9fb550f0abc6998fd031..8eec32af12c69e1963dcd304a25ec4811b2f1f5a 100644
--- a/src/main/java/net/minecraft/world/entity/raid/EntityRaider.java
+++ b/src/main/java/net/minecraft/world/entity/raid/EntityRaider.java
@@ -532,7 +532,7 @@ public abstract class EntityRaider extends EntityMonsterPatrolling {
@Override
public boolean a() {
- if (!getRaider().world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) || !getRaider().canPickupLoot()) return false; // Paper - respect game and entity rules for picking up items
+ if ((!getRaider().world.purpurConfig.pillagerBypassMobGriefing && !getRaider().world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) || !getRaider().canPickupLoot()) return false; // Paper - respect game and entity rules for picking up items // Purpur
Raid raid = this.b.fa();
if (this.b.fb() && !this.b.fa().a() && this.b.eN() && !ItemStack.matches(this.b.getEquipment(EnumItemSlot.HEAD), Raid.s())) {
diff --git a/src/main/java/net/minecraft/world/level/block/BlockCampfire.java b/src/main/java/net/minecraft/world/level/block/BlockCampfire.java
index 21baa8fb99b0587da503e14e2b04abf3134d03bc..3f816358758165bf5e346eaffcb3edc46c48dd40 100644
--- a/src/main/java/net/minecraft/world/level/block/BlockCampfire.java
+++ b/src/main/java/net/minecraft/world/level/block/BlockCampfire.java
@@ -181,7 +181,7 @@ public class BlockCampfire extends BlockTileEntity implements IBlockWaterlogged
public void a(World world, IBlockData iblockdata, MovingObjectPositionBlock movingobjectpositionblock, IProjectile iprojectile) {
if (!world.isClientSide && iprojectile.isBurning()) {
Entity entity = iprojectile.getShooter();
- boolean flag = entity == null || entity instanceof EntityHuman || world.getGameRules().getBoolean(GameRules.MOB_GRIEFING);
+ boolean flag = entity == null || entity instanceof EntityHuman || world.purpurConfig.fireballsBypassMobGriefing || world.getGameRules().getBoolean(GameRules.MOB_GRIEFING); // Purpur
if (flag && !(Boolean) iblockdata.get(BlockCampfire.LIT) && !(Boolean) iblockdata.get(BlockCampfire.d)) {
BlockPosition blockposition = movingobjectpositionblock.getBlockPosition();
diff --git a/src/main/java/net/minecraft/world/level/block/BlockCrops.java b/src/main/java/net/minecraft/world/level/block/BlockCrops.java
index 09f15d9087f1c40e5d50cb56f8c764ddaa992e41..5f8366beeaac7153a0421554f9bf91fbf265edca 100644
--- a/src/main/java/net/minecraft/world/level/block/BlockCrops.java
+++ b/src/main/java/net/minecraft/world/level/block/BlockCrops.java
@@ -160,7 +160,7 @@ public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement
@Override
public boolean a() {
- return !super.a() ? false : (!this.entity.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) ? false : this.a(this.entity.world.getDifficulty()) && !this.g());
+ return !super.a() ? false : ((!this.entity.world.purpurConfig.zombieBypassMobGriefing && !this.entity.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) ? false : this.a(this.entity.world.getDifficulty()) && !this.g()); // Purpur
}
public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
- if (entity instanceof EntityRavager && !CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.AIR.getBlockData(), !world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)).isCancelled()) { // CraftBukkit
+ if (entity instanceof EntityRavager && !CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.AIR.getBlockData(), (!world.purpurConfig.ravagerBypassMobGriefing && !world.getGameRules().getBoolean(GameRules.MOB_GRIEFING))).isCancelled()) { // CraftBukkit // Purpur
world.a(blockposition, true, entity);
}
diff --git a/src/main/java/net/minecraft/world/level/block/BlockSoil.java b/src/main/java/net/minecraft/world/level/block/BlockSoil.java
index 3e8893bf76b8ffda4c595c81086556ea929beaa4..d3fd0b418b9088b621e44f5da452db74b433efe8 100644
--- a/src/main/java/net/minecraft/world/level/block/BlockSoil.java
+++ b/src/main/java/net/minecraft/world/level/block/BlockSoil.java
@@ -99,7 +99,7 @@ public class BlockSoil extends Block {
@Override
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java b/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java
index b7e1e7e35a33cf6a476b11284ebdb0cdda524af2..9e8f720ee0a39ccc27d671df4ae83ef404788a2f 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java
@@ -11,7 +11,7 @@ public class PathfinderGoalEatTile extends PathfinderGoal {
private static final Predicate<IBlockData> a = BlockStatePredicate.a(Blocks.GRASS);
private final EntityInsentient b;
- private final World c;
+ private final World c; private final World getWorld() { return c; } // Purpur - OBFHELPER
private int d;
public PathfinderGoalEatTile(EntityInsentient entityinsentient) {
@@ -60,7 +60,7 @@ public class PathfinderGoalEatTile extends PathfinderGoal {
if (PathfinderGoalEatTile.a.test(this.c.getType(blockposition))) {
// CraftBukkit
- if (!CraftEventFactory.callEntityChangeBlockEvent(this.b, blockposition, Blocks.AIR.getBlockData(), !this.c.getGameRules().getBoolean(GameRules.MOB_GRIEFING)).isCancelled()) {
+ if (!CraftEventFactory.callEntityChangeBlockEvent(this.b, blockposition, Blocks.AIR.getBlockData(), !this.getWorld().purpurConfig.sheepBypassMobGriefing && !this.c.getGameRules().getBoolean(GameRules.MOB_GRIEFING)).isCancelled()) { // Purpur
this.c.b(blockposition, false);
}
@@ -70,7 +70,7 @@ public class PathfinderGoalEatTile extends PathfinderGoal {
if (this.c.getType(blockposition1).a(Blocks.GRASS_BLOCK)) {
// CraftBukkit
- if (!CraftEventFactory.callEntityChangeBlockEvent(this.b, blockposition, Blocks.AIR.getBlockData(), !this.c.getGameRules().getBoolean(GameRules.MOB_GRIEFING)).isCancelled()) {
+ if (!CraftEventFactory.callEntityChangeBlockEvent(this.b, blockposition, Blocks.AIR.getBlockData(), !this.getWorld().purpurConfig.sheepBypassMobGriefing && !this.c.getGameRules().getBoolean(GameRules.MOB_GRIEFING)).isCancelled()) { // Purpur
this.c.triggerEffect(2001, blockposition1, Block.getCombinedId(Blocks.GRASS_BLOCK.getBlockData()));
this.c.setTypeAndData(blockposition1, Blocks.DIRT.getBlockData(), 2);
}
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java b/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java
index 6ea402c603b9b54705e79a2fdc61fe5a254479a3..0119eb85fbb2aa85b402f7e0ff712e83c79880a4 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java
@@ -24,7 +24,7 @@ public class PathfinderGoalRemoveBlock extends PathfinderGoalGotoTarget {
@Override
public boolean a() {
- if (!this.entity.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
+ if (!this.entity.world.purpurConfig.zombieBypassMobGriefing && !this.entity.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) { // Purpur
public void fallOn(World world, BlockPosition blockposition, Entity entity, float f) {
super.fallOn(world, blockposition, entity, f); // CraftBukkit - moved here as game rules / events shouldn't affect fall damage.
- if (!world.isClientSide && world.random.nextFloat() < f - 0.5F && entity instanceof EntityLiving && (entity instanceof EntityHuman || world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) && entity.getWidth() * entity.getWidth() * entity.getHeight() > 0.512F) {
+ if (!world.isClientSide && world.random.nextFloat() < f - 0.5F && entity instanceof EntityLiving && (entity instanceof EntityHuman || world.purpurConfig.farmlandBypassMobGriefing || world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) && entity.getWidth() * entity.getWidth() * entity.getHeight() > 0.512F) { // Purpur
// CraftBukkit start - Interact soil
org.bukkit.event.Cancellable cancellable;
if (entity instanceof EntityHuman) {
diff --git a/src/main/java/net/minecraft/world/level/block/BlockTurtleEgg.java b/src/main/java/net/minecraft/world/level/block/BlockTurtleEgg.java
index 04504901b1933ed760b34b8abb994de8ec340a4e..e18be05c9a9230105ec54395d4391c86132e7930 100644
--- a/src/main/java/net/minecraft/world/level/block/BlockTurtleEgg.java
+++ b/src/main/java/net/minecraft/world/level/block/BlockTurtleEgg.java
@@ -206,7 +206,7 @@ public class BlockTurtleEgg extends Block {
return false;
} else if (this.c > 0) {
--this.c;
}
if (entity instanceof EntityLiving && !(entity instanceof EntityHuman)) {
- return world.getGameRules().getBoolean(GameRules.MOB_GRIEFING);
+ return world.purpurConfig.turtleEggsBypassMobGriefing || world.getGameRules().getBoolean(GameRules.MOB_GRIEFING); // Purpur
}
return true;
// Purpur end
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index af33ee28276ac9848805765af6d51bf4b9f3c372..f9cd952ebddab8c963a8cc51755e3019c9286bd0 100644
index 73213bf975ffe38ff6ee9b05c5a48b232f767727..9fae36ee7c25a0cf3a7677223a7aa55617797970 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -252,6 +252,7 @@ public class PurpurWorldConfig {