9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-19 15:09:25 +00:00
Files
Leaf/leaf-server/minecraft-patches/features/0143-Don-t-save-falling-block-entity.patch

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 31edd0d45ac6c38887e4cebffe5a7cf377b47466..149d5845480c03fe4e29b09cac7fcd1bec147507 100644
--- a/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/net/minecraft/world/entity/item/FallingBlockEntity.java
@@ -385,4 +385,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
}