mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-23 08:59:23 +00:00
Add back Leaves Jade protocol support
This commit is contained in:
@@ -1,34 +0,0 @@
|
||||
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 01755f3f24fc2a89f71f2e3de48166e95253f418..3753930a2ae5832b6542327627522c8afec28659 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
|
||||
@@ -22,4 +22,7 @@ public class DontSaveEntity implements IConfigModule {
|
||||
when player disconnected caused by Internet issue.
|
||||
""")
|
||||
public static boolean dontSavePrimedTNT = false;
|
||||
+
|
||||
+ @ConfigInfo(baseName = "dont-save-falling-block")
|
||||
+ public static boolean dontSaveFallingBlock = false;
|
||||
}
|
||||
Reference in New Issue
Block a user