Fix spawnreason saving

This commit is contained in:
Nassim Jahnke 2024-02-23 23:13:37 +01:00
parent d0ebfbbd15
commit 681bbff110
No known key found for this signature in database
GPG key ID: EF6771C01F6EF02F
25 changed files with 79 additions and 69 deletions

View file

@ -16,10 +16,10 @@ So even if something NEW comes up, it would be impossible to drop the
same item twice because the source was destroyed.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 97dd8b932426496694b50984b1dcff390711e4c9..4123d523d57f3a267753a871e938de675fcaf8c8 100644
index 7619f6e772d2fab177a83b083bcce3d2ee1d9a95..9c9689f4deffed50df9aaca6e451228d17154b8c 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2416,11 +2416,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -2419,11 +2419,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
} else {
// CraftBukkit start - Capture drops for death event
if (this instanceof net.minecraft.world.entity.LivingEntity && !((net.minecraft.world.entity.LivingEntity) this).forceDrops) {
@ -34,7 +34,7 @@ index 97dd8b932426496694b50984b1dcff390711e4c9..4123d523d57f3a267753a871e938de67
entityitem.setDefaultPickUpDelay();
// CraftBukkit start
@@ -3219,6 +3220,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -3222,6 +3223,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@Nullable
public Entity teleportTo(ServerLevel worldserver, Vec3 location) {
// CraftBukkit end
@ -47,7 +47,7 @@ index 97dd8b932426496694b50984b1dcff390711e4c9..4123d523d57f3a267753a871e938de67
if (this.level() instanceof ServerLevel && !this.isRemoved()) {
this.level().getProfiler().push("changeDimension");
// CraftBukkit start
@@ -3245,6 +3252,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -3248,6 +3255,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
// CraftBukkit end
this.level().getProfiler().popPush("reloading");
@ -59,7 +59,7 @@ index 97dd8b932426496694b50984b1dcff390711e4c9..4123d523d57f3a267753a871e938de67
Entity entity = this.getType().create(worldserver);
if (entity != null) {
@@ -3262,10 +3274,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -3265,10 +3277,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
// CraftBukkit start - Forward the CraftEntity to the new entity
this.getBukkitEntity().setHandle(entity);
entity.bukkitEntity = this.getBukkitEntity();
@ -70,7 +70,7 @@ index 97dd8b932426496694b50984b1dcff390711e4c9..4123d523d57f3a267753a871e938de67
// CraftBukkit end
}
@@ -3384,7 +3392,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -3387,7 +3395,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
public boolean canChangeDimensions() {