From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: violetc <58360096+s-yh-china@users.noreply.github.com> Date: Fri, 16 Feb 2024 19:50:03 +0800 Subject: [PATCH] Fix falling block's block location diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java index d2fafdbce9fe1db0451bb4ad819d8e075122530e..a18f2f0d1df0fecb6f8b22a252d7a6d715eb8439 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java @@ -5052,6 +5052,15 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name int floor = Mth.floor(x); int floor1 = Mth.floor(y); int floor2 = Mth.floor(z); + + // Leaves start - fix falling block location + if (this instanceof net.minecraft.world.entity.item.FallingBlockEntity) { + if (y < 0.0 && y + 1e-10 > 0.0) { + floor1 = 0; + } + } + // Leaves end - fix falling block location + if (floor != this.blockPosition.getX() || floor1 != this.blockPosition.getY() || floor2 != this.blockPosition.getZ()) { this.blockPosition = new BlockPos(floor, floor1, floor2); this.inBlockState = null;