mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 17:37:42 +01:00
Upstream has released updates that appears to apply and compile correctly Paper Changes: 19ff55ef Update upstream B/CB 79710332 Update upstream CB 19de9af6 1.15.2 update (#2887) d4ae43fc Updated Upstream (Bukkit/CraftBukkit) 9c2d9a5f [CI-SKIP] Rebuild patches 86a4b752 Fix items not falling correctly (Resolves #2835) (#2872) 35472de2 Port activation range improvement patch (#2763) 617f6033 Add effect to block break naturally (#2819) f63cfe00 Updated Upstream (Bukkit/CraftBukkit) 00860e4e [CI-SKIP] rebuild patches 3d519668 Prevent sync chunk loads when villagers try to find beds (#2855)
45 lines
2.3 KiB
Diff
45 lines
2.3 KiB
Diff
From 3972fecf35718134bfc2b204d0ea27c9ea9249e3 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 5af703bd1..38948133e 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
|
@@ -1383,8 +1383,10 @@ public abstract class EntityLiving extends Entity {
|
|
this.dropInventory(); // CraftBukkit - from below
|
|
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 fce20c66e..d6af36146 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.24.0
|
|
|