Package net.minecraft.util

Examples of net.minecraft.util.ChunkCoordinates


   
    PlayerData data = PlayerHandler.getPlayerData(player);

    Vec3 spawnPoint = currentRound.gametype.getSpawnPoint(player);
    if(spawnPoint != null)
      setPlayersNextSpawnpoint(player, new ChunkCoordinates(MathHelper.floor_double(spawnPoint.xCoord), MathHelper.floor_double(spawnPoint.yCoord) + 1, MathHelper.floor_double(spawnPoint.zCoord)));
    else
      FlansMod.log("Could not find spawn point for " + player.getDisplayName() + " on team " + (data.newTeam == null ? "null" : data.newTeam.name));
  }
View Full Code Here


    /* Get world spawn location */
    @Override
    public DynmapLocation getSpawnLocation()
    {
      if(world != null) {
        ChunkCoordinates sloc = world.getSpawnPoint();
        spawnloc.x = sloc.posX;
        spawnloc.y = sloc.posY;
        spawnloc.z = sloc.posZ;
        spawnloc.world = this.getName();
      }
View Full Code Here

  @Override
  public boolean shouldExecute() {
    if(entity.getState() != EnumButterflyState.RESTING)
      return false;

    rest = new ChunkCoordinates((int)entity.posX, ((int)Math.floor(entity.posY)) - 1, (int)entity.posZ);
    if(entity.worldObj.isAirBlock(rest.posX, rest.posY, rest.posZ))
      return false;

    canLayEgg = canLayEgg();
    canPollinate = canPollinate();
View Full Code Here

        Vec3.createVectorHelper(entity.posX, entity.posY, entity.posZ));

    if (randomTarget == null)
      return null;

    ChunkCoordinates dest = new ChunkCoordinates((int)randomTarget.xCoord, (int)randomTarget.yCoord, (int)randomTarget.zCoord);
    if(validateDestination(dest))
      return dest;
    else
      return null;
  }
View Full Code Here

    else
      return null;
  }

  protected ChunkCoordinates getRandomDestinationUpwards() {
    ChunkCoordinates dest = new ChunkCoordinates((int)entity.posX, (int)entity.posY + entity.worldObj.rand.nextInt(10) + 2, (int)entity.posZ);
    if(validateDestination(dest))
      return dest;
    else
      return null;
  }
View Full Code Here

            return null;
        if (spawnProperty.equalsIgnoreCase("bed"))
        {
            if (player.getBedLocation() != null)
            {
                ChunkCoordinates spawn = player.getBedLocation();
                EntityPlayer.verifyRespawnCoordinates(player.worldObj, spawn, true);
                point = new WorldPoint(player.dimension, spawn.posX, spawn.posY, spawn.posZ);
            }
        }
        else
View Full Code Here

        }
    }

    private void tp(EntityPlayerMP player)
    {
        ChunkCoordinates spawn = player.getBedLocation();
        if (spawn != null)
        {
            spawn = EntityPlayer.verifyRespawnCoordinates(player.worldObj, spawn, true);
            if (spawn != null)
            {
View Full Code Here

            this.sleepPoint.setX(e.x);
            this.sleepPoint.setY(e.y);
            this.sleepPoint.setZ(e.z);
        }
        e.setResult(null);
        e.entityPlayer.playerLocation = new ChunkCoordinates(e.x, e.y, e.z);

    }
View Full Code Here

      return false;
   
    if(!entity.worldObj.isAirBlock((int)entity.posX, ((int)Math.floor(entity.posY)), (int)entity.posZ))
      return false;
   
    ChunkCoordinates rest = new ChunkCoordinates((int)entity.posX, ((int)Math.floor(entity.posY)) - 1, (int)entity.posZ);
    if(entity.worldObj.isAirBlock(rest.posX, rest.posY, rest.posZ))
      return false;
    if(Utils.isLiquidBlock(entity.worldObj, rest.posX, rest.posY, rest.posZ))
      return false;
    if(!entity.getButterfly().isAcceptedEnvironment(entity.worldObj, rest.posX, rest.posY, rest.posZ))
View Full Code Here

    biomesToSearch.removeAll(excludedBiomes);

    // If we are in a valid biome, we point to ourself.
    BiomeGenBase biome = world.getBiomeGenForCoords((int) player.posX, (int) player.posZ);
    if (biomesToSearch.contains(biome.biomeID)) {
      Proxies.common.setBiomefinderCoordinates(player, new ChunkCoordinates((int) player.posX, (int) player.posY, (int) player.posZ));
      return;
    }

    if (Proxies.common.isSimulating(world) && biomesToSearch.size() > 0) {
      ChunkCoordinates target = findNearestBiome(player, biomesToSearch);
      Proxies.common.setBiomefinderCoordinates(player, target);
    }

  }
View Full Code Here

TOP

Related Classes of net.minecraft.util.ChunkCoordinates

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.