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: PaperMC/Paper@bcf52fe Delete some old patches PaperMC/Paper@348c855 Readd last API patch (with TODO) PaperMC/Paper@b630564 More patches PaperMC/Paper@3cb16c9 Add back per player mob spawning PaperMC/Paper@fe7b741 Another one PaperMC/Paper@12ed021 Update material tags and entity effect PaperMC/Paper@02bca1e Remove timings impl PaperMC/Paper@4d87302 Fix NPE and StackOverflowError for dispensers PaperMC/Paper@f8f230a Remove unnecessary AT PaperMC/Paper@29bf7be Fix unused parameter in PlayerList#remove PaperMC/Paper@9e35192 Execute spark tasks during tick sleep (#11525) PaperMC/Paper@e35f199 Use declaration order for state holder property iteration PaperMC/Paper@6288adb Remove leftover missed timings calls (#11527)
43 lines
2.6 KiB
Diff
43 lines
2.6 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/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
index 0b1d31bcbe398ecd2e1ddd881c2f602a1a4f73d9..4fc0aa48e4e0e291ba3f8291a2dfa671fbe553e5 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
@@ -1908,6 +1908,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
|
|
|
this.dropEquipment(world); // CraftBukkit - from below
|
|
if (this.shouldDropLoot() && world.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
|
+ if (!(damageSource.is(net.minecraft.world.damagesource.DamageTypes.CRAMMING) && level().purpurConfig.disableDropsOnCrammingDeath)) { // Purpur
|
|
this.dropFromLootTable(world, damageSource, flag);
|
|
// Paper start
|
|
final boolean prev = this.clearEquipmentSlots;
|
|
@@ -1916,6 +1917,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
|
// Paper end
|
|
this.dropCustomDeathLoot(world, damageSource, flag);
|
|
this.clearEquipmentSlots = prev; // Paper
|
|
+ } // Purpur
|
|
}
|
|
// CraftBukkit start - Call death event // Paper start - call advancement triggers with correct entity equipment
|
|
org.bukkit.event.entity.EntityDeathEvent deathEvent = CraftEventFactory.callEntityDeathEvent(this, damageSource, this.drops, () -> {
|
|
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
index a97dadd4c0b04833282f9fc484ef760da712974d..03f5aea7bc98984ced82c7dce93cc4ea4c48179f 100644
|
|
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
@@ -96,6 +96,11 @@ public class PurpurWorldConfig {
|
|
armorstandStepHeight = (float) getDouble("gameplay-mechanics.armorstand.step-height", armorstandStepHeight);
|
|
}
|
|
|
|
+ public boolean disableDropsOnCrammingDeath = false;
|
|
+ private void miscGameplayMechanicsSettings() {
|
|
+ disableDropsOnCrammingDeath = getBoolean("gameplay-mechanics.disable-drops-on-cramming-death", disableDropsOnCrammingDeath);
|
|
+ }
|
|
+
|
|
public double minecartMaxSpeed = 0.4D;
|
|
public boolean minecartPlaceAnywhere = false;
|
|
public boolean minecartControllable = false;
|