2021-06-11 12:02:28 +00: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
|
2022-10-09 06:52:09 +00:00
|
|
|
index 108c9ea0eb4a7f381042bfe0203ac40a9c4f27a7..da00fab453f3fb580acc9de65a0853656f9b6fc4 100644
|
2021-06-11 12:02:28 +00:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
2022-04-30 16:27:41 +00:00
|
|
|
@@ -126,6 +126,11 @@ public class FallingBlockEntity extends Entity {
|
2021-06-11 12:02:28 +00:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public void tick() {
|
|
|
|
+ // Paper start - fix sand duping
|
2021-06-14 08:37:14 +00:00
|
|
|
+ if (this.isRemoved()) {
|
2021-06-11 12:02:28 +00:00
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ // Paper end - fix sand duping
|
|
|
|
if (this.blockState.isAir()) {
|
2021-06-14 08:37:14 +00:00
|
|
|
this.discard();
|
2022-03-01 05:43:03 +00:00
|
|
|
} else {
|
2022-04-30 16:27:41 +00:00
|
|
|
@@ -138,6 +143,12 @@ public class FallingBlockEntity extends Entity {
|
2021-06-11 12:02:28 +00:00
|
|
|
|
|
|
|
this.move(MoverType.SELF, this.getDeltaMovement());
|
|
|
|
|
|
|
|
+ // Paper start - fix sand duping
|
2021-06-14 08:37:14 +00:00
|
|
|
+ if (this.isRemoved()) {
|
2021-06-11 12:02:28 +00:00
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ // Paper end - fix sand duping
|
|
|
|
+
|
|
|
|
// Paper start - Configurable EntityFallingBlock height nerf
|
2022-10-09 06:52:09 +00:00
|
|
|
if (this.level.paperConfig().fixes.fallingBlockHeightNerf.test(v -> this.getY() > v)) {
|
2021-06-11 12:02:28 +00:00
|
|
|
if (this.dropItem && this.level.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
|