Record Class BlockOutput
java.lang.Object
java.lang.Record
top.girlkisser.lazuli.api.crafting.BlockOutput
- Record Components:
block- The output block.
A record for recipes that output blocks.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA block output where the block is represented by itsResourceLocation. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<BlockOutput.BORL> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, BlockOutput.BORL> static final com.mojang.serialization.Codec<BlockOutput> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, BlockOutput> -
Constructor Summary
ConstructorsConstructorDescriptionBlockOutput(net.minecraft.world.level.block.Block block) Creates an instance of aBlockOutputrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.block.Blockblock()Returns the value of theblockrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.toBORL()Converts the block output to aBlockOutput.BORL("Block Output from Resource Location").final StringtoString()Returns a string representation of this record class.
-
Field Details
-
BORL_CODEC
-
BORL_STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,BlockOutput.BORL> BORL_STREAM_CODEC -
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,BlockOutput> STREAM_CODEC
-
-
Constructor Details
-
BlockOutput
public BlockOutput(net.minecraft.world.level.block.Block block) Creates an instance of aBlockOutputrecord class.- Parameters:
block- the value for theblockrecord component
-
-
Method Details
-
toBORL
Converts the block output to aBlockOutput.BORL("Block Output from Resource Location").- Returns:
- The BORL.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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
public net.minecraft.world.level.block.Block block()Returns the value of theblockrecord component.- Returns:
- the value of the
blockrecord component
-