9
0
mirror of https://github.com/Samsuik/Sakura.git synced 2025-12-30 20:29:14 +00:00
Files
SakuraMC/patches/server/0028-Despawn-falling-blocks-inside-moving-pistons.patch
Samsuik a3e1439ad9 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@850b736 Close PRs opened from orgs or bot accounts (#10281)
PaperMC/Paper@54a2340 check if itemstack is stackable first (#10285)
PaperMC/Paper@9c4bb0d add rich message component support to configuration (#10225)
PaperMC/Paper@8870d22 Fire EntityDamageByEntityEvent for unowned wither skulls patch (#10244)
PaperMC/Paper@bbc03d8 improve BanList types (#10239)
PaperMC/Paper@ce5c8dd Configurable max block/fluid ticks (#10266)
PaperMC/Paper@880fef7 Deprecate extra ban methods with raw BanEntry (#9580)
PaperMC/Paper@60218cd Don't tick empty worlds (#9025)
PaperMC/Paper@b21eb4d add overloads to use suspicious effect entry to mushroom cow and suspicious stew meta (#10245)
PaperMC/Paper@89d51d5 Allow enabling sand duping (#10191)
PaperMC/Paper@6ad63fb Per world ticks per spawn settings (#6891)
2024-03-05 17:17:07 +00:00

20 lines
1.4 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samsuik <40902469+Samsuik@users.noreply.github.com>
Date: Wed, 15 Nov 2023 13:04:16 +0000
Subject: [PATCH] Despawn falling blocks inside moving pistons
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 8ee503cb9cee4984a6fbb79e486c5e730c46e125..60d7ffebb2fa4e39d5ba0033c746e85ff4b97727 100644
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
@@ -232,7 +232,7 @@ public class FallingBlockEntity extends Entity {
}
}
- if (!this.onGround() && !flag1) {
+ if (!this.onGround() && !flag1 || level().sakuraConfig().cannons.sand.despawnInsideMovingPistons && autoExpire && this.time > 600) { // Sakura - allow falling blocks to despawn inside moving pistons
if (!this.level().isClientSide && ((this.time > 100 && autoExpire) && (blockposition.getY() <= this.level().getMinBuildHeight() || blockposition.getY() > this.level().getMaxBuildHeight()) || (this.time > 600 && autoExpire))) { // Paper - Expand FallingBlock API
if (this.dropItem && this.level().getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
this.spawnAtLocation((ItemLike) block);