mirror of
https://github.com/Samsuik/Sakura.git
synced 2026-01-06 15:41:49 +00:00
Fix falling block stacking restrictions when using legacy physics
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user