net.minecraft.item

public class ItemPlacementContext

extends ItemUsageContext

net.minecraft.world.item.context.BlockPlaceContext
net.minecraft.class_1750
net.minecraft.item.ItemPlacementContext

Field summary

Modifier and TypeField
private final BlockPos
relativePos
field_7903
placementPos
protected boolean
replaceClicked
field_7904
canReplaceExisting

Constructor summary

ModifierConstructor
public (PlayerEntity player, Hand hand, ItemStack stack, BlockHitResult hitResult)
public (ItemUsageContext context)
protected (World level, PlayerEntity player, Hand hand, ItemStack itemStackInHand, BlockHitResult hitResult)

Method summary

Modifier and TypeMethod
public static ItemPlacementContext
at(BlockPlaceContext context, BlockPos pos, Direction direction)
method_16355(class_1750 arg0, class_2338 arg1, class_2350 arg2)
offset(ItemPlacementContext context, BlockPos pos, Direction side)
public BlockPos
getClickedPos()
method_8037()
getBlockPos()
public boolean
canPlace()
method_7716()
canPlace()
public boolean
replacingClickedOnBlock()
method_7717()
canReplaceExisting()
public Direction
getNearestLookingDirection()
method_7715()
getPlayerLookDirection()
public Direction
getNearestLookingVerticalDirection()
method_32760()
getVerticalPlayerLookDirection()
public Direction[]
getNearestLookingDirections()
method_7718()
getPlacementDirections()