mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-22 08:29:28 +00:00
[ci skip] Drop Optimize check nearby fire or lava on entity move
This commit is contained in:
41
patches/server/0083-Don-t-save-falling-block-entity.patch
Normal file
41
patches/server/0083-Don-t-save-falling-block-entity.patch
Normal file
@@ -0,0 +1,41 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: nostalfinals <yuu8583@proton.me>
|
||||
Date: Mon, 29 Apr 2024 23:31:25 +0800
|
||||
Subject: [PATCH] Don't save falling block entity
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
index b83be9bbb9f348da83c0fd1ecc7f65c8a58b45b9..5b3844f92caf2962be58e911f98a26e6992f8184 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
@@ -422,4 +422,11 @@ public class FallingBlockEntity extends Entity {
|
||||
this.forceTickAfterTeleportToDuplicate = entity != null && flag && io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.allowUnsafeEndPortalTeleportation; // Paper
|
||||
return entity;
|
||||
}
|
||||
+
|
||||
+ // Leaf start - PMC - Don't save falling block entity
|
||||
+ @Override
|
||||
+ public boolean shouldBeSaved() {
|
||||
+ return !org.dreeam.leaf.config.modules.opt.DontSaveEntity.dontSaveFallingBlock && super.shouldBeSaved();
|
||||
+ }
|
||||
+ // Leaf end - PMC - Don't save falling block entity
|
||||
}
|
||||
diff --git a/src/main/java/org/dreeam/leaf/config/modules/opt/DontSaveEntity.java b/src/main/java/org/dreeam/leaf/config/modules/opt/DontSaveEntity.java
|
||||
index 1788d587215397b32c21815778cd1d0fe39e1f2b..f4af7ccf4e8bbdb803fb17de57bd523ea8ff7ef4 100644
|
||||
--- a/src/main/java/org/dreeam/leaf/config/modules/opt/DontSaveEntity.java
|
||||
+++ b/src/main/java/org/dreeam/leaf/config/modules/opt/DontSaveEntity.java
|
||||
@@ -10,6 +10,7 @@ public class DontSaveEntity extends ConfigModules {
|
||||
}
|
||||
|
||||
public static boolean dontSavePrimedTNT = false;
|
||||
+ public static boolean dontSaveFallingBlock = false;
|
||||
|
||||
@Override
|
||||
public void onLoaded() {
|
||||
@@ -18,5 +19,6 @@ public class DontSaveEntity extends ConfigModules {
|
||||
Useful for redstone/technical servers, can prevent machines from being exploded by TNT,
|
||||
when player disconnected caused by Internet issue.
|
||||
""");
|
||||
+ dontSaveFallingBlock = config.getBoolean(getBasePath() + ".dont-save-falling-block", dontSaveFallingBlock);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user