Record Class ItemRegistry.Definition
java.lang.Object
java.lang.Record
net.rebel459.unified.impl.data.registry.ItemRegistry.Definition
- Enclosing class:
ItemRegistry
public static record ItemRegistry.Definition(com.mojang.datafixers.util.Either<ItemRegistry.BlockItemDefinition, ExtensibleCodecBase.Entry<Function<net.minecraft.world.item.Item.Properties, net.minecraft.world.item.Item>>> factoryType, Map<net.minecraft.core.component.DataComponentType<?>, Object> properties)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionDefinition(com.mojang.datafixers.util.Either<ItemRegistry.BlockItemDefinition, ExtensibleCodecBase.Entry<Function<net.minecraft.world.item.Item.Properties, net.minecraft.world.item.Item>>> factoryType, Map<net.minecraft.core.component.DataComponentType<?>, Object> properties) Creates an instance of aDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ItemRegistry.DefinitionblockItem(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, Map<net.minecraft.core.component.DataComponentType<?>, Object> properties) final booleanIndicates whether some other object is "equal to" this one.com.mojang.datafixers.util.Either<ItemRegistry.BlockItemDefinition, ExtensibleCodecBase.Entry<Function<net.minecraft.world.item.Item.Properties, net.minecraft.world.item.Item>>> Returns the value of thefactoryTyperecord component.final inthashCode()Returns a hash code value for this object.static ItemRegistry.Definitionitem(ExtensibleCodecBase.Entry<Function<net.minecraft.world.item.Item.Properties, net.minecraft.world.item.Item>> type, Map<net.minecraft.core.component.DataComponentType<?>, Object> properties) Returns the value of thepropertiesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Definition
public Definition(com.mojang.datafixers.util.Either<ItemRegistry.BlockItemDefinition, ExtensibleCodecBase.Entry<Function<net.minecraft.world.item.Item.Properties, net.minecraft.world.item.Item>>> factoryType, Map<net.minecraft.core.component.DataComponentType<?>, Object> properties) Creates an instance of aDefinitionrecord class.- Parameters:
factoryType- the value for thefactoryTyperecord componentproperties- the value for thepropertiesrecord component
-
-
Method Details
-
item
public static ItemRegistry.Definition item(ExtensibleCodecBase.Entry<Function<net.minecraft.world.item.Item.Properties, net.minecraft.world.item.Item>> type, Map<net.minecraft.core.component.DataComponentType<?>, Object> properties) -
blockItem
public static ItemRegistry.Definition blockItem(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, Map<net.minecraft.core.component.DataComponentType<?>, Object> properties) -
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). -
factoryType
public com.mojang.datafixers.util.Either<ItemRegistry.BlockItemDefinition, ExtensibleCodecBase.Entry<Function<net.minecraft.world.item.Item.Properties, net.minecraft.world.item.Item>>> factoryType()Returns the value of thefactoryTyperecord component.- Returns:
- the value of the
factoryTyperecord component
-
properties
-