Package com.ldtteam.structurize.util
Record Class BlockInfo
java.lang.Object
java.lang.Record
com.ldtteam.structurize.util.BlockInfo
public record BlockInfo(net.minecraft.core.BlockPos getPos, @Nullable net.minecraft.world.level.block.state.BlockState getState, @Nullable net.minecraft.nbt.CompoundTag getTileEntityData)
extends Record
Contains block information we need for placement.
-
Constructor Summary
ConstructorsConstructorDescriptionBlockInfo(net.minecraft.core.BlockPos getPos, @Nullable net.minecraft.world.level.block.state.BlockState getState, @Nullable net.minecraft.nbt.CompoundTag getTileEntityData) Creates an instance of aBlockInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.net.minecraft.core.BlockPosgetPos()Returns the value of thegetPosrecord component.@Nullable net.minecraft.world.level.block.state.BlockStategetState()Returns the value of thegetStaterecord component.@Nullable net.minecraft.nbt.CompoundTagReturns the value of thegetTileEntityDatarecord component.final inthashCode()Returns a hash code value for this object.booleanfinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BlockInfo
public BlockInfo(net.minecraft.core.BlockPos getPos, @Nullable @Nullable net.minecraft.world.level.block.state.BlockState getState, @Nullable @Nullable net.minecraft.nbt.CompoundTag getTileEntityData) Creates an instance of aBlockInforecord class.- Parameters:
getPos- the value for thegetPosrecord componentgetState- the value for thegetStaterecord componentgetTileEntityData- the value for thegetTileEntityDatarecord component
-
-
Method Details
-
hasTileEntityData
public boolean hasTileEntityData() -
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). -
getPos
public net.minecraft.core.BlockPos getPos()Returns the value of thegetPosrecord component.- Returns:
- the value of the
getPosrecord component
-
getState
@Nullable public @Nullable net.minecraft.world.level.block.state.BlockState getState()Returns the value of thegetStaterecord component.- Returns:
- the value of the
getStaterecord component
-
getTileEntityData
@Nullable public @Nullable net.minecraft.nbt.CompoundTag getTileEntityData()Returns the value of thegetTileEntityDatarecord component.- Returns:
- the value of the
getTileEntityDatarecord component
-