mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 12:41:50 +01:00
b31089a929
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: d264e972 #591: Add option for a consumer before spawning an item 1c537fce #590: Add spawn and transform reasons for piglin zombification. CraftBukkit Changes: ee5006d1 #810: Add option for a consumer before spawning an item f6a39d3c #809: Add spawn and transform reasons for piglin zombification. 0c24068a Organise imports Spigot Changes: bff52619 Organise imports
29 lines
1.5 KiB
Diff
29 lines
1.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: AJMFactsheets <AJMFactsheets@gmail.com>
|
|
Date: Fri, 17 Jan 2020 17:17:54 -0600
|
|
Subject: [PATCH] Fix items not falling correctly
|
|
|
|
Since 1.14, Mojang has added an optimization which skips checking if
|
|
an item should fall every fourth tick.
|
|
|
|
However, Spigot's entity activation range class also has an
|
|
optimization which skips ticking active entities every fourth tick.
|
|
This can result in a state where an item will never properly fall
|
|
due to its move method never being called.
|
|
|
|
This patch resolves the conflict by offsetting checking an item's
|
|
move method from Spigot's entity activation range check.
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
|
|
index 4a20ceaf649f91860047017028809cd8040c9e58..0e75d97254c73b2525380024b41a42f56d87b3a5 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
|
@@ -90,7 +90,7 @@ public class EntityItem extends Entity {
|
|
}
|
|
}
|
|
|
|
- if (!this.onGround || c(this.getMot()) > 9.999999747378752E-6D || (this.ticksLived + this.getId()) % 4 == 0) {
|
|
+ if (!this.onGround || c(this.getMot()) > 9.999999747378752E-6D || this.ticksLived % 4 == 0) { // Paper - Ensure checking item movement is always offset from Spigot's entity activation range check
|
|
this.move(EnumMoveType.SELF, this.getMot());
|
|
float f1 = 0.98F;
|
|
|