geforkt von Mirrors/Paper
SPIGOT-2115: Fix entities being added to the world multiple times when teleported
Dieser Commit ist enthalten in:
Ursprung
048849ce51
Commit
f01861f80b
@ -588,12 +588,12 @@
|
||||
+ double d1 = enter.getZ();
|
||||
+ double d2 = 8.0D;
|
||||
+ /*
|
||||
+ double d0 = entity.locX;
|
||||
+ double d1 = entity.locZ;
|
||||
+ double d2 = 8.0D;
|
||||
+ float f = entity.yaw;
|
||||
+
|
||||
+ worldserver.methodProfiler.a("moving");
|
||||
double d0 = entity.locX;
|
||||
double d1 = entity.locZ;
|
||||
double d2 = 8.0D;
|
||||
float f = entity.yaw;
|
||||
|
||||
worldserver.methodProfiler.a("moving");
|
||||
+ */
|
||||
+ if (worldserver1.dimension == -1) {
|
||||
+ d0 = MathHelper.a(d0 / d2, worldserver1.getWorldBorder().b()+ 16.0D, worldserver1.getWorldBorder().d() - 16.0D);
|
||||
@ -663,12 +663,12 @@
|
||||
+ int i = worldserver.dimension;
|
||||
+
|
||||
+ /*
|
||||
double d0 = entity.locX;
|
||||
double d1 = entity.locZ;
|
||||
double d2 = 8.0D;
|
||||
float f = entity.yaw;
|
||||
|
||||
worldserver.methodProfiler.a("moving");
|
||||
+ double d0 = entity.locX;
|
||||
+ double d1 = entity.locZ;
|
||||
+ double d2 = 8.0D;
|
||||
+ float f = entity.yaw;
|
||||
+
|
||||
+ worldserver.methodProfiler.a("moving");
|
||||
+ */
|
||||
+ entity.setPositionRotation(exit.getX(), exit.getY(), exit.getZ(), exit.getYaw(), exit.getPitch());
|
||||
+ if (entity.isAlive()) {
|
||||
@ -687,7 +687,7 @@
|
||||
blockposition = worldserver1.getSpawn();
|
||||
} else {
|
||||
blockposition = worldserver1.getDimensionSpawn();
|
||||
@@ -526,15 +903,26 @@
|
||||
@@ -526,16 +903,27 @@
|
||||
worldserver.entityJoinedWorld(entity, false);
|
||||
}
|
||||
}
|
||||
@ -703,6 +703,7 @@
|
||||
if (entity.isAlive()) {
|
||||
- entity.setPositionRotation(d0, entity.locY, d1, entity.yaw, entity.pitch);
|
||||
- worldserver1.getTravelAgent().a(entity, f);
|
||||
- worldserver1.addEntity(entity);
|
||||
+ // entity.setPositionRotation(d0, entity.locY, d1, entity.yaw, entity.pitch);
|
||||
+ // worldserver1.getTravelAgent().a(entity, f);
|
||||
+ if (portal) {
|
||||
@ -713,9 +714,10 @@
|
||||
+ entity.getBukkitEntity().setVelocity(velocity);
|
||||
+ }
|
||||
+ }
|
||||
worldserver1.addEntity(entity);
|
||||
+ // worldserver1.addEntity(entity);
|
||||
worldserver1.entityJoinedWorld(entity, false);
|
||||
}
|
||||
|
||||
@@ -543,6 +931,7 @@
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren