Package appeng.helpers

Examples of appeng.helpers.MeteoritePlacer$FalloutSnow


  private boolean tryMeteorite(World w, int depth, int x, int z)
  {
    for (int tries = 0; tries < 20; tries++)
    {
      MeteoritePlacer mp = new MeteoritePlacer();

      if ( mp.spawnMeteorite( new MeteoritePlacer.ChunkOnly( w, x >> 4, z >> 4 ), x, depth, z ) )
      {
        int px = x >> 4;
        int pz = z >> 4;

        for (int cx = px - 6; cx < px + 6; cx++)
          for (int cz = pz - 6; cz < pz + 6; cz++)
          {
            if ( w.getChunkProvider().chunkExists( cx, cz ) )
            {
              if ( px == cx && pz == cz )
                continue;

              if ( WorldSettings.getInstance().hasGenerated( w.provider.dimensionId, cx, cz ) )
              {
                MeteoritePlacer mp2 = new MeteoritePlacer();
                mp2.spawnMeteorite( new MeteoritePlacer.ChunkOnly( w, cx, cz ), mp.getSettings() );
              }
            }
          }

        return true;
View Full Code Here


      double minSqDist = Double.MAX_VALUE;

      // near by meteorites!
      for (NBTTagCompound data : getNearByMeteorites( w, chunkX, chunkZ ))
      {
        MeteoritePlacer mp = new MeteoritePlacer();
        mp.spawnMeteorite( new MeteoritePlacer.ChunkOnly( w, chunkX, chunkZ ), data );

        minSqDist = Math.min( minSqDist, mp.getSqDistance( x, z ) );
      }

      boolean isCluster = (minSqDist < 30 * 30) && Platform.getRandomFloat() < AEConfig.instance.meteoriteClusterChance;

      if ( minSqDist > AEConfig.instance.minMeteoriteDistanceSq || isCluster )
View Full Code Here

  public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
  {
    if ( Platform.isClient() )
      return false;

    MeteoritePlacer mp = new MeteoritePlacer();
    boolean worked = mp.spawnMeteorite( new MeteoritePlacer.StandardWorld( world ), x, y, z );

    if ( !worked )
      player.addChatMessage( new ChatComponentText( "Un-suitable Location." ) );

    return true;
View Full Code Here

TOP

Related Classes of appeng.helpers.MeteoritePlacer$FalloutSnow

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.