Package net.minecraft.src
Class PlayerControllerMP
java.lang.Object
net.minecraft.src.PlayerControllerMP
-
Constructor Summary
ConstructorsConstructorDescriptionPlayerControllerMP(Minecraft par1Minecraft, NetClientHandler par2NetClientHandler) -
Method Summary
Modifier and TypeMethodDescriptionvoidattackEntity(EntityPlayer par1EntityPlayer, Entity par2Entity) Attacks an entityvoidclickBlock(int par1, int par2, int par3, int par4) Called by Minecraft class when the player is hitting a block with an item.static voidclickBlockCreative(Minecraft par0Minecraft, PlayerControllerMP par1PlayerControllerMP, int par2, int par3, int par4, int par5) Block dig operation in creative mode (instantly digs the block).booleanIf modified to return true, the player spins around slowly around (0, 68.5, 0).booleantrue for hitting entities far away.voidflipPlayer(EntityPlayer par1EntityPlayer) Flips the player around.booleanvoidfunc_78752_a(ItemStack par1ItemStack) func_78754_a(World par1World) booleanbooleanfunc_78768_b(EntityPlayer par1EntityPlayer, Entity par2Entity) floatplayer reach distance = 4Fbooleanbooleanreturns true if player is in creative modebooleanChecks if the player is not creative, used for checking if it should break a block instantlyvoidonPlayerDamageBlock(int par1, int par2, int par3, int par4) Called when a player damages a block and updates damage countersbooleanonPlayerDestroyBlock(int par1, int par2, int par3, int par4) Called when a player completes the destruction of a blockbooleanonPlayerRightClick(EntityPlayer par1EntityPlayer, World par2World, ItemStack par3ItemStack, int par4, int par5, int par6, int par7, Vec3 par8Vec3) Handles a players right click.voidonStoppedUsingItem(EntityPlayer par1EntityPlayer) voidResets current block damage and isHittingBlockvoidsendEnchantPacket(int par1, int par2) GuiEnchantment uses this during multiplayer to tell PlayerControllerMP to send a packet indicating the enchantment action the player has taken.voidsendSlotPacket(ItemStack par1ItemStack, int par2) Used in PlayerControllerMP to update the server with an ItemStack in a slot.booleansendUseItem(EntityPlayer par1EntityPlayer, World par2World, ItemStack par3ItemStack) Notifies the server of things like consuming food, etc...voidsetGameType(EnumGameType par1EnumGameType) Sets the game type for the player.voidsetPlayerCapabilities(EntityPlayer par1EntityPlayer) Sets player capabilities depending on current gametype. params: playerbooleanvoidwindowClick(int par1, int par2, int par3, int par4, EntityPlayer par5EntityPlayer)
-
Constructor Details
-
PlayerControllerMP
-
-
Method Details
-
clickBlockCreative
public static void clickBlockCreative(Minecraft par0Minecraft, PlayerControllerMP par1PlayerControllerMP, int par2, int par3, int par4, int par5) Block dig operation in creative mode (instantly digs the block). -
setPlayerCapabilities
Sets player capabilities depending on current gametype. params: player -
enableEverythingIsScrewedUpMode
public boolean enableEverythingIsScrewedUpMode()If modified to return true, the player spins around slowly around (0, 68.5, 0). The GUI is disabled, the view is set to first person, and both chat and menu are disabled. Unless the server is modified to ignore illegal stances, attempting to enter a world at all will result in an immediate kick due to an illegal stance. Appears to be left-over debug, or demo code. -
setGameType
Sets the game type for the player. -
flipPlayer
Flips the player around. Args: player -
shouldDrawHUD
public boolean shouldDrawHUD() -
onPlayerDestroyBlock
public boolean onPlayerDestroyBlock(int par1, int par2, int par3, int par4) Called when a player completes the destruction of a block -
clickBlock
public void clickBlock(int par1, int par2, int par3, int par4) Called by Minecraft class when the player is hitting a block with an item. Args: x, y, z, side -
resetBlockRemoving
public void resetBlockRemoving()Resets current block damage and isHittingBlock -
onPlayerDamageBlock
public void onPlayerDamageBlock(int par1, int par2, int par3, int par4) Called when a player damages a block and updates damage counters -
getBlockReachDistance
public float getBlockReachDistance()player reach distance = 4F -
updateController
public void updateController() -
onPlayerRightClick
public boolean onPlayerRightClick(EntityPlayer par1EntityPlayer, World par2World, ItemStack par3ItemStack, int par4, int par5, int par6, int par7, Vec3 par8Vec3) Handles a players right click. Args: player, world, x, y, z, side, hitVec -
sendUseItem
Notifies the server of things like consuming food, etc... -
func_78754_a
-
attackEntity
Attacks an entity -
func_78768_b
-
windowClick
-
sendEnchantPacket
public void sendEnchantPacket(int par1, int par2) GuiEnchantment uses this during multiplayer to tell PlayerControllerMP to send a packet indicating the enchantment action the player has taken. -
sendSlotPacket
Used in PlayerControllerMP to update the server with an ItemStack in a slot. -
func_78752_a
-
onStoppedUsingItem
-
func_78763_f
public boolean func_78763_f() -
isNotCreative
public boolean isNotCreative()Checks if the player is not creative, used for checking if it should break a block instantly -
isInCreativeMode
public boolean isInCreativeMode()returns true if player is in creative mode -
extendedReach
public boolean extendedReach()true for hitting entities far away. -
func_110738_j
public boolean func_110738_j() -
getNetClientHandler
-
isHittingBlock
public boolean isHittingBlock() -
getItemCooldowns
-