mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 18:07:43 +01:00
Upstream has released updates that appears to apply and compile correctly Paper Changes: b75eeca0 Boost light task priority to ensure it doesnt hold up chunk loads 3d2bc848 Ensure VillagerTrades doesn't load async - fixes #3495 e470f1ef Add more information to Timing Reports f4a47db6 Improve Thread Pool usage to allow single threads for single cpu servers a4fe910f Fix sounds when using worldedit regen command 70ad51a8 Updated Upstream (Bukkit/CraftBukkit) d7cfa4fa Improve legacy format serialization more
47 lines
3.0 KiB
Diff
47 lines
3.0 KiB
Diff
From c7d025bf454a4fb24cf1f9e79331aed59692ddeb Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
|
Date: Fri, 24 Apr 2020 09:33:11 -0500
|
|
Subject: [PATCH] Entities pick up loot bypass mob-griefing gamerule
|
|
|
|
---
|
|
src/main/java/net/minecraft/server/EntityInsentient.java | 2 +-
|
|
src/main/java/net/pl3x/purpur/PurpurWorldConfig.java | 2 ++
|
|
2 files changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
|
index eb0befb357..4e5b71046a 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
|
@@ -525,7 +525,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
|
public void movementTick() {
|
|
super.movementTick();
|
|
this.world.getMethodProfiler().enter("looting");
|
|
- if (!this.world.isClientSide && this.canPickupLoot() && this.isAlive() && !this.killed && this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
|
|
+ if (!this.world.isClientSide && this.canPickupLoot() && this.isAlive() && !this.killed && (this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) || world.purpurConfig.entitiesPickUpLootBypassMobGriefing)) {
|
|
List<EntityItem> list = this.world.a(EntityItem.class, this.getBoundingBox().grow(1.0D, 0.0D, 1.0D));
|
|
Iterator iterator = list.iterator();
|
|
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index 6962d17b9b..e57299f1e4 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -200,6 +200,7 @@ public class PurpurWorldConfig {
|
|
public double controllableMinecartsBaseSpeed = 0.1D;
|
|
public Map<Block, Double> controllableMinecartsBlockSpeeds = new HashMap<>();
|
|
public boolean disableDropsOnCrammingDeath = false;
|
|
+ public boolean entitiesPickUpLootBypassMobGriefing = false;
|
|
public boolean fixClimbingBypassingCrammingRule = false;
|
|
public boolean itemFloatInLava = false;
|
|
public List<Item> itemImmuneToExplosion = new ArrayList<>();
|
|
@@ -235,6 +236,7 @@ public class PurpurWorldConfig {
|
|
set("gameplay-mechanics.controllable-minecarts.block-speed.stone", 0.5D);
|
|
}
|
|
disableDropsOnCrammingDeath = getBoolean("gameplay-mechanics.disable-drops-on-cramming-death", disableDropsOnCrammingDeath);
|
|
+ entitiesPickUpLootBypassMobGriefing = getBoolean("gameplay-mechanics.entities-pick-up-loot-bypass-mob-griefing", entitiesPickUpLootBypassMobGriefing);
|
|
fixClimbingBypassingCrammingRule = getBoolean("gameplay-mechanics.fix-climbing-bypassing-cramming-rule", fixClimbingBypassingCrammingRule);
|
|
itemFloatInLava = getBoolean("gameplay-mechanics.item.float-in-lava", itemFloatInLava);
|
|
getList("gameplay-mechanics.item.immune.explosion", itemImmuneToExplosion).forEach(key -> {
|
|
--
|
|
2.24.0
|
|
|