Yatopia/patches/server/0027-Fix-lead-fall-dmg-config.patch
Ivan Pekov a77a90a68d
Fix bork squids
Bravo mojong! How did u manage to break them!?
Ported a purpur patch which fixes the described behavior from our tester, t0ssox
2020-09-03 09:04:54 +03:00

34 lines
1.6 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Tue, 4 Aug 2020 22:08:09 +0200
Subject: [PATCH] Fix lead fall dmg config
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index bb6b25c4708b05837132b4a47ad091595b8dcb23..954e2b1c7f377a2c461a6be9bfd73082e8f0f4f8 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1266,6 +1266,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
this.fallDistance = 0.0F;
} else if (d0 < 0.0D) {
this.fallDistance = (float) ((double) this.fallDistance - d0);
+ } else if (d0 > 0.0D && net.yatopia.server.YatopiaConfig.fixFallDistance) { // Yatopia
+ this.fallDistance = 0.0F; // Yatopia
}
}
diff --git a/src/main/java/net/yatopia/server/YatopiaConfig.java b/src/main/java/net/yatopia/server/YatopiaConfig.java
index 3499f743e875338f51c2193dff0ded5881ac70b7..349834a9b367f00478448c5be8216a856b4b21c4 100644
--- a/src/main/java/net/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/net/yatopia/server/YatopiaConfig.java
@@ -226,4 +226,9 @@ public class YatopiaConfig {
simplerVillagerBehavior = getBoolean("settings.villager.simplerVillagerBehavior", false);
villagersHideAtNight = getBoolean("settings.villager.villagersHideAtNight", false);
}
+
+ public static boolean fixFallDistance = false;
+ private static void fixFallDistance() {
+ fixFallDistance = getBoolean("settings.fixFallDistance", false);
+ }
}