net.minecraftforge.common

## Class FakePlayer

- java.lang.Object
- - net.minecraft.entity.Entity
  - - net.minecraft.entity.EntityLivingBase
    - - net.minecraft.entity.player.EntityPlayer
      - - net.minecraft.entity.player.EntityPlayerMP
        - - net.minecraftforge.common.FakePlayer

- All Implemented Interfaces:
    ICommandSender, ICrafting

      public class FakePlayer
      extends EntityPlayerMP

- - ### Field Summary

    - ### Fields inherited from class net.minecraft.entity.player.EntityPlayerMP

      `currentWindowId, destroyedItemsNetCache, loadedChunks, managedPosX, managedPosZ, mcServer, ping, playerConqueredTheEnd, playerInventoryBeingManipulated, playerNetServerHandler, theItemInWorldManager`

    - ### Fields inherited from class net.minecraft.entity.player.EntityPlayer

      `cameraYaw, capabilities, experience, experienceLevel, experienceTotal, eyeHeight, field_71079_bU, field_71082_cx, field_71085_bR, field_71089_bV, field_71091_bM, field_71094_bP, field_71095_bQ, field_71096_bN, field_71097_bO, fishEntity, inventory, inventoryContainer, openContainer, PERSISTED_NBT_TAG, playerLocation, prevCameraYaw, sleepTimer, username, xpCooldown`

    - ### Fields inherited from class net.minecraft.entity.EntityLivingBase

      `arrowHitTimer, attackedAtYaw, attackTime, cameraPitch, deathTime, field_70769_ao, field_70770_ap, hurtTime, isSwingInProgress, jumpMovementFactor, limbSwing, limbSwingAmount, maxHurtResistantTime, maxHurtTime, moveForward, moveStrafing, prevCameraPitch, prevHealth, prevLimbSwingAmount, prevRenderYawOffset, prevRotationYawHead, prevSwingProgress, renderYawOffset, rotationYawHead, swingProgress, swingProgressInt`

    - ### Fields inherited from class net.minecraft.entity.Entity

      `addedToChunk, boundingBox, capturedDrops, captureDrops, chunkCoordX, chunkCoordY, chunkCoordZ, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityId, fallDistance, field_70135_K, fireResistance, forceSpawn, height, hurtResistantTime, ignoreFrustumCheck, isAirBorne, isCollided, isCollidedHorizontally, isCollidedVertically, isDead, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, myEntitySize, noClip, onGround, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, renderDistanceWeight, riddenByEntity, ridingEntity, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, ticksExisted, timeUntilPortal, velocityChanged, width, worldObj, yOffset, ySize`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FakePlayer(World world, String name)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addStat(StatBase par1StatBase, int par2)` Adds a value to a statistic field.
    `boolean` | `canAttackPlayer(EntityPlayer player)`
    `boolean` | `canCommandSenderUseCommand(int i, String s)` Returns true if the command sender is allowed to use the given command.
    `ChunkCoordinates` | `getPlayerCoordinates()` Return the position for this command sender.
    `boolean` | `isEntityInvulnerable()` Return whether this entity is invulnerable to damage.
    `void` | `onDeath(DamageSource source)` Called when the mob's health reaches 0.
    `void` | `onUpdate()` Called to update the entity's position/logic.
    `void` | `openGui(Object mod, int modGuiId, World world, int x, int y, int z)`
    `void` | `sendChatToPlayer(ChatMessageComponent chatmessagecomponent)`
    `void` | `sendChatToPlayer(String s)`
    `void` | `travelToDimension(int dim)` Teleports the entity to another dimension.
    `void` | `updateClientInfo(Packet204ClientInfo pkt)`

    - ### Methods inherited from class net.minecraft.entity.player.EntityPlayerMP

      `addChatMessage, addExperienceLevel, addSelfToInternalCraftingInventory, attackEntityFrom, clonePlayer, closeContainer, closeScreen, displayGUIAnvil, displayGUIBeacon, displayGUIBrewingStand, displayGUIChest, displayGUIDispenser, displayGUIEditSign, displayGUIEnchantment, displayGUIFurnace, displayGUIHopper, displayGUIHopperMinecart, displayGUIHorse, displayGUIMerchant, displayGUIWorkbench, func_143004_u, getChatVisibility, getDefaultEyeHeight, getPlayerIP, getServerForPlayer, incrementWindowID, mountEntity, mountEntityAndWakeUp, onCriticalHit, onEnchantmentCritical, onItemPickup, onUpdateEntity, readEntityFromNBT, requestTexturePackLoad, sendContainerAndContentsToPlayer, sendContainerToPlayer, sendPlayerAbilities, sendProgressBarUpdate, sendSlotContents, setEntityActionState, setGameType, setItemInUse, setPlayerHealthUpdated, setPositionAndUpdate, sleepInBedAt, updateFlyingState, updateHeldItem, wakeUpPlayer, writeEntityToNBT`

    - ### Methods inherited from class net.minecraft.entity.player.EntityPlayer

      `addExhaustion, addExperience, addMovementStat, addScore, addToPlayerScore, attackTargetEntityWithCurrentItem, canEat, canHarvestBlock, canPlayerEdit, clearItemInUse, destroyCurrentEquippedItem, displayGUIBook, dropOneItem, dropPlayerItem, dropPlayerItemWithRandomChoice, getAbsorptionAmount, getAIMoveSpeed, getAlwaysRenderNameTagForRender, getArmorVisibility, getBedLocation, getBedLocation, getBedOrientationInDegrees, getCommandSenderName, getCurrentArmor, getCurrentEquippedItem, getCurrentItemOrArmor, getCurrentPlayerStrVsBlock, getCurrentPlayerStrVsBlock, getDisplayName, getEntityName, getEntityWorld, getEyeHeight, getFoodStats, getHeldItem, getHideCape, getInventoryEnderChest, getItemIcon, getItemInUse, getItemInUseCount, getItemInUseDuration, getLastActiveItems, getMaxInPortalTime, getPortalCooldown, getScore, getSleepTimer, getTeam, getTotalArmorValue, getTranslatedEntityName, getWorldScoreboard, getYOffset, handleHealthUpdate, interactWith, isBlocking, isCurrentToolAdventureModeExempt, isEntityInsideOpaqueBlock, isInvisibleToPlayer, isPlayerFullyAsleep, isPlayerSleeping, isPushedByWater, isSpawnForced, isSpawnForced, isUsingItem, joinEntityItemWithWorld, moveEntityWithHeading, onKillEntity, onLivingUpdate, playSound, preparePlayerToSpawn, refreshDisplayName, respawnPlayer, setAbsorptionAmount, setCurrentItemOrArmor, setDead, setInWeb, setScore, setSpawnChunk, setSpawnChunk, shouldHeal, stopUsingItem, triggerAchievement, updateRidden, verifyRespawnCoordinates, xpBarCap`

    - ### Methods inherited from class net.minecraft.entity.EntityLivingBase

      `addPotionEffect, attackEntityAsMob, canBeCollidedWith, canBePushed, canBreatheUnderwater, canEntityBeSeen, clearActivePotions, curePotionEffects, dismountEntity, func_110142_aN, func_142015_aE, func_94060_bK, getActivePotionEffect, getActivePotionEffects, getAge, getAITarget, getArrowCountInEntity, getAttributeMap, getCreatureAttribute, getEntityAttribute, getHealth, getLastAttacker, getLastAttackerTime, getLook, getLookVec, getMaxHealth, getPosition, getRNG, getRotationYawHead, getSwingProgress, heal, isChild, isClientWorld, isEntityAlive, isEntityUndead, isOnLadder, isOnSameTeam, isOnTeam, isPotionActive, isPotionActive, isPotionApplicable, knockBack, onEntityUpdate, performHurtAnimation, rayTrace, removePotionEffect, removePotionEffectClient, renderBrokenItemStack, setAIMoveSpeed, setArrowCountInEntity, setHealth, setJumping, setLastAttacker, setPositionAndRotation2, setRevengeTarget, setRotationYawHead, setSprinting, shouldRiderFaceForward, swingItem`

    - ### Methods inherited from class net.minecraft.entity.Entity

      `addEntityCrashInfo, addVelocity, applyEntityCollision, canAttackWithItem, canRenderOnFire, canRiderInteract, copyDataFrom, copyLocationAndAnglesFrom, doesEntityNotTriggerPressurePlate, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, getAir, getBlockExplosionResistance, getBoundingBox, getBrightness, getBrightnessForRender, getCollisionBorderSize, getCollisionBox, getDataWatcher, getDistance, getDistanceSq, getDistanceSqToEntity, getDistanceToEntity, getEntityData, getExtendedProperties, getMaxSafePointTries, getMountedYOffset, getParts, getPersistentID, getPickedResult, getShadowSize, getTeleportDirection, getUniqueID, handleLavaMovement, handleWaterMovement, hashCode, hitByEntity, interactFirst, isBurning, isCreatureType, isEating, isEntityEqual, isImmuneToFire, isInRangeToRenderDist, isInRangeToRenderVec3D, isInsideOfMaterial, isInvisible, isInWater, isOffsetPositionInLiquid, isRiding, isSneaking, isSprinting, isWet, moveEntity, moveFlying, onChunkLoad, onCollideWithPlayer, onStruckByLightning, readFromNBT, registerExtendedProperties, resetEntityId, setAir, setAngles, setEating, setFire, setInPortal, setInvisible, setLocationAndAngles, setPosition, setPositionAndRotation, setSneaking, setVelocity, setWorld, shouldDismountInWater, shouldExplodeBlock, shouldRenderInPass, shouldRiderSit, toString, updateRiderPosition, writeMountToNBT, writeToNBT, writeToNBTOptional`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### FakePlayer

          public FakePlayer(World world,
                    String name)

  - ### Method Detail

    - #### sendChatToPlayer

          public void sendChatToPlayer(String s)

    - #### canCommandSenderUseCommand

          public boolean canCommandSenderUseCommand(int i,
                                           String s)

      Description copied from class: `EntityPlayerMP`
      Returns true if the command sender is allowed to use the given command.
      Specified by:
        `canCommandSenderUseCommand` in interface `ICommandSender`
      Overrides:
        `canCommandSenderUseCommand` in class `EntityPlayerMP`

    - #### getPlayerCoordinates

          public ChunkCoordinates getPlayerCoordinates()

      Description copied from class: `EntityPlayerMP`
      Return the position for this command sender.
      Specified by:
        `getPlayerCoordinates` in interface `ICommandSender`
      Overrides:
        `getPlayerCoordinates` in class `EntityPlayerMP`

    - #### sendChatToPlayer

          public void sendChatToPlayer(ChatMessageComponent chatmessagecomponent)

      Specified by:
        `sendChatToPlayer` in interface `ICommandSender`
      Overrides:
        `sendChatToPlayer` in class `EntityPlayerMP`

    - #### addStat

          public void addStat(StatBase par1StatBase,
                     int par2)

      Description copied from class: `EntityPlayerMP`
      Adds a value to a statistic field.
      Overrides:
        `addStat` in class `EntityPlayerMP`

    - #### openGui

          public void openGui(Object mod,
                     int modGuiId,
                     World world,
                     int x,
                     int y,
                     int z)

      Overrides:
        `openGui` in class `EntityPlayer`

    - #### isEntityInvulnerable

          public boolean isEntityInvulnerable()

      Description copied from class: `Entity`
      Return whether this entity is invulnerable to damage.
      Overrides:
        `isEntityInvulnerable` in class `Entity`

    - #### canAttackPlayer

          public boolean canAttackPlayer(EntityPlayer player)

      Overrides:
        `canAttackPlayer` in class `EntityPlayerMP`

    - #### onDeath

          public void onDeath(DamageSource source)

      Description copied from class: `EntityPlayerMP`
      Called when the mob's health reaches 0.
      Overrides:
        `onDeath` in class `EntityPlayerMP`

    - #### onUpdate

          public void onUpdate()

      Description copied from class: `EntityPlayerMP`
      Called to update the entity's position/logic.
      Overrides:
        `onUpdate` in class `EntityPlayerMP`

    - #### travelToDimension

          public void travelToDimension(int dim)

      Description copied from class: `EntityPlayerMP`
      Teleports the entity to another dimension. Params: Dimension number to teleport to
      Overrides:
        `travelToDimension` in class `EntityPlayerMP`

    - #### updateClientInfo

          public void updateClientInfo(Packet204ClientInfo pkt)

      Overrides:
        `updateClientInfo` in class `EntityPlayerMP`