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.SlotData
decode
(net.minecraft.network.FriendlyByteBuf buffer) Returns the value of theenchantmentHintLevels
record component.Returns the value of theenchantmentHints
record component.void
encode
(net.minecraft.network.FriendlyByteBuf buffer) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.int
xpLevel()
Returns the value of thexpLevel
record component.
-
Field Details
-
DEFAULT
-
-
Constructor Details
-
SlotData
Creates an instance of aSlotData
record class.- Parameters:
xpLevel
- the value for thexpLevel
record componentenchantmentHints
- the value for theenchantmentHints
record componentenchantmentHintLevels
- the value for theenchantmentHintLevels
record 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 thexpLevel
record component.- Returns:
- the value of the
xpLevel
record component
-
enchantmentHints
Returns the value of theenchantmentHints
record component.- Returns:
- the value of the
enchantmentHints
record component
-
enchantmentHintLevels
Returns the value of theenchantmentHintLevels
record component.- Returns:
- the value of the
enchantmentHintLevels
record component
-