Record Class BlockRegistry.Definition
java.lang.Object
java.lang.Record
net.rebel459.unified.impl.data.registry.BlockRegistry.Definition
- Enclosing class:
BlockRegistry
public static record BlockRegistry.Definition(ExtensibleCodecBase.Entry<Function<net.minecraft.world.level.block.state.BlockBehaviour.Properties, ? extends net.minecraft.world.level.block.Block>> type, BlockRegistry.Properties properties, Optional<Supplier<net.minecraft.world.level.block.entity.BlockEntityType<?>>> blockEntity)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionDefinition(ExtensibleCodecBase.Entry<Function<net.minecraft.world.level.block.state.BlockBehaviour.Properties, ? extends net.minecraft.world.level.block.Block>> type, BlockRegistry.Properties properties, Optional<Supplier<net.minecraft.world.level.block.entity.BlockEntityType<?>>> blockEntity) Creates an instance of aDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theblockEntityrecord component.final booleanIndicates whether some other object is "equal to" this one.Function<net.minecraft.world.level.block.state.BlockBehaviour.Properties, ? extends net.minecraft.world.level.block.Block> factory()final inthashCode()Returns a hash code value for this object.Returns the value of thepropertiesrecord component.final StringtoString()Returns a string representation of this record class.ExtensibleCodecBase.Entry<Function<net.minecraft.world.level.block.state.BlockBehaviour.Properties, ? extends net.minecraft.world.level.block.Block>> type()Returns the value of thetyperecord component.
-
Constructor Details
-
Definition
public Definition(ExtensibleCodecBase.Entry<Function<net.minecraft.world.level.block.state.BlockBehaviour.Properties, ? extends net.minecraft.world.level.block.Block>> type, BlockRegistry.Properties properties, Optional<Supplier<net.minecraft.world.level.block.entity.BlockEntityType<?>>> blockEntity) Creates an instance of aDefinitionrecord class.- Parameters:
type- the value for thetyperecord componentproperties- the value for thepropertiesrecord componentblockEntity- the value for theblockEntityrecord component
-
-
Method Details
-
factory
public Function<net.minecraft.world.level.block.state.BlockBehaviour.Properties, ? extends net.minecraft.world.level.block.Block> factory() -
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). -
type
public ExtensibleCodecBase.Entry<Function<net.minecraft.world.level.block.state.BlockBehaviour.Properties, ? extends net.minecraft.world.level.block.Block>> type()Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
properties
Returns the value of thepropertiesrecord component.- Returns:
- the value of the
propertiesrecord component
-
blockEntity
-