more progress

This commit is contained in:
BillyGalbreath
2021-06-18 19:09:50 -05:00
parent 16d318fed6
commit 9a48162500
106 changed files with 2769 additions and 417 deletions

View File

@@ -1,37 +0,0 @@
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 c150a898c60a3477012e7d49e30f98cfcdc27247..e208c49adff06626ea64fa7d69e2e389f722461f 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1700,8 +1700,10 @@ public abstract class LivingEntity extends Entity {
this.dropEquipment(); // CraftBukkit - from below
if (this.shouldDropLoot() && this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
+ if (!(source == DamageSource.CRAMMING && level.purpurConfig.disableDropsOnCrammingDeath)) { // Purpur
this.dropFromLootTable(source, flag);
this.dropCustomDeathLoot(source, 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 91bfba8f10ee60af5eaf9e95a1b2eb9437820b80..d22871c0ba693af412fbcf842a3a6151777696ed 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -73,6 +73,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;