Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- KLASA COutputStreamThread:
- if (toSend != null)
- {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- PacketOutputStream pos = new PacketOutputStream(baos);
- pos.handler = this.handler;
- toSend.write(pos);
- this.stream.writeVarInt(baos.size());
- baos.writeTo(this.stream);
- }
- KLASA PacketOutputStream:
- LINIJKA 34:
- public void write(int b)
- throws IOException
- {
- this.stream.write(b);
- }
- LINIJKA 115:
- public void writeVarInt(int n)
- throws IOException
- {
- while ((n & 0xFFFFFF80) != 0)
- {
- write(n & 0x7F | 0x80);
- n >>>= 7;
- }
- write(n);
- }
Advertisement
Add Comment
Please, Sign In to add comment