private static void readSkipSlot(ByteBuf packet, int protocolVersion) { if ( (protocolVersion >= ProtocolConstants.MINECRAFT_1_13_2) ? packet.readBoolean() : packet.readShort() != -1 ) { if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_13_2 ) { DefinedPacket.readVarInt( packet ); } packet.skipBytes( ( protocolVersion >= ProtocolConstants.MINECRAFT_1_13 ) ? 1 : 3 ); // byte vs byte, short int position = packet.readerIndex(); if ( packet.readByte() != 0 ) { packet.readerIndex( position ); try { new NBTInputStream( new ByteBufInputStream( packet ), false ).readTag(); } catch ( IOException ex ) { throw Throwables.propagate( ex ); } } } }
/** * @return whether this NBTInputStream reads numbers in little-endian format. */ public ByteOrder getByteOrder() { return is.getEndianness(); } }
/** * Reads an NBT {@link Tag} from the stream. * * @return The tag that was read. * @throws java.io.IOException if an I/O error occurs. */ public Tag readTag() throws IOException { return readTag(0); }
/** * Flushes the stream */ public void flush() throws IOException { os.flush(); } }
/** * @return whether this NBTInputStream writes numbers in little-endian format. */ public ByteOrder getEndianness() { return os.getEndianness(); }
public void close() throws IOException { is.close(); }
public void close() throws IOException { os.close(); }
try new NBTInputStream( new ByteBufInputStream( packet ), false ).readTag(); } catch ( IOException ex )
/** * Reads an NBT {@link Tag} from the stream. * * @return The tag that was read. * @throws java.io.IOException if an I/O error occurs. */ public Tag readTag() throws IOException { return readTag(0); }
/** * @return whether this NBTInputStream reads numbers in little-endian format. */ public ByteOrder getByteOrder() { return is.getEndianness(); } }
/** * Flushes the stream */ public void flush() throws IOException { os.flush(); } }
/** * @return whether this NBTInputStream writes numbers in little-endian format. */ public ByteOrder getEndianness() { return os.getEndianness(); }
public void close() throws IOException { is.close(); }
public void close() throws IOException { os.close(); }
/** * Reads an NBT {@link Tag} from the stream. * * @return The tag that was read. * @throws java.io.IOException if an I/O error occurs. */ public Tag readTag() throws IOException { return readTag(0); }
/** * @return whether this NBTInputStream reads numbers in little-endian format. */ public ByteOrder getByteOrder() { return is.getEndianness(); } }
/** * Flushes the stream */ public void flush() throws IOException { os.flush(); } }
/** * @return whether this NBTInputStream writes numbers in little-endian format. */ public ByteOrder getEndianness() { return os.getEndianness(); }
public void close() throws IOException { is.close(); }
public void close() throws IOException { os.close(); }