Package com.beansgalaxy.backpacks.data
Record Class EnderStorage.ViewerRecord
java.lang.Object
java.lang.Record
com.beansgalaxy.backpacks.data.EnderStorage.ViewerRecord
- Enclosing class:
- EnderStorage
public static record EnderStorage.ViewerRecord(net.minecraft.world.entity.Entity entity, BackData backData, EntityEnder ender, net.minecraft.server.level.ServerLevel level)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionViewerRecord(net.minecraft.world.entity.Entity entity, BackData backData, EntityEnder ender, net.minecraft.server.level.ServerLevel level) Creates an instance of aViewerRecordrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbackData()Returns the value of thebackDatarecord component.ender()Returns the value of theenderrecord component.net.minecraft.world.entity.Entityentity()Returns the value of theentityrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.server.level.ServerLevellevel()Returns the value of thelevelrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ViewerRecord
public ViewerRecord(net.minecraft.world.entity.Entity entity, BackData backData, EntityEnder ender, net.minecraft.server.level.ServerLevel level) Creates an instance of aViewerRecordrecord class.- Parameters:
entity- the value for theentityrecord componentbackData- the value for thebackDatarecord componentender- the value for theenderrecord componentlevel- the value for thelevelrecord component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
entity
public net.minecraft.world.entity.Entity entity()Returns the value of theentityrecord component.- Returns:
- the value of the
entityrecord component
-
backData
Returns the value of thebackDatarecord component.- Returns:
- the value of the
backDatarecord component
-
ender
Returns the value of theenderrecord component.- Returns:
- the value of the
enderrecord component
-
level
public net.minecraft.server.level.ServerLevel level()Returns the value of thelevelrecord component.- Returns:
- the value of the
levelrecord component
-