9
0
mirror of https://github.com/Samsuik/Sakura.git synced 2025-12-28 19:29:07 +00:00

Fix falling block stacking restrictions when using legacy physics

This commit is contained in:
Samsuik
2025-01-26 11:26:13 +00:00
parent 4513ce063a
commit ef61440af4
2 changed files with 10 additions and 5 deletions

View File

@@ -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();