public class AutomaticItemPlacementContext extends ItemPlacementContext
Modifier and Type | Field and Description |
---|---|
private Direction |
facing |
canReplaceExisting
Constructor and Description |
---|
AutomaticItemPlacementContext(World world,
BlockPos pos,
Direction facing,
ItemStack stack,
Direction side) |
Modifier and Type | Method and Description |
---|---|
boolean |
canPlace() |
boolean |
canReplaceExisting() |
BlockPos |
getBlockPos() |
Direction[] |
getPlacementDirections() |
Direction |
getPlayerFacing() |
Direction |
getPlayerLookDirection() |
float |
getPlayerYaw() |
boolean |
shouldCancelInteraction() |
offset
getHand, getHitPos, getHitResult, getPlayer, getSide, getStack, getWorld, hitsInsideBlock
private final Direction facing
public BlockPos getBlockPos()
getBlockPos
in class ItemPlacementContext
public boolean canPlace()
canPlace
in class ItemPlacementContext
public boolean canReplaceExisting()
canReplaceExisting
in class ItemPlacementContext
public Direction getPlayerLookDirection()
getPlayerLookDirection
in class ItemPlacementContext
public Direction[] getPlacementDirections()
getPlacementDirections
in class ItemPlacementContext
public Direction getPlayerFacing()
getPlayerFacing
in class ItemUsageContext
public boolean shouldCancelInteraction()
shouldCancelInteraction
in class ItemUsageContext
public float getPlayerYaw()
getPlayerYaw
in class ItemUsageContext