Yatopia/patches/server/0024-Fix-lead-fall-dmg-config.patch

34 lines
1.7 KiB
Diff
Raw Normal View History

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
Updated Upstream and Sidestream(s) (Paper/Tuinity/Purpur/Airplane/Empirecraft) (#392) * Updated Upstream and Sidestream(s) (Paper/Tuinity/Purpur/Airplane/Empirecraft) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Paper Changes: 13a476e15 Deprecate PlayerLeaveBedEvent#setBedSpawn 3a1d95c71 [Auto] Updated Upstream (CraftBukkit) d4dcc1a2e Updated Upstream (CraftBukkit) e886d8118 Updated Upstream () 8bc0c6c31 Updated Upstream (CraftBukkit/Spigot) (#5169) 002f65b8b living entity allow attribute registration (#4723) 69a5c67b1 fix calling setSize on dead slimes causing invincibility (fixes #5137) (#5168) Tuinity Changes: 502d57b Updated Upstream (Paper) 87e0cd9 Print exceptions for light scheduling Purpur Changes: 7fc2d31 Updated Upstream (Paper & Tuinity) Airplane Changes: d7d1626 Remove multithreaded entity tracker 677ec73 Ensure armor change event is on main thread c07d254 Fix crash ec7605c Updated Upstream (Tuinity) 2768f39 Update DEAR commit message e975972 Multithreaded entity tracking 98244f9 Updated Upstream (Tuinity) 44b2499 Larger headings 2c4a7fb Merge pull request #6 from Encode42/master cc19631 More changes beba27a Badges and variables 0aeaf12 Improve readability, grammar, etc. Empirecraft Changes: bbc8d297 Updated Paper * Updated Upstream and Sidestream(s) (Paper/Origami) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Paper Changes: 3dadd97bb [CI-SKIP] [Meta] Exempt more labels from being marked as stale (#5142) 36a72cad3 [Auto] Updated Upstream (Bukkit/CraftBukkit/Spigot) Origami Changes: 168394a Access config after loading it... fixes velocity auto offline-mode c47b182 Add velocity to automatic offline mode
2021-02-08 16:31:51 +01:00
index d74086ee72cfae3d2bead9fb08c808299d755e2a..48224c50293ff34f163724fa9d1d54c9bcfb2321 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
Updated Upstream and Sidestream(s) (Paper/Tuinity/Purpur/Airplane/Empirecraft) (#392) * Updated Upstream and Sidestream(s) (Paper/Tuinity/Purpur/Airplane/Empirecraft) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Paper Changes: 13a476e15 Deprecate PlayerLeaveBedEvent#setBedSpawn 3a1d95c71 [Auto] Updated Upstream (CraftBukkit) d4dcc1a2e Updated Upstream (CraftBukkit) e886d8118 Updated Upstream () 8bc0c6c31 Updated Upstream (CraftBukkit/Spigot) (#5169) 002f65b8b living entity allow attribute registration (#4723) 69a5c67b1 fix calling setSize on dead slimes causing invincibility (fixes #5137) (#5168) Tuinity Changes: 502d57b Updated Upstream (Paper) 87e0cd9 Print exceptions for light scheduling Purpur Changes: 7fc2d31 Updated Upstream (Paper & Tuinity) Airplane Changes: d7d1626 Remove multithreaded entity tracker 677ec73 Ensure armor change event is on main thread c07d254 Fix crash ec7605c Updated Upstream (Tuinity) 2768f39 Update DEAR commit message e975972 Multithreaded entity tracking 98244f9 Updated Upstream (Tuinity) 44b2499 Larger headings 2c4a7fb Merge pull request #6 from Encode42/master cc19631 More changes beba27a Badges and variables 0aeaf12 Improve readability, grammar, etc. Empirecraft Changes: bbc8d297 Updated Paper * Updated Upstream and Sidestream(s) (Paper/Origami) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Paper Changes: 3dadd97bb [CI-SKIP] [Meta] Exempt more labels from being marked as stale (#5142) 36a72cad3 [Auto] Updated Upstream (Bukkit/CraftBukkit/Spigot) Origami Changes: 168394a Access config after loading it... fixes velocity auto offline-mode c47b182 Add velocity to automatic offline mode
2021-02-08 16:31:51 +01:00
@@ -1290,6 +1290,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 && org.yatopiamc.yatopia.server.YatopiaConfig.fixFallDistance) { // Yatopia
+ this.fallDistance = 0.0F; // Yatopia
}
}
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
index 0f3803757a81c7ecaad48637ede8a3dc95b93f13..003a024da8ab877895244ff9e4e4ff62288622ff 100644
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
@@ -206,4 +206,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);
+ }
}