public class PlayerInteractionManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
EntityPlayerMP |
player
The EntityPlayerMP object that this object is connected to.
|
World |
world
The world object that this object is connected to.
|
Constructor and Description |
---|
PlayerInteractionManager(World worldIn) |
Modifier and Type | Method and Description |
---|---|
void |
blockRemoving(BlockPos pos) |
void |
cancelDestroyingBlock()
Stops the block breaking process
|
double |
getBlockReachDistance()
Deprecated.
|
GameType |
getGameType() |
void |
initializeGameType(GameType type)
if the gameType is currently NOT_SET then change it to par1
|
boolean |
isCreative()
Get if we are in creative game mode.
|
void |
onBlockClicked(BlockPos pos,
EnumFacing side)
If not creative, it calls sendBlockBreakProgress until the block is broken first.
|
EnumActionResult |
processRightClick(EntityPlayer player,
World worldIn,
ItemStack stack,
EnumHand hand) |
EnumActionResult |
processRightClickBlock(EntityPlayer player,
World worldIn,
ItemStack stack,
EnumHand hand,
BlockPos pos,
EnumFacing facing,
float hitX,
float hitY,
float hitZ) |
void |
setBlockReachDistance(double distance)
Deprecated.
|
void |
setGameType(GameType type) |
void |
setWorld(WorldServer serverWorld)
Sets the world instance.
|
boolean |
survivalOrAdventure() |
boolean |
tryHarvestBlock(BlockPos pos)
Attempts to harvest a block
|
void |
updateBlockRemoving() |
public World world
public EntityPlayerMP player
public PlayerInteractionManager(World worldIn)
public void setGameType(GameType type)
public GameType getGameType()
public boolean survivalOrAdventure()
public boolean isCreative()
public void initializeGameType(GameType type)
public void updateBlockRemoving()
public void onBlockClicked(BlockPos pos, EnumFacing side)
public void blockRemoving(BlockPos pos)
public void cancelDestroyingBlock()
public boolean tryHarvestBlock(BlockPos pos)
public EnumActionResult processRightClick(EntityPlayer player, World worldIn, ItemStack stack, EnumHand hand)
public EnumActionResult processRightClickBlock(EntityPlayer player, World worldIn, ItemStack stack, EnumHand hand, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ)
public void setWorld(WorldServer serverWorld)
@Deprecated public double getBlockReachDistance()
@Deprecated public void setBlockReachDistance(double distance)