Class 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)
    • Method Detail

      • 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()
      • sendUseItem

        public boolean sendUseItem​(EntityPlayer playerIn,
                                   World worldIn,
                                   ItemStack itemStackIn)
        + Notifies the server of things like consuming food, etc...
      • 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)
      • 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()
      • func_181040_m

        public boolean func_181040_m()