Record Class BlockEntityAttachmentInfo
java.lang.Object
java.lang.Record
dev.latvian.mods.kubejs.block.entity.BlockEntityAttachmentInfo
public record BlockEntityAttachmentInfo(String id, BlockEntityAttachmentType type, int index, EnumSet<net.minecraft.core.Direction> directions, BlockEntityAttachmentFactory factory)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionBlockEntityAttachmentInfo(String id, BlockEntityAttachmentType type, int index, EnumSet<net.minecraft.core.Direction> directions, BlockEntityAttachmentFactory factory) Creates an instance of aBlockEntityAttachmentInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionEnumSet<net.minecraft.core.Direction> Returns the value of thedirectionsrecord component.final booleanIndicates whether some other object is "equal to" this one.factory()Returns the value of thefactoryrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.intindex()Returns the value of theindexrecord component.toString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
BlockEntityAttachmentInfo
public BlockEntityAttachmentInfo(String id, BlockEntityAttachmentType type, int index, EnumSet<net.minecraft.core.Direction> directions, BlockEntityAttachmentFactory factory) Creates an instance of aBlockEntityAttachmentInforecord class.- Parameters:
id- the value for theidrecord componenttype- the value for thetyperecord componentindex- the value for theindexrecord componentdirections- the value for thedirectionsrecord componentfactory- the value for thefactoryrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
index
public int index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-
directions
Returns the value of thedirectionsrecord component.- Returns:
- the value of the
directionsrecord component
-
factory
Returns the value of thefactoryrecord component.- Returns:
- the value of the
factoryrecord component
-