Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (syncDelay <= 0 && MinecraftServer.getServer() != null)
- {
- syncDelay = 5;
- ByteArrayOutputStream bos = new ByteArrayOutputStream(140);
- DataOutputStream dos = new DataOutputStream(bos);
- try
- {
- dos.writeFloat(wind.strength);
- dos.writeFloat(wind.direction);
- }
- catch (Exception ex)
- {
- ex.printStackTrace();
- }
- Packet250CustomPayload pkt = new Packet250CustomPayload();
- pkt.channel = "WindData";
- pkt.data = bos.toByteArray();
- pkt.length = bos.size();
- //pkt.isChunkDataPacket = true;
- MinecraftServer.getServer().getConfigurationManager().sendPacketToAllPlayers(pkt);
- }
Advertisement
Add Comment
Please, Sign In to add comment