Record Class BlockConversions.Definition
java.lang.Object
java.lang.Record
net.rebel459.unified.impl.data.helper.BlockConversions.Definition
- Enclosing class:
BlockConversions
public static record BlockConversions.Definition(ExtensibleCodecBase.Entry<Predicate<net.minecraft.world.item.ItemStack>> predicate, net.minecraft.world.level.block.Block original, net.minecraft.world.level.block.Block converted, List<ExtensibleCodecBase.Entry<Consumer<net.minecraft.world.item.context.UseOnContext>>> useContext)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<BlockConversions.Definition> static com.mojang.serialization.Codec<List<BlockConversions.Definition>> -
Constructor Summary
ConstructorsConstructorDescriptionDefinition(ExtensibleCodecBase.Entry<Predicate<net.minecraft.world.item.ItemStack>> predicate, net.minecraft.world.level.block.Block original, net.minecraft.world.level.block.Block converted, List<ExtensibleCodecBase.Entry<Consumer<net.minecraft.world.item.context.UseOnContext>>> useContext) Creates an instance of aDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.block.BlockReturns the value of theconvertedrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.world.level.block.Blockoriginal()Returns the value of theoriginalrecord component.ExtensibleCodecBase.Entry<Predicate<net.minecraft.world.item.ItemStack>> Returns the value of thepredicaterecord component.final StringtoString()Returns a string representation of this record class.List<ExtensibleCodecBase.Entry<Consumer<net.minecraft.world.item.context.UseOnContext>>> Returns the value of theuseContextrecord component.
-
Field Details
-
CODEC
-
LIST_CODEC
-
-
Constructor Details
-
Definition
public Definition(ExtensibleCodecBase.Entry<Predicate<net.minecraft.world.item.ItemStack>> predicate, net.minecraft.world.level.block.Block original, net.minecraft.world.level.block.Block converted, List<ExtensibleCodecBase.Entry<Consumer<net.minecraft.world.item.context.UseOnContext>>> useContext) Creates an instance of aDefinitionrecord class.- Parameters:
predicate- the value for thepredicaterecord componentoriginal- the value for theoriginalrecord componentconverted- the value for theconvertedrecord componentuseContext- the value for theuseContextrecord 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). -
predicate
Returns the value of thepredicaterecord component.- Returns:
- the value of the
predicaterecord component
-
original
public net.minecraft.world.level.block.Block original()Returns the value of theoriginalrecord component.- Returns:
- the value of the
originalrecord component
-
converted
public net.minecraft.world.level.block.Block converted()Returns the value of theconvertedrecord component.- Returns:
- the value of the
convertedrecord component
-
useContext
public List<ExtensibleCodecBase.Entry<Consumer<net.minecraft.world.item.context.UseOnContext>>> useContext()Returns the value of theuseContextrecord component.- Returns:
- the value of the
useContextrecord component
-