Record Class ReactorPiece
java.lang.Object
java.lang.Record
net.darkhax.retroreactors.common.data.reactor.ReactorPiece
- Record Components:
block- Tests if a block is a valid piece.becomes- The block state a piece turns into after the tower generates.
public record ReactorPiece(net.minecraft.advancements.criterion.BlockPredicate block, net.minecraft.world.level.block.state.BlockState becomes)
extends Record
Represents a piece of the reactor structure.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionReactorPiece(net.minecraft.advancements.criterion.BlockPredicate block, net.minecraft.world.level.block.state.BlockState becomes) Creates an instance of aReactorPiecerecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.block.state.BlockStatebecomes()Returns the value of thebecomesrecord component.net.minecraft.advancements.criterion.BlockPredicateblock()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.booleanmatches(net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
ReactorPiece
public ReactorPiece(net.minecraft.advancements.criterion.BlockPredicate block, net.minecraft.world.level.block.state.BlockState becomes) Creates an instance of aReactorPiecerecord class.
-
-
Method Details
-
matches
public boolean matches(net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos) -
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
-
becomes
-