From ef61440af4428fa36adc9df8ed209cb6a6361153 Mon Sep 17 00:00:00 2001 From: Samsuik Date: Sun, 26 Jan 2025 11:26:13 +0000 Subject: [PATCH] Fix falling block stacking restrictions when using legacy physics --- ...nfigurable-left-shooting-and-adjusting-limits.patch | 10 ++++++++++ .../sakura/configuration/WorldConfiguration.java | 5 ----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/sakura-server/minecraft-patches/features/0022-Configurable-left-shooting-and-adjusting-limits.patch b/sakura-server/minecraft-patches/features/0022-Configurable-left-shooting-and-adjusting-limits.patch index d374a45..63fecec 100644 --- a/sakura-server/minecraft-patches/features/0022-Configurable-left-shooting-and-adjusting-limits.patch +++ b/sakura-server/minecraft-patches/features/0022-Configurable-left-shooting-and-adjusting-limits.patch @@ -75,6 +75,7 @@ index 88a83d0b81fc65b4091c7f2c44820b4913356a2f..dd56f4e128793006c370514007755bdf x = this.scanX(currBoundingBox, x, voxelList, bbList); if (x != 0.0) { currBoundingBox = ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.offsetX(currBoundingBox, x); +<<<<<<< HEAD:sakura-server/minecraft-patches/features/0022-Configurable-left-shooting-and-adjusting-limits.patch diff --git a/net/minecraft/world/entity/item/FallingBlockEntity.java b/net/minecraft/world/entity/item/FallingBlockEntity.java index 10799fe7188f69c6eb56403ba0942a437139fb84..8ecc4a7b6f7bd997aecc85c5d0c12b0e8926a505 100644 --- a/net/minecraft/world/entity/item/FallingBlockEntity.java @@ -82,6 +83,15 @@ index 10799fe7188f69c6eb56403ba0942a437139fb84..8ecc4a7b6f7bd997aecc85c5d0c12b0e @@ -270,6 +270,7 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti // Sakura end - configure cannon physics this.time++; +======= +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 eeca55d482787ff4f032db46a6934e98865f14aa..6d13b037a4e2c0d677c1cb4b39cf6d50c659c87e 100644 +--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java ++++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +@@ -276,6 +276,7 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti + // Sakura end - physics version api + ++this.time; +>>>>>>> db70cd2 (Fix falling block stacking restrictions when using legacy physics):patches/server/0076-Configurable-left-shooting-and-adjusting-limits.patch this.applyGravity(); + this.limitLeftShooting(); // Sakura - configurable left shooting and adjusting limits this.move(MoverType.SELF, this.getDeltaMovement()); diff --git a/sakura-server/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java b/sakura-server/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java index a2b3023..194276d 100644 --- a/sakura-server/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java +++ b/sakura-server/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java @@ -79,11 +79,6 @@ public final class WorldConfiguration extends ConfigurationPart { public boolean preventAgainstBorder = false; @NestedSetting({"prevent-stacking", "world-height"}) public boolean preventAtWorldHeight = false; - - public boolean isFallingBlockInBounds(FallingBlockEntity entity) { - return (!this.preventAgainstBorder || !ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.isCollidingWithBorder(entity.level().getWorldBorder(), entity.getBoundingBox().inflate(0.01))) - && (!this.preventAtWorldHeight || entity.blockPosition().getY() < entity.level().getMaxY() - 1); - } } public Explosion explosion = new Explosion();