net.minecraftforge.common.util

## 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.util.FakePlayer

- All Implemented Interfaces:
    ICommandSender, ICrafting

      public class FakePlayer
      extends EntityPlayerMP

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class net.minecraft.entity.player.EntityPlayer

      `EntityPlayer.EnumChatVisibility, EntityPlayer.EnumStatus`

    - ### Nested classes/interfaces inherited from class net.minecraft.entity.Entity

      `Entity.EnumEntitySize`

  - ### Field Summary

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

      `currentWindowId, destroyedItemsNetCache, isChangingQuantityOnly, loadedChunks, managedPosX, managedPosZ, mcServer, ping, playerConqueredTheEnd, 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, flyToggleTimer, foodStats, inventory, inventoryContainer, openContainer, PERSISTED_NBT_TAG, playerLocation, prevCameraYaw, sleeping, speedInAir, speedOnGround, xpCooldown`

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

      `arrowHitTimer, attackedAtYaw, attackingPlayer, attackTime, cameraPitch, dead, deathTime, entityAge, field_110154_aX, field_70741_aB, field_70763_ax, field_70764_aw, field_70768_au, field_70769_ao, field_70770_ap, hurtTime, isJumping, isSwingInProgress, jumpMovementFactor, lastDamage, limbSwing, limbSwingAmount, maxHurtResistantTime, maxHurtTime, moveForward, moveStrafing, newPosRotationIncrements, newPosX, newPosY, newPosZ, newRotationPitch, newRotationYaw, prevCameraPitch, prevHealth, prevLimbSwingAmount, prevRenderYawOffset, prevRotationYawHead, prevSwingProgress, randomYawVelocity, recentlyHit, renderYawOffset, rotationYawHead, scoreValue, swingProgress, swingProgressInt`

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

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FakePlayer(WorldServer world, com.mojang.authlib.GameProfile name)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addChatComponentMessage(IChatComponent chatmessagecomponent)`
    `void` | `addStat(StatBase par1StatBase, int par2)`
    `boolean` | `canAttackPlayer(EntityPlayer player)`
    `boolean` | `canCommandSenderUseCommand(int i, java.lang.String s)`
    `void` | `func_147100_a(C15PacketClientSettings pkt)`
    `ChunkCoordinates` | `getPlayerCoordinates()`
    `boolean` | `isEntityInvulnerable()`
    `void` | `onDeath(DamageSource source)`
    `void` | `onUpdate()`
    `void` | `openGui(java.lang.Object mod, int modGuiId, World world, int x, int y, int z)`
    `void` | `travelToDimension(int dim)`

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

      `addChatMessage, addExperienceLevel, addSelfToInternalCraftingInventory, attackEntityFrom, clonePlayer, closeContainer, closeScreen, displayGUIAnvil, displayGUIChest, displayGUIEnchantment, displayGUIHopperMinecart, displayGUIHorse, displayGUIMerchant, displayGUIWorkbench, func_143004_u, func_146093_a, func_146098_a, func_146100_a, func_146101_a, func_146102_a, func_146104_a, func_147096_v, func_147098_j, func_147099_x, getDefaultEyeHeight, getEyeHeight, getNextWindowId, getPlayerIP, getServerForPlayer, handleFalling, mountEntity, mountEntityAndWakeUp, onChangedPotionEffect, onCriticalHit, onEnchantmentCritical, onFinishedPotionEffect, onItemPickup, onItemUseFinish, onNewPotionEffect, onUpdateEntity, readEntityFromNBT, requestTexturePackLoad, resetHeight, sendContainerAndContentsToPlayer, sendContainerToPlayer, sendPlayerAbilities, sendProgressBarUpdate, sendSlotContents, setEntityActionState, setGameType, setItemInUse, setPlayerHealthUpdated, setPositionAndUpdate, sleepInBedAt, updateFallState, updateHeldItem, wakeUpPlayer, writeEntityToNBT`

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

      `addExhaustion, addExperience, addMovementStat, addScore, addToPlayerScore, applyEntityAttributes, attackTargetEntityWithCurrentItem, canEat, canHarvestBlock, canPlayerEdit, canTriggerWalking, clearItemInUse, damageArmor, damageEntity, destroyCurrentEquippedItem, displayGUIBook, dropOneItem, dropPlayerItemWithRandomChoice, entityInit, fall, func_145748_c_, func_146067_o, func_146094_a, func_146095_a, func_146097_a, getAbsorptionAmount, getAIMoveSpeed, getAlwaysRenderNameTagForRender, getArmorVisibility, getBedLocation, getBedLocation, getBedOrientationInDegrees, getBreakSpeed, getBreakSpeed, getCommandSenderName, getCurrentArmor, getCurrentEquippedItem, getCurrentPlayerStrVsBlock, getDeathSound, getDisplayName, getEntityWorld, getEquipmentInSlot, getExperiencePoints, getFoodStats, getGameProfile, getHeldItem, getHideCape, getHideCape, getHurtSound, getInventoryEnderChest, getItemIcon, getItemInUse, getItemInUseCount, getItemInUseDuration, getLastActiveItems, getMaxInPortalTime, getPortalCooldown, getPosition, getScore, getSleepTimer, getSplashSound, getSwimSound, getTeam, getTotalArmorValue, getWorldScoreboard, getYOffset, handleHealthUpdate, interactWith, isBlocking, isCurrentToolAdventureModeExempt, isEntityInsideOpaqueBlock, isInvisibleToPlayer, isMovementBlocked, isPlayer, isPlayerFullyAsleep, isPlayerSleeping, isPushedByWater, isSpawnForced, isSpawnForced, isUsingItem, joinEntityItemWithWorld, jump, moveEntityWithHeading, onKillEntity, onLivingUpdate, playSound, preparePlayerToSpawn, refreshDisplayName, respawnPlayer, setAbsorptionAmount, setCurrentItemOrArmor, setDead, setHideCape, setInWeb, setScore, setSpawnChunk, setSpawnChunk, shouldHeal, stopUsingItem, triggerAchievement, updateEntityActionState, updateItemUse, updateRidden, verifyRespawnCoordinates, xpBarCap`

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

      `addPotionEffect, applyArmorCalculations, applyPotionDamageCalculations, attackEntityAsMob, canBeCollidedWith, canBePushed, canBreatheUnderwater, canEntityBeSeen, clearActivePotions, collideWithEntity, collideWithNearbyEntities, curePotionEffects, decreaseAirSupply, dismountEntity, dropEquipment, dropFewItems, dropRareDrop, func_110142_aN, func_110146_f, func_142015_aE, func_146066_aG, func_94060_bK, getActivePotionEffect, getActivePotionEffects, getAge, getAITarget, getArrowCountInEntity, getAttributeMap, getCreatureAttribute, getEntityAttribute, getHealth, getLastAttacker, getLastAttackerTime, getLook, getLookVec, getMaxHealth, getRNG, getRotationYawHead, getSoundPitch, getSoundVolume, getSwingProgress, heal, isAIEnabled, isChild, isClientWorld, isEntityAlive, isEntityUndead, isOnLadder, isOnSameTeam, isOnTeam, isPotionActive, isPotionActive, isPotionApplicable, kill, knockBack, onDeathUpdate, onEntityUpdate, performHurtAnimation, rayTrace, removePotionEffect, removePotionEffectClient, renderBrokenItemStack, setAIMoveSpeed, setArrowCountInEntity, setBeenAttacked, setHealth, setJumping, setLastAttacker, setPositionAndRotation2, setRevengeTarget, setRotationYawHead, setSprinting, shouldRiderFaceForward, swingItem, updateAITasks, updateAITick, updateArmSwingProgress, updatePotionEffects`

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

      `addEntityCrashInfo, addVelocity, applyEntityCollision, canAttackWithItem, canRenderOnFire, canRiderInteract, copyDataFrom, copyLocationAndAnglesFrom, dealFireDamage, doesEntityNotTriggerPressurePlate, dropItem, entityDropItem, equals, extinguish, func_145771_j, func_145772_a, func_145774_a, func_145775_I, func_145778_a, func_145780_a, func_145781_i, getAir, getBoundingBox, getBrightness, getBrightnessForRender, getCollisionBorderSize, getCollisionBox, getDataWatcher, getDistance, getDistanceSq, getDistanceSqToEntity, getDistanceToEntity, getEntityData, getEntityId, getEntityString, getExtendedProperties, getFlag, getMaxSafePointTries, getMountedYOffset, getParts, getPersistentID, getPickedResult, getShadowSize, getTeleportDirection, getUniqueID, handleLavaMovement, handleWaterMovement, hashCode, hitByEntity, interactFirst, isBurning, isCreatureType, isEating, isEntityEqual, isImmuneToFire, isInRangeToRender3d, isInRangeToRenderDist, isInsideOfMaterial, isInvisible, isInWater, isOffsetPositionInLiquid, isRiding, isSneaking, isSprinting, isWet, moveEntity, moveFlying, newDoubleNBTList, newFloatNBTList, onChunkLoad, onCollideWithPlayer, onStruckByLightning, readFromNBT, registerExtendedProperties, resetEntityId, setAir, setAngles, setEating, setEntityId, setFire, setFlag, setInPortal, setInvisible, setLocationAndAngles, setOnFireFromLava, setPosition, setPositionAndRotation, setRotation, setSize, setSneaking, setVelocity, setWorld, shouldDismountInWater, shouldRenderInPass, shouldRiderSit, shouldSetPosAfterLoading, toString, updateRiderPosition, writeMountToNBT, writeToNBT, writeToNBTOptional`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### FakePlayer

          public FakePlayer(WorldServer world,
                    com.mojang.authlib.GameProfile name)

  - ### Method Detail

    - #### canCommandSenderUseCommand

          public boolean canCommandSenderUseCommand(int i,
                                           java.lang.String s)

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

    - #### getPlayerCoordinates

          public ChunkCoordinates getPlayerCoordinates()

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

    - #### addChatComponentMessage

          public void addChatComponentMessage(IChatComponent chatmessagecomponent)

      Overrides:
        `addChatComponentMessage` in class `EntityPlayerMP`

    - #### addStat

          public void addStat(StatBase par1StatBase,
                     int par2)

      Overrides:
        `addStat` in class `EntityPlayerMP`

    - #### openGui

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

      Overrides:
        `openGui` in class `EntityPlayer`

    - #### isEntityInvulnerable

          public boolean isEntityInvulnerable()

      Overrides:
        `isEntityInvulnerable` in class `Entity`

    - #### canAttackPlayer

          public boolean canAttackPlayer(EntityPlayer player)

      Overrides:
        `canAttackPlayer` in class `EntityPlayerMP`

    - #### onDeath

          public void onDeath(DamageSource source)

      Overrides:
        `onDeath` in class `EntityPlayerMP`

    - #### onUpdate

          public void onUpdate()

      Overrides:
        `onUpdate` in class `EntityPlayerMP`

    - #### travelToDimension

          public void travelToDimension(int dim)

      Overrides:
        `travelToDimension` in class `EntityPlayerMP`

    - #### func_147100_a

          public void func_147100_a(C15PacketClientSettings pkt)

      Overrides:
        `func_147100_a` in class `EntityPlayerMP`