/** * Retrieves a read/write structure for collections of attribute snapshots. * <p> * This modifier will automatically marshal between the visible ProtocolLib WrappedAttribute and the * internal Minecraft AttributeSnapshot. * @return A modifier for AttributeSnapshot collection fields. */ public StructureModifier<List<WrappedAttribute>> getAttributeCollectionModifier() { // Convert to and from the ProtocolLib wrapper return structureModifier.withType( Collection.class, BukkitConverters.getListConverter(BukkitConverters.getWrappedAttributeConverter()) ); }
builder.put(MinecraftReflection.getWorldTypeClass(), (EquivalentConverter) getWorldTypeConverter()); if (hasAttributeSnapshot) builder.put(MinecraftReflection.getAttributeSnapshotClass(), (EquivalentConverter) getWrappedAttributeConverter());