mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-29 22:23:50 +01:00
45 lines
1.8 KiB
Diff
45 lines
1.8 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 fb3bf0731512b5517ca7ccb3240085b40e7f2abb..40f0bc601f0d11b0bfb15162fce17aaa70991f14 100644
|
||
|
--- a/src/main/java/dev/tr7zw/yatopia/YatopiaConfig.java
|
||
|
+++ b/src/main/java/dev/tr7zw/yatopia/YatopiaConfig.java
|
||
|
@@ -229,4 +229,10 @@ public class YatopiaConfig {
|
||
|
private static void villagersHideAtNight() {
|
||
|
villagersHideAtNight = getBoolean("settings.villager.villagersHideAtNight", false);
|
||
|
}
|
||
|
+
|
||
|
+ public static boolean fixFallDistance = false;
|
||
|
+ private static void fixFallDistance() {
|
||
|
+ fixFallDistance = getBoolean("settings.fixFallDistance", false);
|
||
|
+ }
|
||
|
+
|
||
|
}
|
||
|
\ No newline at end of file
|
||
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||
|
index ec84bc4dceff76fd2f823a6a9548fdf180291584..de745c8678f5dca0a939afcd45f2cab5fae3c4f1 100644
|
||
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||
|
@@ -2,6 +2,8 @@ package net.minecraft.server;
|
||
|
|
||
|
import co.aikar.timings.MinecraftTimings;
|
||
|
import co.aikar.timings.Timing;
|
||
|
+import dev.tr7zw.yatopia.YatopiaConfig;
|
||
|
+
|
||
|
import com.google.common.collect.Iterables;
|
||
|
import com.google.common.collect.Lists;
|
||
|
import com.google.common.collect.Sets;
|
||
|
@@ -1266,6 +1268,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 && YatopiaConfig.fixFallDistance) { // Yatopia
|
||
|
+ this.fallDistance = 0.0F;
|
||
|
}
|
||
|
|
||
|
}
|