Package net.minecraftforge.common.util

Examples of net.minecraftforge.common.util.FakePlayer


                    //if (this.worldObj.setBlock(x, y, z, ((ItemBlock) this.inventorySlots[0].getItem()).field_150939_a, this.inventorySlots[0].getItemDamage(), 1 | 2)) {
                      //  this.decrStackSize(0, 1);
                       // markDirty();
                    //Block block = worldObj.getBlock(x, y, z);
                    boolean done=false;
                    FakePlayer player=FakePlayerFactory.getMinecraft((WorldServer)worldObj);
                    Item item=inventorySlots[0].getItem();
                    ItemStack stack=inventorySlots[0];
                    if (!done)
                        item.onItemUseFirst(stack, player, worldObj, x, y, z, ForgeDirection.OPPOSITES[orientation], 0F, 0F, 0F);
                    if (!done)
View Full Code Here


    List<EntityLivingBase> entsInBounds = worldObj.getEntitiesWithinAABB(EntityLivingBase.class, getKillBounds());
    if(!entsInBounds.isEmpty()) {

      for (EntityLivingBase ent : entsInBounds) {
        if(!ent.isDead) {
          FakePlayer fakee = getAttackera();
          fakee.setCurrentItemOrArmor(0, getStackInSlot(0));
          fakee.attackTargetEntityWithCurrentItem(ent);
          useNutrient();
          swingWeapon();
          if(getStackInSlot(0).stackSize <= 0) {
            setInventorySlotContents(0, null);
          }
View Full Code Here

        isFavourite = name.equalsIgnoreCase(player);
        isRemote = remote;

        if(!player.equalsIgnoreCase(""))
        {
            entInstance = isRemote ? createPlayer(world, player) : new FakePlayer((WorldServer)world, EntityHelperBase.getSimpleGameProfileFromName(player));
        }
        else if(tag != null)
        {
            entInstance = (EntityLivingBase)EntityList.createEntityFromNBT(tag, world);
        }
View Full Code Here

        if(!invalid)
        {
            if(!playerMorph.equalsIgnoreCase(""))
            {
                entInstance = isRemote ? createPlayer(world, playerMorph) : new FakePlayer((WorldServer)world, EntityHelperBase.getSimpleGameProfileFromName(playerMorph));
                identifier = "playerMorphState::player_" + playerMorph;
            }
            else
            {
                try
View Full Code Here

TOP

Related Classes of net.minecraftforge.common.util.FakePlayer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.