mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-21 15:59:26 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@dc3ef2a Fix vanilla components not being translated (#9893) PaperMC/Paper@7e15d97 Remove no longer needed diff from adventure patch PaperMC/Paper@f1820dc Fix incorrect border collision detection PaperMC/Paper@de04cbc Updated Upstream (Bukkit/CraftBukkit) (#10034) PaperMC/Paper@ff26d54 send sound and particle packets immediately even if off main (#10033) PaperMC/Paper@e3140fb hotfix spawning item/xp in wrong spot PaperMC/Paper@0b95298 Make worldborder collisions consistent with Vanilla PaperMC/Paper@47b2c18 Don't fire the drop event on player deaths (#10046) PaperMC/Paper@8c007d9 properly read and store sus effect duration (#10050) PaperMC/Paper@5385b21 [ci skip] Make test results viewable in-browser and downloadable (#10055) PaperMC/Paper@086ca61 Fix world border edge collision (#10053) PaperMC/Paper@45e01a2 Use correct max stack size in crafter (#10057) PaperMC/Paper@d11a588 Remove duplicate code in chunk tick iteration (#10056) PaperMC/Paper@b4c9e7e add missing Experimental annotations (#10012)
33 lines
2.5 KiB
Diff
33 lines
2.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Samsuik <40902469+Samsuik@users.noreply.github.com>
|
|
Date: Thu, 16 Nov 2023 20:53:51 +0000
|
|
Subject: [PATCH] Falling Block Stacking Restrictions
|
|
|
|
|
|
diff --git a/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java b/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java
|
|
index 376322d8e47e24a76c7162d6379c7f71debd7505..872b874649ff5383af73f6b07dd59fdabea3ffb2 100644
|
|
--- a/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java
|
|
+++ b/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java
|
|
@@ -69,7 +69,7 @@ public class WorldConfiguration extends ConfigurationPart {
|
|
public boolean preventAtWorldHeight = false;
|
|
|
|
public boolean isFallingBlockInBounds(FallingBlockEntity entity) {
|
|
- return (!preventAgainstBorder || !io.papermc.paper.util.CollisionUtil.isAlmostCollidingOnBorder(entity.level().getWorldBorder(), entity.getBoundingBox()))
|
|
+ return (!preventAgainstBorder || !io.papermc.paper.util.CollisionUtil.isCollidingWithBorder(entity.level().getWorldBorder(), entity.getBoundingBox().inflate(0.01)))
|
|
&& (!preventAtWorldHeight || entity.blockPosition().getY() < entity.level().getMaxBuildHeight() - 1);
|
|
}
|
|
}
|
|
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 d7a3d869417983ea3758c2fab2de78c098826b19..6274c005f4f53f3cec0c94b7d40cdb7070b190e0 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
|
@@ -260,7 +260,7 @@ public class FallingBlockEntity extends Entity {
|
|
boolean flag3 = FallingBlock.isFree(this.level().getBlockState(blockposition.below())) && (!flag || !flag1);
|
|
boolean flag4 = this.blockState.canSurvive(this.level(), blockposition) && !flag3;
|
|
|
|
- if (flag2 && flag4) {
|
|
+ if (flag2 && flag4 && level().sakuraConfig().cannons.sand.isFallingBlockInBounds(this)) { // Sakura
|
|
if (this.blockState.hasProperty(BlockStateProperties.WATERLOGGED) && this.level().getFluidState(blockposition).getType() == Fluids.WATER) {
|
|
this.blockState = (BlockState) this.blockState.setValue(BlockStateProperties.WATERLOGGED, true);
|
|
}
|