38 lines
1.7 KiB
Diff
38 lines
1.7 KiB
Diff
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
|
|
index ff8f7e4569a889ead1512b7c9908f9c5cad9eed5..2ba81e7179c7f9e2e1add1ad6bd6b96ee12c5da1 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
|
@@ -101,6 +101,11 @@ public class FallingBlockEntity extends Entity {
|
|
|
|
@Override
|
|
public void tick() {
|
|
+ // Paper start - fix sand duping
|
|
+ if (this.removed) {
|
|
+ return;
|
|
+ }
|
|
+ // Paper end - fix sand duping
|
|
if (this.blockState.isAir()) {
|
|
this.remove();
|
|
} else {
|
|
@@ -123,6 +128,12 @@ public class FallingBlockEntity extends Entity {
|
|
|
|
this.move(MoverType.SELF, this.getDeltaMovement());
|
|
|
|
+ // Paper start - fix sand duping
|
|
+ if (this.removed) {
|
|
+ return;
|
|
+ }
|
|
+ // Paper end - fix sand duping
|
|
+
|
|
// Paper start - Configurable EntityFallingBlock height nerf
|
|
if (this.level.paperConfig.fallingBlockHeightNerf != 0 && this.getY() > this.level.paperConfig.fallingBlockHeightNerf) {
|
|
if (this.dropItem && this.level.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
|