mirror of
https://github.com/BG-Software-LLC/WildLoaders.git
synced 2024-11-25 12:25:18 +01:00
Fixed invalid methods when using Spigot
This commit is contained in:
parent
98020c02f2
commit
0a2fbde412
@ -64,8 +64,7 @@ public final class ChunkLoaderNPC_v1_16_R3 extends EntityPlayer implements Chunk
|
|||||||
dieCall = true;
|
dieCall = true;
|
||||||
removePlayer(getWorldServer(), this);
|
removePlayer(getWorldServer(), this);
|
||||||
dieCall = false;
|
dieCall = false;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
super.die();
|
super.die();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -76,13 +75,17 @@ public final class ChunkLoaderNPC_v1_16_R3 extends EntityPlayer implements Chunk
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void removePlayer(WorldServer worldServer, EntityPlayer entityPlayer) {
|
private static void removePlayer(WorldServer worldServer, EntityPlayer entityPlayer) {
|
||||||
Chunk currentChunk = entityPlayer.getCurrentChunk();
|
Chunk currentChunk = worldServer.getChunkIfLoaded((int) entityPlayer.locX() >> 4,
|
||||||
|
(int) entityPlayer.locZ() >> 4);
|
||||||
if (currentChunk != null)
|
if (currentChunk != null)
|
||||||
currentChunk.b(entityPlayer);
|
currentChunk.b(entityPlayer);
|
||||||
|
|
||||||
worldServer.entitiesById.remove(entityPlayer.getId());
|
worldServer.entitiesById.remove(entityPlayer.getId());
|
||||||
worldServer.unregisterEntity(entityPlayer);
|
worldServer.unregisterEntity(entityPlayer);
|
||||||
|
try {
|
||||||
entityPlayer.shouldBeRemoved = true;
|
entityPlayer.shouldBeRemoved = true;
|
||||||
|
} catch (Throwable ignored) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class DummyNetworkManager extends NetworkManager {
|
public static class DummyNetworkManager extends NetworkManager {
|
||||||
|
Loading…
Reference in New Issue
Block a user