mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-23 08:49:18 +00:00
Upstream has released updates that appear to apply and compile correctly Purpur Changes: PurpurMC/Purpur@9690640 Updated Upstream (Paper) PurpurMC/Purpur@20c48cd override the correct BlockPlayerDestroy method PurpurMC/Purpur@ddc4fa9 Add configurable "sleep.not_possible" actionbar message (#1414) PurpurMC/Purpur@8d384b0 Add option to always show item in player death messages (#1418) PurpurMC/Purpur@cf23229 Updated Upstream (Paper) PurpurMC/Purpur@ad645dc option to place end crystal on any block
46 lines
2.5 KiB
Diff
46 lines
2.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
|
Date: Sun, 11 Jun 2023 23:59:29 +0300
|
|
Subject: [PATCH] Fix MC-2025
|
|
|
|
Original post on Mojira: https://bugs.mojang.com/browse/MC-2025
|
|
Fix taken from Reddit: https://redd.it/8pgd4q
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
index 95b6639d0075c2b86f83718b3093f972d2e89b83..51b31ac8526a35e460c87ae467413db1f7c41752 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -2490,6 +2490,17 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
|
nbt.putBoolean("Purpur.FireImmune", immuneToFire);
|
|
}
|
|
// Purpur end
|
|
+
|
|
+ // DivineMC start - Fix MC-2025
|
|
+ // This fix was taken from Reddit: https://redd.it/8pgd4q
|
|
+ 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));
|
|
+ }
|
|
+ nbt.put("DivineMC.BoundingBox", boundingBoxList);
|
|
+ // DivineMC end
|
|
+
|
|
return nbt;
|
|
} catch (Throwable throwable) {
|
|
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
|
|
@@ -2567,6 +2578,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
|
this.reapplyPosition();
|
|
}
|
|
|
|
+ // DivineMC start - Fix MC-2025
|
|
+ // This fix was taken from Reddit: https://redd.it/8pgd4q
|
|
+ if (nbt.contains("DivineMC.BoundingBox", net.minecraft.nbt.Tag.TAG_LIST)) {
|
|
+ ListTag boundingBoxList = nbt.getList("DivineMC.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)));
|
|
+ }
|
|
+ // DivineMC end
|
|
+
|
|
} else {
|
|
throw new IllegalStateException("Entity has invalid rotation");
|
|
}
|