mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 17:37:42 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: a98d389d1 Updated Upstream (CraftBukkit/Spigot) (#5119) Tuinity Changes: f8c0db480 Call queueUpdate() when scheduling chunk lighting
38 lines
2.1 KiB
Diff
38 lines
2.1 KiB
Diff
From 0000000000000000000000000000000000000000 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
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
|
index 49ba80902868574c6f4efcc3f80ad46fb762e4be..04bfc8cabaf0ffdb6834e01ae02cbd7b46cb4c4a 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
|
@@ -1493,8 +1493,10 @@ public abstract class EntityLiving extends Entity {
|
|
|
|
this.dropInventory(); // CraftBukkit - from below
|
|
if (this.cW() && this.world.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) {
|
|
+ if (!(damagesource == DamageSource.CRAMMING && world.purpurConfig.disableDropsOnCrammingDeath)) { // Purpur
|
|
this.a(damagesource, flag);
|
|
this.dropDeathLoot(damagesource, i, flag);
|
|
+ } // Purpur
|
|
}
|
|
// CraftBukkit start - Call death event
|
|
org.bukkit.event.entity.EntityDeathEvent deathEvent = CraftEventFactory.callEntityDeathEvent(this, this.drops); // Paper
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index 248a5c0c5142cde9dec0d7c1de665b0c37fa3e8c..6b3c1a07497f8c5f06ac7ed7df31fc8224f94007 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -112,6 +112,11 @@ public class PurpurWorldConfig {
|
|
idleTimeoutUpdateTabList = getBoolean("gameplay-mechanics.player.idle-timeout.update-tab-list", idleTimeoutUpdateTabList);
|
|
}
|
|
|
|
+ public boolean disableDropsOnCrammingDeath = false;
|
|
+ private void miscGameplayMechanicsSettings() {
|
|
+ disableDropsOnCrammingDeath = getBoolean("gameplay-mechanics.disable-drops-on-cramming-death", disableDropsOnCrammingDeath);
|
|
+ }
|
|
+
|
|
public int playerSpawnInvulnerableTicks = 60;
|
|
public boolean playerInvulnerableWhileAcceptingResourcePack = false;
|
|
private void playerInvulnerabilities() {
|