Package com.ldtteam.structurize.api
Record Class PositionStorage
java.lang.Object
java.lang.Record
com.ldtteam.structurize.api.PositionStorage
public record PositionStorage(net.minecraft.world.level.block.state.BlockState getState, @Nullable net.minecraft.world.level.block.entity.BlockEntity getEntity)
extends Record
Stores blockState and tileEntity at position.
-
Constructor Summary
ConstructorsConstructorDescriptionPositionStorage(net.minecraft.world.level.block.state.BlockState getState, @Nullable net.minecraft.world.level.block.entity.BlockEntity getEntity) Creates an instance of aPositionStoragerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@Nullable net.minecraft.world.level.block.entity.BlockEntityReturns the value of thegetEntityrecord component.net.minecraft.world.level.block.state.BlockStategetState()Returns the value of thegetStaterecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PositionStorage
public PositionStorage(net.minecraft.world.level.block.state.BlockState getState, @Nullable @Nullable net.minecraft.world.level.block.entity.BlockEntity getEntity) Creates an instance of aPositionStoragerecord class.- Parameters:
getState- the value for thegetStaterecord componentgetEntity- the value for thegetEntityrecord component
-
-
Method Details
-
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). -
getState
public net.minecraft.world.level.block.state.BlockState getState()Returns the value of thegetStaterecord component.- Returns:
- the value of the
getStaterecord component
-
getEntity
@Nullable public @Nullable net.minecraft.world.level.block.entity.BlockEntity getEntity()Returns the value of thegetEntityrecord component.- Returns:
- the value of the
getEntityrecord component
-