mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
Upstream has released updates that appears to apply and compile correctly Paper Changes: aa022fda Fix java cross-version compilation 8b7952a9 Implement alternative item-despawn-rate (#2128) 6ccf0bda Reimplement hopper optimization patch (#2388) e264c365 MC-156852 fix (#2396) b6c32b2a Fix recursion in EntityFox (#2418) 7c640a1a Updated Upstream (Bukkit/CraftBukkit/Spigot) (#2415)
45 lines
2.3 KiB
Diff
45 lines
2.3 KiB
Diff
From f445b1fc28a3a5060fc83b4828e9d29a5fc2c421 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
Date: Wed, 3 Jul 2019 23:58:31 -0500
|
|
Subject: [PATCH] Disable loot drops on death by cramming
|
|
|
|
---
|
|
src/main/java/net/minecraft/server/EntityLiving.java | 2 ++
|
|
src/main/java/net/pl3x/purpur/PurpurConfig.java | 5 +++++
|
|
2 files changed, 7 insertions(+)
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
|
index 587fe2b36..89e5d01aa 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
|
@@ -1423,8 +1423,10 @@ public abstract class EntityLiving extends Entity {
|
|
this.cF(); // CraftBukkit - from below // PAIL
|
|
org.bukkit.event.entity.EntityDeathEvent deathEvent; // Paper
|
|
if (this.isDropExperience() && this.world.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) {
|
|
+ if (!(damagesource == DamageSource.CRAMMING && net.pl3x.purpur.PurpurConfig.disableDropsOnCrammingDeath)) { // Purpur - do not drop loot if crammed to death
|
|
this.a(damagesource, flag);
|
|
this.dropDeathLoot(damagesource, i, flag);
|
|
+ } // Purpur - do not drop loot if crammed to death
|
|
// CraftBukkit start - Call death event
|
|
deathEvent = CraftEventFactory.callEntityDeathEvent(this, this.drops); // Paper
|
|
} else {
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
index 40b28ebe5..412a120e2 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
@@ -136,6 +136,11 @@ public class PurpurConfig {
|
|
return config.getString(path, config.getString(path));
|
|
}
|
|
|
|
+ public static boolean disableDropsOnCrammingDeath = true;
|
|
+ private static void disableDropsOnCrammingDeath() {
|
|
+ disableDropsOnCrammingDeath = getBoolean("settings.disable-drops-on-cramming-death", disableDropsOnCrammingDeath);
|
|
+ }
|
|
+
|
|
public static boolean requireShiftToMount = true;
|
|
private static void requireShiftToMount() {
|
|
requireShiftToMount = getBoolean("settings.mobs.require-shift-to-mount", requireShiftToMount);
|
|
--
|
|
2.20.1
|
|
|