Record Class ETableStorage.SlotData
java.lang.Object
java.lang.Record
com.hammy275.immersivemc.common.immersive.storage.network.impl.ETableStorage.SlotData
- Enclosing class:
ETableStorage
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ETableStorage.SlotDatadecode(net.minecraft.network.FriendlyByteBuf buffer) Returns the value of theenchantmentHintLevelsrecord component.Returns the value of theenchantmentHintsrecord component.voidencode(net.minecraft.network.FriendlyByteBuf buffer) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.intxpLevel()Returns the value of thexpLevelrecord component.
-
Field Details
-
DEFAULT
-
-
Constructor Details
-
SlotData
Creates an instance of aSlotDatarecord class.- Parameters:
xpLevel- the value for thexpLevelrecord componentenchantmentHints- the value for theenchantmentHintsrecord componentenchantmentHintLevels- the value for theenchantmentHintLevelsrecord component
-
-
Method Details
-
encode
public void encode(net.minecraft.network.FriendlyByteBuf buffer) -
decode
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
xpLevel
public int xpLevel()Returns the value of thexpLevelrecord component.- Returns:
- the value of the
xpLevelrecord component
-
enchantmentHints
Returns the value of theenchantmentHintsrecord component.- Returns:
- the value of the
enchantmentHintsrecord component
-
enchantmentHintLevels
Returns the value of theenchantmentHintLevelsrecord component.- Returns:
- the value of the
enchantmentHintLevelsrecord component
-