Interface BlockRelocability
- All Known Implementing Classes:
BlockRelocability.Multiblock, BlockRelocability.No, BlockRelocability.Yes
public sealed interface BlockRelocability
permits BlockRelocability.No, BlockRelocability.Yes, BlockRelocability.Multiblock
Declares whether some block is relocatable by mechanics which cut/copy and paste blocks, typically with some translation and possibly a rotation and/or mirror, and including any blockentity data.
Relocator mechanics may query IBlockStateExtension.getRelocability(LevelReader, BlockPos) for each block in some area being moved.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordBlockRelocability indicating a block may be moved if and only if some set of other block positions is being moved with it.static enumBlockRelocability indicating some block is currently refusing to be movedstatic enumBlockRelocability indicating some block is currently agreeing to be moved -
Method Summary
Modifier and TypeMethodDescriptionbooleanisRelocatable(Set<BlockPos> relocatingPositions) Returns true if the block is relocatable from a given Set of block positions, false otherwise.
-
Method Details
-
isRelocatable
Returns true if the block is relocatable from a given Set of block positions, false otherwise.- Parameters:
relocatingPositions- Set of positions blocks are being relocated from- Returns:
- true if the block is relocatable from a given Set of block positions, false otherwise
-