mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-23 08:59:31 +00:00
Update Paper
This commit is contained in:
25
patches/server/0123-Fix-falling-block-s-block-location.patch
Normal file
25
patches/server/0123-Fix-falling-block-s-block-location.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
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/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 056f56fd321aa2f23b633f7c59672e2ef4c32a9e..73afd4ac34b5e7e26d8acdf59ad60cae2762df57 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -4838,6 +4838,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
int j = Mth.floor(y);
|
||||
int k = 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) {
|
||||
+ j = 0;
|
||||
+ }
|
||||
+ }
|
||||
+ // Leaves end - fix falling block location
|
||||
+
|
||||
if (i != this.blockPosition.getX() || j != this.blockPosition.getY() || k != this.blockPosition.getZ()) {
|
||||
this.blockPosition = new BlockPos(i, j, k);
|
||||
this.inBlockState = null;
|
||||
Reference in New Issue
Block a user