Interface IReplaceableBlock
public interface IReplaceableBlock
Used in
IPlacementHelpers if this Block can replace or be replaced by others-
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.block.state.BlockStategetReplacedState(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState existingState, net.minecraft.world.level.block.state.BlockState newState, net.minecraft.world.entity.player.Player player) Get the result of "replacing"existingStatewithnewState.
-
Method Details
-
getReplacedState
net.minecraft.world.level.block.state.BlockState getReplacedState(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState existingState, net.minecraft.world.level.block.state.BlockState newState, net.minecraft.world.entity.player.Player player) Get the result of "replacing"existingStatewithnewState. Essentially, what should happen be the result if both these BlockStates are placed in the same block space. If both the Blocks of the existing BlockState and the one to be placed implementIReplaceableBlock, this should ideally be symmetrical but the already-placed BlockState will take priority.- Parameters:
level-pos-existingState-newState-player-- Returns:
- A combined BlockState if the two states can go together, or
nullif they cannot be combined
-