mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-19 15:09:25 +00:00
35 lines
1.7 KiB
Diff
35 lines
1.7 KiB
Diff
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 d504d10fbe45dfe3f2f3d08d2473df6cd18f6dcf..2b377faa46c7e4b565cff3c4f85cd526046f18d8 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
|
@@ -405,4 +405,11 @@ public class FallingBlockEntity extends Entity {
|
|
this.setPos(d0, d1, d2);
|
|
this.setStartPos(this.blockPosition());
|
|
}
|
|
+
|
|
+ // 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;
|
|
}
|