aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0382-Fix-sand-duping.patch
diff options
context:
space:
mode:
authorOwen <[email protected]>2024-03-03 17:05:34 -0500
committerGitHub <[email protected]>2024-03-03 17:05:34 -0500
commit89d51d5f298cd25d6f44388970596c6780b5664b (patch)
tree07f41f4ce7bc466ea5e35faa2575d0ec6f6c4a76 /patches/server/0382-Fix-sand-duping.patch
parentb21eb4d9a4d0d0bea857675e2186657592df548e (diff)
downloadPaper-89d51d5f298cd25d6f44388970596c6780b5664b.tar.gz
Paper-89d51d5f298cd25d6f44388970596c6780b5664b.zip
Allow enabling sand duping (#10191)
Because this exploit has been widely known for years and has not been fixed by Mojang, we decided that it was worth allowing people to toggle it on/off due to how easy it is to make it configurable. It should be noted that this decision does not promise all future exploits will be configurable.
Diffstat (limited to 'patches/server/0382-Fix-sand-duping.patch')
-rw-r--r--patches/server/0382-Fix-sand-duping.patch36
1 files changed, 0 insertions, 36 deletions
diff --git a/patches/server/0382-Fix-sand-duping.patch b/patches/server/0382-Fix-sand-duping.patch
deleted file mode 100644
index f99be8b6c7..0000000000
--- a/patches/server/0382-Fix-sand-duping.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Spottedleaf <[email protected]>
-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 c0477f913867c67809978a4f240303151d81e6ea..33cc2d1a4723ec07c4201eb6e0080d5e0281e1f0 100644
---- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
-+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
-@@ -132,6 +132,11 @@ public class FallingBlockEntity extends Entity {
-
- @Override
- public void tick() {
-+ // Paper start - fix sand duping
-+ if (this.isRemoved()) {
-+ return;
-+ }
-+ // Paper end - fix sand duping
- if (this.blockState.isAir()) {
- this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
- } else {
-@@ -143,6 +148,11 @@ public class FallingBlockEntity extends Entity {
- }
-
- this.move(MoverType.SELF, this.getDeltaMovement());
-+ // Paper start - fix sand duping
-+ if (this.isRemoved()) {
-+ return;
-+ }
-+ // Paper end - fix sand duping
- // Paper start - Configurable falling blocks height nerf
- if (this.level().paperConfig().fixes.fallingBlockHeightNerf.test(v -> this.getY() > v)) {
- if (this.dropItem && this.level().getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {