readFully

public NBTCompound readFully(NBTFilter filter)

Reads an entire NBT compound from the stream. Any properties not allowed in the output (as per the filter's rules) will be skipped in the underlying stream.

Return

The read compound, conforming to the filter's rules.

Parameters

filter

A filter used to determine which properties should and should not be added to the resulting compound and any of its child tags. Tags not allowed by the filter will not be read, and instead will be skipped over in the stream itself.

Throws

If the compound or any of its child tags could not be read.