13
0
geforkt von Mirrors/Paper

Fix #5856 Entity origin (#5861)

Dieser Commit ist enthalten in:
djytw 2021-06-18 03:37:23 +00:00
Ursprung 1942e47836
Commit 5e9ba09e6d
3 geänderte Dateien mit 7 neuen und 7 gelöschten Zeilen

Datei anzeigen

@ -15,7 +15,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ new com.destroystokyo.paper.event.entity.EntityAddToWorldEvent(entity.getBukkitEntity()).callEvent(); // Paper - fire while valid
}
}
public void onTrackingEnd(Entity entity) {
@@ -0,0 +0,0 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
}

Datei anzeigen

@ -9,9 +9,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -0,0 +0,0 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
entityplayer.connection.send(new ClientboundBlockDestructionPacket(entityId, pos, progress));
}
}
entity.valid = true; // CraftBukkit
+ // Paper start - Set origin location when the entity is being added to the world
+ if (entity.getOriginVector() == null) {
+ entity.setOrigin(entity.getBukkitEntity().getLocation());
@ -19,7 +19,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper end
}
}
public void onTrackingEnd(Entity entity) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java

Datei anzeigen

@ -43,6 +43,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
entity.valid = true; // CraftBukkit
+ ServerLevel.this.getChunkSource().addEntity(entity);
}
public void onTrackingEnd(Entity entity) {
// Paper start - Set origin location when the entity is being added to the world
if (entity.getOriginVector() == null) {
entity.setOrigin(entity.getBukkitEntity().getLocation());