Record Class BlockConversionsImpl.Record
java.lang.Object
java.lang.Record
net.rebel459.unified.impl.helper.BlockConversionsImpl.Record
- Enclosing class:
BlockConversionsImpl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConsumer<net.minecraft.world.item.context.UseOnContext> context()Returns the value of thecontextrecord component.net.minecraft.world.level.block.BlockReturns the value of theconvertedBlockrecord 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.Predicate<net.minecraft.world.item.ItemStack> Returns the value of thevalidItemrecord component.
-
Constructor Details
-
Record
public Record(Predicate<net.minecraft.world.item.ItemStack> validItem, net.minecraft.world.level.block.Block convertedBlock, Consumer<net.minecraft.world.item.context.UseOnContext> context) Creates an instance of aRecordrecord class.- Parameters:
validItem- the value for thevalidItemrecord componentconvertedBlock- the value for theconvertedBlockrecord componentcontext- the value for thecontextrecord 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). -
validItem
Returns the value of thevalidItemrecord component.- Returns:
- the value of the
validItemrecord component
-
convertedBlock
public net.minecraft.world.level.block.Block convertedBlock()Returns the value of theconvertedBlockrecord component.- Returns:
- the value of the
convertedBlockrecord component
-
context
Returns the value of thecontextrecord component.- Returns:
- the value of the
contextrecord component
-