Record Class NativeBundleTooltipItems
java.lang.Object
java.lang.Record
net.raphimc.viabedrock.api.model.NativeBundleTooltipItems
public record NativeBundleTooltipItems(int identity, int slots, Map<Integer, NativeBundleTooltipItems.Preview> entries)
extends Record
Physical previews are independent of the compacted and capacity-limited Java bundle component.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final Stringstatic final com.viaversion.viaversion.api.type.Type<NativeBundleTooltipItems> -
Constructor Summary
ConstructorsConstructorDescriptionNativeBundleTooltipItems(int identity, int slots, Map<Integer, NativeBundleTooltipItems.Preview> entries) Creates an instance of aNativeBundleTooltipItemsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic NativeBundleTooltipItemsdecode(byte[] bytes, NativeBundleTooltipData data) byte[]encode()entries()Returns the value of theentriesrecord component.final booleanIndicates whether some other object is "equal to" this one.static NativeBundleTooltipItemsfromTag(com.viaversion.nbt.tag.CompoundTag tag) final inthashCode()Returns a hash code value for this object.intidentity()Returns the value of theidentityrecord component.booleanintslots()Returns the value of theslotsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
TAG
- See Also:
-
MAX_BYTES
public static final int MAX_BYTES- See Also:
-
TYPE
-
-
Constructor Details
-
NativeBundleTooltipItems
public NativeBundleTooltipItems(int identity, int slots, Map<Integer, NativeBundleTooltipItems.Preview> entries) Creates an instance of aNativeBundleTooltipItemsrecord class.- Parameters:
identity- the value for theidentityrecord componentslots- the value for theslotsrecord componententries- the value for theentriesrecord component
-
-
Method Details
-
matches
-
encode
public byte[] encode() -
fromTag
-
decode
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
identity
public int identity()Returns the value of theidentityrecord component.- Returns:
- the value of the
identityrecord component
-
slots
public int slots()Returns the value of theslotsrecord component.- Returns:
- the value of the
slotsrecord component
-
entries
Returns the value of theentriesrecord component.- Returns:
- the value of the
entriesrecord component
-