Package net.minecraft.src

Examples of net.minecraft.src.Entity


      List<?> nearbyEntities = world.getEntitiesWithinAABBExcludingEntity(
               player.getMinecraftPlayer(), boundingBox
      );
      int removedDrops = 0;
      for(int entityIndex = 0; entityIndex < nearbyEntities.size(); entityIndex++) {
         Entity entity = (Entity)nearbyEntities.get(entityIndex);
         if(entity instanceof EntityItem) {
            EntityItem entityItem = (EntityItem)entity;
            if(entityItem.age >= 0) {
               player.getWorld().getMinecraftWorld().removeEntity(entityItem);
               removedDrops++;
View Full Code Here


    output.writeInt(entityId);
    output.writeString(title);
  }

  public void run(int id) {
    Entity e = SpoutClient.getInstance().getEntityFromId(entityId);
    if (e != null && e instanceof EntityLivingBase) {
      CraftLivingEntity living = (CraftLivingEntity)e.spoutEnty;
      // Check to see if this title is our username, if so, use defaults
      if (e instanceof EntityPlayer) {
        EntityPlayer player = (EntityPlayer)e;
View Full Code Here

      }
    }
  }

  public void render(GenericEntityWidget entityWidget) {
    Entity entity = SpoutClient.getInstance().getEntityFromId(entityWidget.getEntityId());
    if (entity != null) {
      GL11.glEnable(32826);
      GL11.glEnable(GL11.GL_COLOR_MATERIAL);
      GL11.glPushMatrix();
      GL11.glTranslated(entityWidget.getX() + entityWidget.getWidth() / 2, entityWidget.getY() + entityWidget.getHeight(), 50F);
View Full Code Here

    getHandle().mcProfiler.endStartSection("entity_info");
    if (isSpoutEnabled()) {
      LinkedList<CraftEntity> processed = new LinkedList<CraftEntity>();
      Iterator<Entity> i = Entity.toProcess.iterator();
      while (i.hasNext()) {
        Entity next = i.next();
        if (next.spoutEnty != null) {
          processed.add((CraftEntity) next.spoutEnty);
        }
      }
      Entity.toProcess.clear();
View Full Code Here

  public AbstractClientPlayer getAbstractPlayerFromId(int id) {
    if (getHandle().thePlayer.entityId == id) {
      return getHandle().thePlayer;
    }
    WorldClient world = (WorldClient)getHandle().theWorld;
    Entity e = world.getEntityByID(id);
    if (e instanceof AbstractClientPlayer) {
      return (AbstractClientPlayer) e;
    }
    return null;
  }
View Full Code Here

  public EntityPlayer getPlayerFromId(int id) {
    if (getHandle().thePlayer.entityId == id) {
      return getHandle().thePlayer;
    }
    WorldClient world = (WorldClient)getHandle().theWorld;
    Entity e = world.getEntityByID(id);
    if (e instanceof EntityPlayer) {
      return (EntityPlayer) e;
    }
    return null;
  }
View Full Code Here

    double playerX = map.getPlayerX();
    double playerZ = map.getPlayerZ();

    synchronized (map.watchedEntities) {
      for (WatchedEntity w:map.watchedEntities) {
        Entity e = w.entity;
        double entityX = e.posX - playerX;
        double entityZ = e.posZ - playerZ;
        boolean render = false;

        int circleX = MathHelper.floor_double(playerX);
View Full Code Here

    output.writeDouble(motY);
    output.writeDouble(motZ);
  }

  public void run(int playerId) {
    Entity e = SpoutClient.getInstance().getEntityFromId(entityId);
    if (e != null && !Double.isNaN(motX) && !Double.isNaN(motY) && !Double.isNaN(motZ)) {
      e.motionX = motX;
      e.motionY = motY;
      e.motionZ = motZ;
    }
View Full Code Here

        boundingBox.expand(f, f, f));
    for (int x = 0; x < list.size(); x++)
      if (list.get(x) instanceof Dragon)
        list.remove(x);
    if (list.size() > 0) {
      Entity e = (Entity) list.get(rand.nextInt(list.size()));
      while (!canEntityBeSeen(e))
        e = (Entity) list.get(rand.nextInt(list.size()));
      return e;
    } else
      return null;
View Full Code Here

  // } while(true);
  // }
  // contact hurt method
  private void collideAttack(List list) {
    for (int i = 0; i < list.size(); i++) {
      Entity entity = (Entity) list.get(i);
      boolean b = false;
      for (Entity e : dragonPartList)
        if (entity == e)
          b = true;
      if (entity instanceof EntityLiving && !b && entity != this) {
        entity.attackEntityFrom(DamageSource.causeMobDamage(this), 10);
      }
    }

  }
View Full Code Here

TOP

Related Classes of net.minecraft.src.Entity

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.