Inform clients of entity destruction for all entity types

This commit is contained in:
Holly Stubbs 2023-11-12 23:59:54 +00:00
parent 278c90f5f9
commit 1a08b5e991
Signed by: tgpholly
GPG key ID: B8583C4B7D18119E

View file

@ -73,7 +73,6 @@ export class World {
entity.justUnloaded = new Array<number>();
this.players.remove(entity.entityId);
this.sendToNearbyClients(entity, new PacketDestroyEntity(entity.entityId).writeData());
const writer = createWriter(Endian.BE);
entity.toSave(writer);
@ -82,7 +81,7 @@ export class World {
}
this.entites.remove(entity.entityId);
// TODO: Inform clients about entity removal
this.sendToNearbyClients(entity, new PacketDestroyEntity(entity.entityId).writeData());
}
public chunkExists(coordPairOrX:number, chunkZ?:number) {