mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Upstream has released updates that appear to apply and compile correctly Pufferfish Changes: pufferfish-gg/Pufferfish@c9f4e20 Final 1.20.4 Update pufferfish-gg/Pufferfish@1f3ad02 Final 1.20.4 update, for realzies pufferfish-gg/Pufferfish@b1ab664 Enable SIMD on java 21 pufferfish-gg/Pufferfish@0674c2b 1.21 compiles pufferfish-gg/Pufferfish@98ea973 Fix 1.21 version checkers pufferfish-gg/Pufferfish@68f859c Fix lambda/tick guard patch pufferfish-gg/Pufferfish@eaa18d5 Updated Upstream (Paper) pufferfish-gg/Pufferfish@1d72eea Updated Upstream (Paper) pufferfish-gg/Pufferfish@1d3c743 Update pufferfish version detector stuff pufferfish-gg/Pufferfish@5e30963 Fix crash bug pufferfish-gg/Pufferfish@12571eb Use mojmapped paperclip jar instead (CI only) pufferfish-gg/Pufferfish@4d16ae0 Drop a patch - moonrise includes it pufferfish-gg/Pufferfish@52c2d05 Revert "Drop a patch - moonrise includes it" pufferfish-gg/Pufferfish@bdb56f1 Fix entity interactions with fluids pufferfish-gg/Pufferfish@469e5c1 Updated Upstream (Paper) pufferfish-gg/Pufferfish@d75961f 1.21.1 Update (Updated Upstream (Paper))
45 lines
2.7 KiB
Diff
45 lines
2.7 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 df19c74439e8855410446201135a997efcc88c24..b4c50e28cad3a063c2168cd9a813dfc6349d86e3 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
@@ -1880,7 +1880,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
|
boolean flag = this.lastHurtByPlayerTime > 0;
|
|
|
|
this.dropEquipment(); // CraftBukkit - from below
|
|
- if (this.shouldDropLoot() && world.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
|
+ if (this.shouldDropLoot() && this.level().getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
|
+ if (!(damageSource.is(net.minecraft.world.damagesource.DamageTypes.CRAMMING) && level().purpurConfig.disableDropsOnCrammingDeath)) { // Purpur
|
|
this.dropFromLootTable(damageSource, flag);
|
|
// Paper start
|
|
final boolean prev = this.clearEquipmentSlots;
|
|
@@ -1889,6 +1890,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 2591b4f0d0e4e4d9e77efb821c9ae775182713b6..830ba18f1695bbf4099a9579166e29618206ba83 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;
|