9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-22 00:19:20 +00:00
Files
Leaf/leaf-server/minecraft-patches/features/0143-Don-t-save-falling-block-entity.patch
2025-06-16 05:21:05 +08:00

23 lines
1.1 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/net/minecraft/world/entity/item/FallingBlockEntity.java b/net/minecraft/world/entity/item/FallingBlockEntity.java
index 595dee03e3a7d98d703e48fb53d82d7f392a2b3d..c99ddedaf25a009f0d19f97d01e7545b0c59aee2 100644
--- a/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/net/minecraft/world/entity/item/FallingBlockEntity.java
@@ -390,4 +390,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
}