Record Class PositionedBlockCollection
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.block.collection.PositionedBlockCollection
- All Implemented Interfaces:
BlockCollection, CustomRegistryOwnTypeProvider<io.netty.buffer.ByteBuf, BlockCollection>, CustomRegistryValue<io.netty.buffer.ByteBuf, BlockCollection>, RefOptimizer<BlockCollection>, WithKey, WithRef<BlockCollection>
public record PositionedBlockCollection(List<PositionedBlock> blocks)
extends Record
implements BlockCollection
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DynamicType<io.netty.buffer.ByteBuf, BlockCollection> Fields inherited from interface BlockCollection
CODEC, DATA_TYPE, EMPTY, REGISTRY, STREAM_CODECFields inherited from interface WithKey
COMPARATOR -
Constructor Summary
ConstructorsConstructorDescriptionPositionedBlockCollection(List<PositionedBlock> blocks) Creates an instance of aPositionedBlockCollectionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionblocks()Returns the value of theblocksrecord component.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.Methods inherited from interface BlockCollection
getRegistryMethods inherited from interface CustomRegistryOwnTypeProvider
typeMethods inherited from interface CustomRegistryValue
optionalKey, refMethods inherited from interface RefOptimizer
optimize
-
Field Details
-
TYPE
-
-
Constructor Details
-
PositionedBlockCollection
Creates an instance of aPositionedBlockCollectionrecord class.- Parameters:
blocks- the value for theblocksrecord component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
blocks
Returns the value of theblocksrecord component.- Returns:
- the value of the
blocksrecord component
-