Package net.minecraft.server.v1_7_R1

Examples of net.minecraft.server.v1_7_R1.EntityVillager


    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

      if(this.m_villager.e(this.m_friend) > 4)
        this.getRemoteEntity().move((LivingEntity)this.m_friend.getBukkitEntity(), (this.m_speed == -1 ? this.getRemoteEntity().getSpeed() : this.m_speed));
    }
    else if(this.getNavigation().g())
    {
      Vec3D vec = RandomPositionGenerator.a(this.m_villager, 16, 3);

      if(vec == null)
        return true;

      this.getRemoteEntity().move(new Location(this.getRemoteEntity().getBukkitEntity().getWorld(), vec.c, vec.d, vec.e), (this.m_speed == -1 ? this.getRemoteEntity().getSpeed() : this.m_speed));
View Full Code Here

    if(this.getEntityHandle() == null || NMSUtil.isInHomeArea(this.getEntityHandle()))
      return false;
    else
    {
      ChunkCoordinates chunkCoords = NMSUtil.getChunkCoordinates(this.getEntityHandle());
      Vec3D vec = RandomPositionGenerator.a(this.getEntityHandle(), 16, 7, this.getEntityHandle().world.getVec3DPool().create(chunkCoords.x, chunkCoords.y, chunkCoords.z));
      if(vec == null)
        return false;
      else
      {
        this.m_x = vec.c;
View Full Code Here

      return false;
    else if(this.m_target.e(this.getEntityHandle()) > this.m_minDistanceSquared)
      return false;
    else
    {
      Vec3D vec = RandomPositionGenerator.a(this.getEntityHandle(), 16, 7, this.getEntityHandle().world.getVec3DPool().create(this.m_target.locX, this.m_target.locY, this.m_target.locZ));

      if(vec == null)
        return false;
      else
      {
View Full Code Here

  {
    if(this.getEntityHandle() == null || (this.getEntityHandle().getLastDamager() == null && !this.getEntityHandle().isBurning()))
      return false;
    else
    {
      Vec3D vec = RandomPositionGenerator.a(this.getEntityHandle(), 5, 4);
      if(vec == null)
        return false;
      else
      {
        this.m_x = vec.c;
View Full Code Here

    if(!WorldUtilities.isInCircle(this.m_midSpot.getX(), this.m_midSpot.getZ(), handle.getLocation().getX(), handle.getLocation().getZ(), this.m_Radius) || super.shouldExecute())
    {
      int tries = 0;
      while(!WorldUtilities.isInCircle(this.m_midSpot.getX(), this.m_midSpot.getZ(), this.m_xPos, this.m_zPos, this.m_Radius) && tries <= 10)
      {
        Vec3D vector = RandomPositionGenerator.a(this.getEntityHandle(), 10, 7);
        if(vector != null)
        {
          this.m_xPos = vector.c;
          this.m_yPos = vector.d;
          this.m_zPos = vector.e;
View Full Code Here

TOP

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

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.