mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-05 10:23:15 +01:00
34 lines
1.6 KiB
Diff
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/dev/tr7zw/yatopia/YatopiaConfig.java b/src/main/java/dev/tr7zw/yatopia/YatopiaConfig.java
|
|
index 39477fcec9ea1e09b9019534f09fe3ff03bdc886..0543de8ea80322028729723fd2b500ee7921ffd5 100644
|
|
--- a/src/main/java/dev/tr7zw/yatopia/YatopiaConfig.java
|
|
+++ b/src/main/java/dev/tr7zw/yatopia/YatopiaConfig.java
|
|
@@ -228,4 +228,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);
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
|
index d04d74f446d2632938a87cbd63e455683b3a8f37..03849c7709a5ea4852b23e828030dad2220523d3 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 && dev.tr7zw.yatopia.YatopiaConfig.fixFallDistance) { // Yatopia
|
|
+ this.fallDistance = 0.0F; // Yatopia
|
|
}
|
|
|
|
}
|