Archiviert
13
0

Added the ability of reading/writing lists of NBT classes!

Works perfectly with MapChunk-Packet's TileEntity-Data!
Dieser Commit ist enthalten in:
verbuchselt 2016-09-07 11:37:30 +02:00
Ursprung caaa57c915
Commit 474c74b1f9

Datei anzeigen

@ -520,6 +520,21 @@ public class PacketContainer implements Serializable {
BukkitConverters.getNbtConverter());
}
/**
* Retrieves a read/write structure for lists of NBT classes.
* @return A modifier for lists of NBT classes.
*/
public StructureModifier<List<NbtBase<?>>> getListNbtModifier() {
// Convert to and from the ProtocolLib wrapper
return structureModifier.withType(
Collection.class,
BukkitConverters.getListConverter(
MinecraftReflection.getNBTBaseClass(),
BukkitConverters.getNbtConverter()
)
);
}
/**
* Retrieves a read/write structure for Vectors.
* @return A modifier for Vectors.