2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
|
|
|
Date: Fri, 12 Jun 2020 13:33:19 -0700
|
|
|
|
Subject: [PATCH] Fix sand duping
|
|
|
|
|
|
|
|
If the falling block dies during teleportation (entity#move), then we need
|
|
|
|
to detect that by placing a check after the move.
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
2023-09-22 06:05:18 +02:00
|
|
|
index b8c8b10656e4151c8c19b8cecc3bc7502dd57d3d..c64dcceabc41c11542b535d104b7f43172032842 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
2023-07-04 10:22:56 +02:00
|
|
|
@@ -131,6 +131,11 @@ public class FallingBlockEntity extends Entity {
|
2021-06-11 14:02:28 +02:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public void tick() {
|
|
|
|
+ // Paper start - fix sand duping
|
2021-06-14 10:37:14 +02:00
|
|
|
+ if (this.isRemoved()) {
|
2021-06-11 14:02:28 +02:00
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ // Paper end - fix sand duping
|
|
|
|
if (this.blockState.isAir()) {
|
2021-06-14 10:37:14 +02:00
|
|
|
this.discard();
|
2022-03-01 06:43:03 +01:00
|
|
|
} else {
|
2023-07-04 10:22:56 +02:00
|
|
|
@@ -142,6 +147,13 @@ public class FallingBlockEntity extends Entity {
|
2023-06-08 01:20:26 +02:00
|
|
|
}
|
2021-06-11 14:02:28 +02:00
|
|
|
|
|
|
|
this.move(MoverType.SELF, this.getDeltaMovement());
|
2023-06-08 01:20:26 +02:00
|
|
|
+
|
2021-06-11 14:02:28 +02:00
|
|
|
+ // Paper start - fix sand duping
|
2021-06-14 10:37:14 +02:00
|
|
|
+ if (this.isRemoved()) {
|
2021-06-11 14:02:28 +02:00
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ // Paper end - fix sand duping
|
|
|
|
+
|
|
|
|
// Paper start - Configurable EntityFallingBlock height nerf
|
2023-06-08 01:20:26 +02:00
|
|
|
if (this.level().paperConfig().fixes.fallingBlockHeightNerf.test(v -> this.getY() > v)) {
|
|
|
|
if (this.dropItem && this.level().getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
|