use of org.dragonet.protocol.packets.RemoveEntityPacket in project DragonProxy by DragonetMC.
the class PCDestroyEntitiesPacketTranslator method translate.
public PEPacket[] translate(UpstreamSession session, ServerEntityDestroyPacket packet) {
PEPacket[] ret = new PEPacket[packet.getEntityIds().length];
for (int i = 0; i < ret.length; i++) {
CachedEntity e = session.getEntityCache().removeByRemoteEID(packet.getEntityIds()[i]);
if (e == null) {
continue;
}
ret[i] = new RemoveEntityPacket();
((RemoveEntityPacket) ret[i]).eid = e.proxyEid;
}
return ret;
}
Aggregations