Class ItemCustomModelData
java.lang.Object
com.github.retrooper.packetevents.protocol.component.builtin.item.ItemCustomModelData
Custom model data was completely rewritten with 1.21.4.
Before 1.21.4, this used to be a single integer.
With 1.21.4, this is now a holder of many elements.
If possible, use ComponentTypes.ITEM_MODEL
instead for specifying which model an item should have.
When working with legacy versions, the first element in the floats
will represent the legacy single integer, just like Mojang is handling this.
-
Constructor Summary
ConstructorsConstructorDescriptionItemCustomModelData(int legacyId) ItemCustomModelData(List<Float> floats, List<Boolean> flags, List<String> strings, List<Color> colors) -
Method Summary
Modifier and TypeMethodDescriptiongetFlags()intstatic ItemCustomModelDataread(PacketWrapper<?> wrapper) voidvoidvoidvoidsetLegacyId(int legacyId) voidsetStrings(List<String> strings) static voidwrite(PacketWrapper<?> wrapper, ItemCustomModelData data)
-
Constructor Details
-
ItemCustomModelData
-
ItemCustomModelData
public ItemCustomModelData(int legacyId)
-
-
Method Details
-
read
-
write
-
getFloats
-
setFloats
-
getFlags
-
setFlags
-
getStrings
-
setStrings
-
getColors
-
setColors
-
getLegacyId
@Obsolete public int getLegacyId() -
setLegacyId
@Obsolete public void setLegacyId(int legacyId)
-