public bool unpack(Kaminari.IMarshal marshal, Kaminari.PacketReader packet) { int size_data = packet.getData().readByte(); this.data = new List <EntityUpdate>(); for (int i = 0; i < size_data; ++i) { EntityUpdate data = new EntityUpdate(); if (data.unpack(marshal, packet)) { this.data.Add(data); } else { return(false); } } return(true); }
public static void broadcastWorldUpdateSingle(Kaminari.Client <ProtocolQueues> client, Kaminari.IBroadcaster <ProtocolQueues> broadcaster, EntityUpdate data) { client.getProtocol().getPhaseSync().OneShot(() => Kumo.Unsafe.broadcastWorldUpdateSingle(broadcaster, data)); }
public static void sendWorldUpdate(Kaminari.Client <ProtocolQueues> client, EntityUpdate data) { client.getProtocol().getPhaseSync().OneShot(() => Kumo.Unsafe.sendWorldUpdate(client.getSuperPacket().getQueues(), data)); }
public static void broadcastWorldUpdateSingle(Kaminari.IBroadcaster <ProtocolQueues> broadcaster, EntityUpdate data) { broadcaster.broadcast((ProtocolQueues pq) => pq.sendEventuallySynced((ushort)Opcodes.opcodeWorldUpdate, data)); }
public static void sendWorldUpdate(ProtocolQueues pq, EntityUpdate data) { pq.sendEventuallySynced((ushort)Opcodes.opcodeWorldUpdate, data); }