mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-07 19:12:22 +01:00
63 lines
No EOL
3.3 KiB
Diff
63 lines
No EOL
3.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Shane Freeder <theboyetronic@gmail.com>
|
|
Date: Fri, 17 Mar 2017 01:45:15 +0000
|
|
Subject: [PATCH] Fix a duplicate alive entity on second world
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
|
index 0e1d9817..92ba4fcb 100644
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener {
|
|
// CraftBukkit end */
|
|
|
|
this.world.kill(this);
|
|
- this.dead = false;
|
|
+ //this.dead = false; // Paper - Mark entity as dead before we actually move it to the new world
|
|
this.world.methodProfiler.a("reposition");
|
|
/* CraftBukkit start - Handled in calculateTarget
|
|
BlockPosition blockposition;
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
|
index a9d59bbf..a83a3054 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
|
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
|
entityplayer.playerConnection.sendPacket(new PacketPlayOutRespawn(entityplayer.dimension, entityplayer.world.getDifficulty(), entityplayer.world.getWorldData().getType(), entityplayer.playerInteractManager.getGameMode()));
|
|
this.f(entityplayer);
|
|
worldserver.removeEntity(entityplayer);
|
|
- entityplayer.dead = false;
|
|
+ //entityplayer.dead = false; // Paper - He's dead jim - Handle players the same way we do all entities
|
|
this.changeWorld(entityplayer, j, worldserver, worldserver1);
|
|
this.a(entityplayer, worldserver);
|
|
entityplayer.playerConnection.a(entityplayer.locX, entityplayer.locY, entityplayer.locZ, entityplayer.yaw, entityplayer.pitch);
|
|
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
|
|
|
worldserver.methodProfiler.a("moving");
|
|
entity.setPositionRotation(exit.getX(), exit.getY(), exit.getZ(), exit.getYaw(), exit.getPitch());
|
|
- if (entity.isAlive()) {
|
|
+ //if (entity.isAlive()) { // Paper - The entity will be dead, that's okay
|
|
worldserver.entityJoinedWorld(entity, false);
|
|
- }
|
|
+ //} // Paper
|
|
/*
|
|
if (entity.dimension == -1) {
|
|
d0 = MathHelper.a(d0 / 8.0D, worldserver1.getWorldBorder().b() + 16.0D, worldserver1.getWorldBorder().d() - 16.0D);
|
|
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
|
d0 = (double) MathHelper.clamp((int) d0, -29999872, 29999872);
|
|
d1 = (double) MathHelper.clamp((int) d1, -29999872, 29999872);
|
|
*/
|
|
- if (entity.isAlive()) {
|
|
+ //if (entity.isAlive()) { // Paper - The entity will be dead, that's okay
|
|
// entity.setPositionRotation(d0, entity.locY, d1, entity.yaw, entity.pitch);
|
|
// worldserver1.getTravelAgent().a(entity, f);
|
|
if (portal) {
|
|
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
|
}
|
|
// worldserver1.addEntity(entity);
|
|
worldserver1.entityJoinedWorld(entity, false);
|
|
- }
|
|
+ //} // Paper
|
|
|
|
worldserver.methodProfiler.b();
|
|
}
|
|
--
|