Package mekanism.common.entity

Examples of mekanism.common.entity.EntityRobit


        if(getEnergy() > 0)
        {
          if(entity instanceof EntityRobit)
          {
            EntityRobit robit = (EntityRobit)entity;

            double canGive = Math.min(getEnergy(), 1000);
            double toGive = Math.min(robit.MAX_ELECTRICITY-robit.getEnergy(), canGive);

            robit.setEnergy(robit.getEnergy() + toGive);
            setEnergy(getEnergy() - toGive);
          }
          else if(entity instanceof EntityPlayer)
          {
            EntityPlayer player = (EntityPlayer)entity;
View Full Code Here


      case 19:
        return new GuiPasswordEnter((TileEntityElectricChest)tileEntity);
      case 20:
        return new GuiPasswordModify((TileEntityElectricChest)tileEntity);
      case 21:
        EntityRobit robit = (EntityRobit)world.getEntityByID(x);

        if(robit != null)
        {
          return new GuiRobitMain(player.inventory, robit);
        }
      case 22:
        return new GuiRobitCrafting(player.inventory, world, x);
      case 23:
        EntityRobit robit1 = (EntityRobit)world.getEntityByID(x);

        if(robit1 != null)
        {
          return new GuiRobitInventory(player.inventory, robit1);
        }
      case 24:
        EntityRobit robit2 = (EntityRobit)world.getEntityByID(x);

        if(robit2 != null)
        {
          return new GuiRobitSmelting(player.inventory, robit2);
        }
View Full Code Here

      case 17:
        return new ContainerElectricPump(player.inventory, (TileEntityElectricPump)tileEntity);
      case 18:
        return new ContainerDynamicTank(player.inventory, (TileEntityDynamicTank)tileEntity);
      case 21:
        EntityRobit robit = (EntityRobit)world.getEntityByID(x);

        if(robit != null)
        {
          return new ContainerRobitMain(player.inventory, robit);
        }
      case 22:
        return new ContainerRobitCrafting(player.inventory, world);
      case 23:
        EntityRobit robit1 = (EntityRobit)world.getEntityByID(x);

        if(robit1 != null)
        {
          return new ContainerRobitInventory(player.inventory, robit1);
        }
      case 24:
        EntityRobit robit2 = (EntityRobit)world.getEntityByID(x);

        if(robit2 != null)
        {
          return new ContainerRobitSmelting(player.inventory, robit2);
        }
View Full Code Here

  }

  @Override
  protected ResourceLocation getEntityTexture(Entity entity)
  {
    EntityRobit robit = (EntityRobit)entity;

    if((Math.abs(entity.posX-entity.prevPosX) + Math.abs(entity.posX-entity.prevPosX)) > 0.001)
    {
      if(robit.ticksExisted % 3 == 0)
      {
View Full Code Here

      TileEntityChargepad chargepad = (TileEntityChargepad)tileEntity;
      if(!chargepad.isActive)
      {
        if(!world.isRemote)
        {
          EntityRobit robit = new EntityRobit(world, x+0.5, y+0.1, z+0.5);

          robit.setHome(Coord4D.get(chargepad));
          robit.setEnergy(getEnergy(itemstack));
          robit.setOwner(entityplayer.getCommandSenderName());
          robit.setInventory(getInventory(itemstack));
          robit.setName(getName(itemstack));

          world.spawnEntityInWorld(robit);
        }

        entityplayer.setCurrentItemOrArmor(0, null);
View Full Code Here

        player.openGui(Mekanism.instance, 25, player.worldObj, message.entityId, 0, 0);
      }
    }
    else if(message.activeType == RobitPacketType.FOLLOW)
    {
      EntityRobit robit = (EntityRobit)player.worldObj.getEntityByID(message.entityId);

      if(robit != null)
      {
        robit.setFollowing(!robit.getFollowing());
      }
    }
    else if(message.activeType == RobitPacketType.NAME)
    {
      EntityRobit robit = (EntityRobit)player.worldObj.getEntityByID(message.entityId);

      if(robit != null)
      {
        robit.setName(message.name);
      }
    }
    else if(message.activeType == RobitPacketType.GO_HOME)
    {
      EntityRobit robit = (EntityRobit)player.worldObj.getEntityByID(message.entityId);

      if(robit != null)
      {
        robit.goHome();
      }
    }
    else if(message.activeType == RobitPacketType.DROP_PICKUP)
    {
      EntityRobit robit = (EntityRobit)player.worldObj.getEntityByID(message.entityId);

      if(robit != null)
      {
        robit.setDropPickup(!robit.getDropPickup());
      }
    }
   
    return null;
  }
View Full Code Here

TOP

Related Classes of mekanism.common.entity.EntityRobit

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.