Package net.minecraft.client.multiplayer
Class PlayerControllerMP
- java.lang.Object
-
- net.minecraft.client.multiplayer.PlayerControllerMP
-
public class PlayerControllerMP extends java.lang.Object
+ This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!" Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team EaglercraftX 1.8 patch files are (c) 2022-2023 LAX1DUDE. All Rights Reserved. WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR. NOT FOR COMMERCIAL OR MALICIOUS USE (please read the 'LICENSE' file this repo's root directory for more info)
-
-
Constructor Summary
Constructors Constructor Description PlayerControllerMP(Minecraft mcIn, NetHandlerPlayClient parNetHandlerPlayClient)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
attackEntity(EntityPlayer playerIn, Entity targetEntity)
+ Attacks an entityboolean
clickBlock(BlockPos loc, EnumFacing face)
+ Called when the player is hitting a block with an item.static void
clickBlockCreative(Minecraft mcIn, PlayerControllerMP parPlayerControllerMP, BlockPos parBlockPos, EnumFacing parEnumFacing)
boolean
extendedReach()
+ true for hitting entities far away.void
flipPlayer(EntityPlayer playerIn)
+ Flips the player around.EntityPlayerSP
func_178892_a(World worldIn, StatFileWriter statWriter)
boolean
func_178894_a(EntityPlayer parEntityPlayer, Entity parEntity, MovingObjectPosition parMovingObjectPosition)
boolean
func_181040_m()
boolean
gameIsSurvivalOrAdventure()
float
getBlockReachDistance()
+ player reach distance = 4FWorldSettings.GameType
getCurrentGameType()
boolean
interactWithEntitySendPacket(EntityPlayer playerIn, Entity targetEntity)
+ Send packet to server - player is interacting with another entity (left click)boolean
isInCreativeMode()
+ returns true if player is in creative modeboolean
isNotCreative()
+ Checks if the player is not creative, used for checking if it should break a block instantlyboolean
isRidingHorse()
+ Checks if the player is riding a horse, used to chose the GUI to openboolean
isSpectator()
+ Noneboolean
isSpectatorMode()
boolean
onPlayerDamageBlock(BlockPos posBlock, EnumFacing directionFacing)
boolean
onPlayerDestroyBlock(BlockPos pos, EnumFacing side)
+ Called when a player completes the destruction of a blockboolean
onPlayerRightClick(EntityPlayerSP player, WorldClient worldIn, ItemStack heldStack, BlockPos hitPos, EnumFacing side, Vec3 hitVec)
void
onStoppedUsingItem(EntityPlayer playerIn)
void
resetBlockRemoving()
+ Resets current block damage and field_78778_jvoid
sendEnchantPacket(int parInt1, int parInt2)
+ 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 groundvoid
sendSlotPacket(ItemStack itemStackIn, int slotId)
+ Used in PlayerControllerMP to update the server with an ItemStack in a slot.boolean
sendUseItem(EntityPlayer playerIn, World worldIn, ItemStack itemStackIn)
+ Notifies the server of things like consuming food, etc...void
setGameType(WorldSettings.GameType parGameType)
+ Sets the game type for the player.void
setPlayerCapabilities(EntityPlayer parEntityPlayer)
+ Sets player capabilities depending on current gametype.boolean
shouldDrawHUD()
void
updateController()
ItemStack
windowClick(int windowId, int slotId, int mouseButtonClicked, int mode, EntityPlayer playerIn)
+ Handles slot clicks sends a packet to the server.
-
-
-
Constructor Detail
-
PlayerControllerMP
public PlayerControllerMP(Minecraft mcIn, NetHandlerPlayClient parNetHandlerPlayClient)
-
-
Method Detail
-
clickBlockCreative
public static void clickBlockCreative(Minecraft mcIn, PlayerControllerMP parPlayerControllerMP, BlockPos parBlockPos, EnumFacing parEnumFacing)
-
setPlayerCapabilities
public void setPlayerCapabilities(EntityPlayer parEntityPlayer)
+ Sets player capabilities depending on current gametype. params: player
-
isSpectator
public boolean isSpectator()
+ None
-
setGameType
public void setGameType(WorldSettings.GameType parGameType)
+ Sets the game type for the player.
-
flipPlayer
public void flipPlayer(EntityPlayer playerIn)
+ Flips the player around.
-
shouldDrawHUD
public boolean shouldDrawHUD()
-
onPlayerDestroyBlock
public boolean onPlayerDestroyBlock(BlockPos pos, EnumFacing side)
+ Called when a player completes the destruction of a block
-
clickBlock
public boolean clickBlock(BlockPos loc, EnumFacing face)
+ Called when the player is hitting a block with an item.
-
resetBlockRemoving
public void resetBlockRemoving()
+ Resets current block damage and field_78778_j
-
onPlayerDamageBlock
public boolean onPlayerDamageBlock(BlockPos posBlock, EnumFacing directionFacing)
-
getBlockReachDistance
public float getBlockReachDistance()
+ player reach distance = 4F
-
updateController
public void updateController()
-
onPlayerRightClick
public boolean onPlayerRightClick(EntityPlayerSP player, WorldClient worldIn, ItemStack heldStack, BlockPos hitPos, EnumFacing side, Vec3 hitVec)
-
sendUseItem
public boolean sendUseItem(EntityPlayer playerIn, World worldIn, ItemStack itemStackIn)
+ Notifies the server of things like consuming food, etc...
-
func_178892_a
public EntityPlayerSP func_178892_a(World worldIn, StatFileWriter statWriter)
-
attackEntity
public void attackEntity(EntityPlayer playerIn, Entity targetEntity)
+ Attacks an entity
-
interactWithEntitySendPacket
public boolean interactWithEntitySendPacket(EntityPlayer playerIn, Entity targetEntity)
+ Send packet to server - player is interacting with another entity (left click)
-
func_178894_a
public boolean func_178894_a(EntityPlayer parEntityPlayer, Entity parEntity, MovingObjectPosition parMovingObjectPosition)
-
windowClick
public ItemStack windowClick(int windowId, int slotId, int mouseButtonClicked, int mode, EntityPlayer playerIn)
+ Handles slot clicks sends a packet to the server.
-
sendEnchantPacket
public void sendEnchantPacket(int parInt1, int parInt2)
+ GuiEnchantment uses this during multiplayer to tell PlayerControllerMP to send a packet indicating the enchantment action the player has taken.
-
sendSlotPacket
public void sendSlotPacket(ItemStack itemStackIn, int slotId)
+ Used in PlayerControllerMP to update the server with an ItemStack in a slot.
-
sendPacketDropItem
public void sendPacketDropItem(ItemStack itemStackIn)
+ Sends a Packet107 to the server to drop the item on the ground
-
onStoppedUsingItem
public void onStoppedUsingItem(EntityPlayer playerIn)
-
gameIsSurvivalOrAdventure
public boolean gameIsSurvivalOrAdventure()
-
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.
-
isRidingHorse
public boolean isRidingHorse()
+ Checks if the player is riding a horse, used to chose the GUI to open
-
isSpectatorMode
public boolean isSpectatorMode()
-
getCurrentGameType
public WorldSettings.GameType getCurrentGameType()
-
func_181040_m
public boolean func_181040_m()
-
-