public class PlayerControllerMP
extends java.lang.Object
Constructor and Description |
---|
PlayerControllerMP(Minecraft mcIn,
NetHandlerPlayClient netHandler) |
Modifier and Type | Method and Description |
---|---|
void |
attackEntity(EntityPlayer playerIn,
Entity targetEntity)
Attacks an entity
|
boolean |
clickBlock(BlockPos loc,
EnumFacing face)
Called when the player is hitting a block with an item.
|
static void |
clickBlockCreative(Minecraft mcIn,
PlayerControllerMP playerController,
BlockPos pos,
EnumFacing facing) |
EntityPlayerSP |
createPlayer(World p_192830_1_,
StatisticsManager p_192830_2_,
RecipeBook p_192830_3_) |
boolean |
extendedReach()
true for hitting entities far away.
|
void |
flipPlayer(EntityPlayer playerIn)
Flips the player around.
|
void |
func_194338_a(int p_194338_1_,
IRecipe p_194338_2_,
boolean p_194338_3_,
EntityPlayer p_194338_4_) |
boolean |
gameIsSurvivalOrAdventure() |
float |
getBlockReachDistance()
player reach distance = 4F
|
GameType |
getCurrentGameType() |
boolean |
getIsHittingBlock()
Return isHittingBlock
|
EnumActionResult |
interactWithEntity(EntityPlayer player,
Entity target,
EnumHand hand)
Handles right clicking an entity, sends a packet to the server.
|
EnumActionResult |
interactWithEntity(EntityPlayer player,
Entity target,
RayTraceResult ray,
EnumHand hand)
Handles right clicking an entity from the entities side, sends a packet to the server.
|
boolean |
isInCreativeMode()
returns true if player is in creative mode
|
boolean |
isNotCreative()
Checks if the player is not creative, used for checking if it should break a block instantly
|
boolean |
isRidingHorse()
Checks if the player is riding a horse, used to chose the GUI to open
|
boolean |
isSpectator()
None
|
boolean |
isSpectatorMode() |
boolean |
onPlayerDamageBlock(BlockPos posBlock,
EnumFacing directionFacing) |
boolean |
onPlayerDestroyBlock(BlockPos pos) |
void |
onStoppedUsingItem(EntityPlayer playerIn) |
void |
pickItem(int index) |
EnumActionResult |
processRightClick(EntityPlayer player,
World worldIn,
EnumHand hand) |
EnumActionResult |
processRightClickBlock(EntityPlayerSP player,
WorldClient worldIn,
BlockPos pos,
EnumFacing direction,
Vec3d vec,
EnumHand hand) |
void |
resetBlockRemoving()
Resets current block damage
|
void |
sendEnchantPacket(int windowID,
int button)
GuiEnchantment uses this during multiplayer to tell PlayerControllerMP to send a packet indicating the
enchantment action the player has taken.
|
void |
sendPacketDropItem(ItemStack itemStackIn)
Sends a Packet107 to the server to drop the item on the ground
|
void |
sendSlotPacket(ItemStack itemStackIn,
int slotId)
Used in PlayerControllerMP to update the server with an ItemStack in a slot.
|
void |
setGameType(GameType type)
Sets the game type for the player.
|
void |
setPlayerCapabilities(EntityPlayer player)
Sets player capabilities depending on current gametype.
|
boolean |
shouldDrawHUD() |
void |
updateController() |
ItemStack |
windowClick(int windowId,
int slotId,
int mouseButton,
ClickType type,
EntityPlayer player)
Handles slot clicks, sends a packet to the server.
|
public PlayerControllerMP(Minecraft mcIn, NetHandlerPlayClient netHandler)
public static void clickBlockCreative(Minecraft mcIn, PlayerControllerMP playerController, BlockPos pos, EnumFacing facing)
public void setPlayerCapabilities(EntityPlayer player)
public boolean isSpectator()
public void setGameType(GameType type)
public void flipPlayer(EntityPlayer playerIn)
public boolean shouldDrawHUD()
public boolean onPlayerDestroyBlock(BlockPos pos)
public boolean clickBlock(BlockPos loc, EnumFacing face)
public void resetBlockRemoving()
public boolean onPlayerDamageBlock(BlockPos posBlock, EnumFacing directionFacing)
public float getBlockReachDistance()
public void updateController()
public EnumActionResult processRightClickBlock(EntityPlayerSP player, WorldClient worldIn, BlockPos pos, EnumFacing direction, Vec3d vec, EnumHand hand)
public EnumActionResult processRightClick(EntityPlayer player, World worldIn, EnumHand hand)
public EntityPlayerSP createPlayer(World p_192830_1_, StatisticsManager p_192830_2_, RecipeBook p_192830_3_)
public void attackEntity(EntityPlayer playerIn, Entity targetEntity)
public EnumActionResult interactWithEntity(EntityPlayer player, Entity target, EnumHand hand)
public EnumActionResult interactWithEntity(EntityPlayer player, Entity target, RayTraceResult ray, EnumHand hand)
public ItemStack windowClick(int windowId, int slotId, int mouseButton, ClickType type, EntityPlayer player)
public void func_194338_a(int p_194338_1_, IRecipe p_194338_2_, boolean p_194338_3_, EntityPlayer p_194338_4_)
public void sendEnchantPacket(int windowID, int button)
public void sendSlotPacket(ItemStack itemStackIn, int slotId)
public void sendPacketDropItem(ItemStack itemStackIn)
public void onStoppedUsingItem(EntityPlayer playerIn)
public boolean gameIsSurvivalOrAdventure()
public boolean isNotCreative()
public boolean isInCreativeMode()
public boolean extendedReach()
public boolean isRidingHorse()
public boolean isSpectatorMode()
public GameType getCurrentGameType()
public boolean getIsHittingBlock()
public void pickItem(int index)