From e1487d1c7ebca602e7b06e5cf700deb822bb6a69 Mon Sep 17 00:00:00 2001 From: Etil <81570777+etil2jz@users.noreply.github.com> Date: Sun, 9 Jan 2022 02:20:03 +0100 Subject: [PATCH] Minor Lithium patches --- ...092-lithium-entity.fast_elytra_check.patch | 21 +++++++++++++++ patches/server/0093-lithium-profiler.patch | 26 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 patches/server/0092-lithium-entity.fast_elytra_check.patch create mode 100644 patches/server/0093-lithium-profiler.patch diff --git a/patches/server/0092-lithium-entity.fast_elytra_check.patch b/patches/server/0092-lithium-entity.fast_elytra_check.patch new file mode 100644 index 0000000..5afd232 --- /dev/null +++ b/patches/server/0092-lithium-entity.fast_elytra_check.patch @@ -0,0 +1,21 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: 2No2Name <2No2Name@web.de> +Date: Sat, 8 Jan 2022 04:32:41 +0100 +Subject: [PATCH] lithium: entity.fast_elytra_check + +Original code by CaffeineMC, licensed under GNU Lesser General Public License v3.0 +You can find the original code on https://github.com/CaffeineMC/lithium-fabric (Yarn mappings) + +diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java +index 9373e4ce1061d5cb3a2d22272671c668614dd4a8..a9cf45362ca7dfe9261098085993a133dd505701 100644 +--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java ++++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +@@ -3373,6 +3373,8 @@ public abstract class LivingEntity extends Entity { + } + + private void updateFallFlying() { ++ if (!this.getSharedFlag(7)) return; // Mirai ++ + boolean flag = this.getSharedFlag(7); + + if (flag && !this.onGround && !this.isPassenger() && !this.hasEffect(MobEffects.LEVITATION)) { diff --git a/patches/server/0093-lithium-profiler.patch b/patches/server/0093-lithium-profiler.patch new file mode 100644 index 0000000..e9eb3a5 --- /dev/null +++ b/patches/server/0093-lithium-profiler.patch @@ -0,0 +1,26 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: 2No2Name <2No2Name@web.de> +Date: Sat, 8 Jan 2022 04:56:54 +0100 +Subject: [PATCH] lithium: profiler + +Original code by CaffeineMC, licensed under GNU Lesser General Public License v3.0 +You can find the original code on https://github.com/CaffeineMC/lithium-fabric (Yarn mappings) + +diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java +index f6135a2a5eef0e223ec43b73384897f2aa1d54e4..73284a25d9110abc505455b4afbbd541fa6fd81f 100644 +--- a/src/main/java/net/minecraft/server/level/ServerLevel.java ++++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +@@ -221,6 +221,13 @@ public class ServerLevel extends Level implements WorldGenLevel { + return new Throwable(entity + " Added to world at " + new java.util.Date()); + } + ++ // Mirai start ++ @Override ++ public ProfilerFiller getProfiler() { ++ return this.getServer().getProfiler(); ++ } ++ // Mirai end ++ + @Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI + return this.chunkSource.getChunkAtIfLoadedImmediately(x, z); // Paper + }