Package net.minecraft.server.v1_7_R1

Examples of net.minecraft.server.v1_7_R1.EntityPlayer


      double minDist = Double.MAX_VALUE;
      Iterator it = villagers.iterator();

      while(it.hasNext())
      {
        EntityVillager villager = (EntityVillager)it.next();
        if(villager != this.m_villager && !villager.bZ() && villager.getAge() < 0)
        {
          double dist = villager.e(this.m_villager);

          if(dist <= minDist)
          {
            minDist = dist;
            this.m_friend = villager;
View Full Code Here


  public void removeOffer(TradeOffer inOffer)
  {
    Iterator it = this.m_recipeList.iterator();
    while(it.hasNext())
    {
      MerchantRecipe recipe = (MerchantRecipe)it.next();
      if(isSameOffer(inOffer, recipe))
        it.remove();
    }
    this.m_offerings.remove(inOffer);
  }
View Full Code Here

    while(it.hasNext())
    {
      TradeOffer next = it.next();
      if(next.getCost().equals(inForItem))
      {
        MerchantRecipe recipe = this.getRecipeFromOffer(next);
        this.m_recipeList.remove(recipe);
        it.remove();
      }
    }
  }
View Full Code Here

  public MerchantRecipe getRecipeFromOffer(TradeOffer inOffer)
  {
    for(Object o : this.m_recipeList)
    {
      MerchantRecipe recipe = (MerchantRecipe)o;
      if(isSameOffer(inOffer, recipe))
        return recipe;
    }

    return null;
View Full Code Here

  private void populateRecipeList()
  {
    this.m_recipeList = new MerchantRecipeList();
    for(TradeOffer offer : this.m_offerings)
    {
      MerchantRecipe recipe = new MerchantRecipe(CraftItemStack.asNMSCopy(offer.getCost()), (offer.getSecondCost() != null ? CraftItemStack.asNMSCopy(offer.getSecondCost()) : null), CraftItemStack.asNMSCopy(offer.getResult()));
      recipe.a(-7); //reset to 0
      if(offer.getRemainingUses() == -1)
        recipe.a(2);
      else
        recipe.a(offer.getRemainingUses());

      this.m_recipeList.a(recipe);
    }
  }
View Full Code Here

    return ReflectionUtil.getParameterDataForClass(this).toArray(new ParameterData[0]);
  }

  private void populateRecipeList()
  {
    this.m_recipeList = new MerchantRecipeList();
    for(TradeOffer offer : this.m_offerings)
    {
      MerchantRecipe recipe = new MerchantRecipe(CraftItemStack.asNMSCopy(offer.getCost()), (offer.getSecondCost() != null ? CraftItemStack.asNMSCopy(offer.getSecondCost()) : null), CraftItemStack.asNMSCopy(offer.getResult()));
      recipe.a(-7); //reset to 0
      if(offer.getRemainingUses() == -1)
View Full Code Here

    }

    @Override
    public void handlePacket(Object packet, Player destination) throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException {
        if (packet instanceof PacketPlayOutNamedEntitySpawn) {
            final PacketPlayOutNamedEntitySpawn p = (PacketPlayOutNamedEntitySpawn) packet;
            final GameProfile profile = (GameProfile) this.gameProfileField.get(p);
            final String oldName = profile.getName();
            final String oldID = profile.getId();
            final TagInfo newName = this.handler.getNameForPacket20(oldID, this.entityIDField.getInt(p), oldName, destination);
            if (newName != null) {
View Full Code Here

    for(int i = 0; i < this.m_nodes.length; i++)
    {
      BlockNode node = this.m_nodes[i];
      points[i] = new PathPoint(node.getX(), node.getZ(), node.getZ());
    }
    return new PathEntity(points);
  }
View Full Code Here

  {
    PathPoint[] points = new PathPoint[this.m_nodes.length];
    for(int i = 0; i < this.m_nodes.length; i++)
    {
      BlockNode node = this.m_nodes[i];
      points[i] = new PathPoint(node.getX(), node.getZ(), node.getZ());
    }
    return new PathEntity(points);
  }
View Full Code Here

        }
      }

      if(this.m_friend == null)
      {
        Vec3D vec = RandomPositionGenerator.a(this.m_villager, 16, 3);

        if(vec == null)
          return false;

        Vec3D.a.release(vec);
View Full Code Here

TOP

Related Classes of net.minecraft.server.v1_7_R1.EntityPlayer

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.