mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 10:57:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly Paper Changes: 14513c3c Updated Upstream (Bukkit/CraftBukkit)
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
From 0f1a76f451bfcea744e9f26ec1407b9aee80b847 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 791d03aa7..eb397b6bc 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 0e20e0b13..749dce0b4 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.23.0.rc1
|
||||
|
||||
Reference in New Issue
Block a user