Record Class ItemRegistry.BlockItemDefinition
java.lang.Object
java.lang.Record
net.rebel459.unified.impl.data.registry.ItemRegistry.BlockItemDefinition
- Enclosing class:
ItemRegistry
public static record ItemRegistry.BlockItemDefinition(Supplier<net.minecraft.world.level.block.Block> block, ExtensibleCodecBase.Entry<BiFunction<net.minecraft.world.level.block.Block, net.minecraft.world.item.Item.Properties, net.minecraft.world.item.Item>> type)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionBlockItemDefinition(Supplier<net.minecraft.world.level.block.Block> block, ExtensibleCodecBase.Entry<BiFunction<net.minecraft.world.level.block.Block, net.minecraft.world.item.Item.Properties, net.minecraft.world.item.Item>> type) Creates an instance of aBlockItemDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionSupplier<net.minecraft.world.level.block.Block> block()Returns the value of theblockrecord component.final booleanIndicates whether some other object is "equal to" this one.BiFunction<net.minecraft.world.level.block.Block, net.minecraft.world.item.Item.Properties, net.minecraft.world.item.Item> factory()final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.ExtensibleCodecBase.Entry<BiFunction<net.minecraft.world.level.block.Block, net.minecraft.world.item.Item.Properties, net.minecraft.world.item.Item>> type()Returns the value of thetyperecord component.
-
Constructor Details
-
BlockItemDefinition
public BlockItemDefinition(Supplier<net.minecraft.world.level.block.Block> block, ExtensibleCodecBase.Entry<BiFunction<net.minecraft.world.level.block.Block, net.minecraft.world.item.Item.Properties, net.minecraft.world.item.Item>> type) Creates an instance of aBlockItemDefinitionrecord class.- Parameters:
block- the value for theblockrecord componenttype- the value for thetyperecord component
-
-
Method Details
-
factory
public BiFunction<net.minecraft.world.level.block.Block, net.minecraft.world.item.Item.Properties, net.minecraft.world.item.Item> 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). -
block
Returns the value of theblockrecord component.- Returns:
- the value of the
blockrecord component
-
type
public ExtensibleCodecBase.Entry<BiFunction<net.minecraft.world.level.block.Block, net.minecraft.world.item.Item.Properties, net.minecraft.world.item.Item>> type()Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-