42 lines
2.2 KiB
Diff
42 lines
2.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: MrHua269 <wangxyper@163.com>
|
|
Date: Wed, 31 Jul 2024 14:51:16 +0800
|
|
Subject: [PATCH] Fix-MC-2025
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
index bd0e0cd7888dbb24d941aedd88e9232e98935cab..075f3766e51d40fdb4ce2dd36bf19bc4c24d24eb 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -2622,6 +2622,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
nbttagcompound.putBoolean("Paper.FreezeLock", true);
|
|
}
|
|
// Paper end
|
|
+
|
|
+ // Luminol start - Fix MC-2025
|
|
+ AABB boundingBox = getBoundingBox();
|
|
+ ListTag boundingBoxList = new ListTag();
|
|
+ for (double coord : new double[]{boundingBox.minX, boundingBox.minY, boundingBox.minZ, boundingBox.maxX, boundingBox.maxY, boundingBox.maxZ}) {
|
|
+ boundingBoxList.add(DoubleTag.valueOf(coord));
|
|
+ }
|
|
+ nbttagcompound.put("Luminol.BoundingBox", boundingBoxList);
|
|
+ // Luminol end
|
|
+
|
|
return nbttagcompound;
|
|
} catch (Throwable throwable) {
|
|
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
|
|
@@ -2699,6 +2709,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
this.reapplyPosition();
|
|
}
|
|
|
|
+ // Luminol start - Fix MC-2025
|
|
+ if (nbt.contains("Luminol.BoundingBox", net.minecraft.nbt.Tag.TAG_LIST)) {
|
|
+ ListTag boundingBoxList = nbt.getList("Luminol.BoundingBox", net.minecraft.nbt.Tag.TAG_DOUBLE);
|
|
+ setBoundingBox(new AABB(boundingBoxList.getDouble(0), boundingBoxList.getDouble(1), boundingBoxList.getDouble(2), boundingBoxList.getDouble(3), boundingBoxList.getDouble(4), boundingBoxList.getDouble(5)));
|
|
+ }
|
|
+ // Luminol end
|
|
+
|
|
} else {
|
|
throw new IllegalStateException("Entity has invalid rotation");
|
|
}
|