Examples of WorldGenerator


Examples of me.daddychurchill.CityWorld.WorldGenerator

   
    return platmap.getNumberOfRoads();
  }

  public String getContextName(Chunk c) throws IllegalArgumentException {
    WorldGenerator gen = (WorldGenerator) c.getWorld().getGenerator();
    int chunkX = c.getX();
    int chunkZ = c.getZ();

    // Setup info - seams to require this to prevent NPE's when server is restarted.
    gen.initializeWorldInfo(c.getWorld());

    // figure out what everything looks like. Again :/
    PlatMap platmap = gen.getPlatMap(chunkX, chunkZ);
    if (platmap == null)
      throw new IllegalArgumentException("PlatMap not found for specified chunk");

    return platmap.context.schematicFamily.toString();
  }
View Full Code Here

Examples of me.daddychurchill.CityWorld.WorldGenerator

    return platmap.context.schematicFamily.toString();
  }

  public DataContext getContext(Chunk c) throws IllegalArgumentException {

    WorldGenerator gen = (WorldGenerator) c.getWorld().getGenerator();
    int chunkX = c.getX();
    int chunkZ = c.getZ();

    // Setup info - seams to require this to prevent NPE's when server is restarted.
    gen.initializeWorldInfo(c.getWorld());

    // figure out what everything looks like. Again :/
    PlatMap platmap = gen.getPlatMap(chunkX, chunkZ);
    if (platmap == null)
      throw new IllegalArgumentException("PlatMap not found for specified chunk");
   
    return platmap.context;
  }
View Full Code Here

Examples of me.daddychurchill.CityWorld.WorldGenerator

    return platmap.context;
  }

  public String getLotStyleName(Chunk c) throws IllegalArgumentException, IndexOutOfBoundsException {

    WorldGenerator gen = (WorldGenerator) c.getWorld().getGenerator();
    int chunkX = c.getX();
    int chunkZ = c.getZ();

    // Setup info - seams to require this to prevent NPE's when server is restarted.
    gen.initializeWorldInfo(c.getWorld());

    // figure out what everything looks like. Again :/
    PlatMap platmap = gen.getPlatMap(chunkX, chunkZ);
    if (platmap == null)
      throw new IllegalArgumentException("PlatMap not found for specified chunk");
   
    // figure out the lot
    PlatLot lot = platmap.getMapLot(chunkX, chunkZ);
View Full Code Here

Examples of me.daddychurchill.CityWorld.WorldGenerator

    return lot.style.toString();
  }

  public LotStyle getLotStyle(Chunk c) throws IllegalArgumentException, IndexOutOfBoundsException {

    WorldGenerator gen = (WorldGenerator) c.getWorld().getGenerator();
    int chunkX = c.getX();
    int chunkZ = c.getZ();

    // Setup info - seams to require this to prevent NPE's when server is restarted.
    gen.initializeWorldInfo(c.getWorld());

    // figure out what everything looks like. Again :/
    PlatMap platmap = gen.getPlatMap(chunkX, chunkZ);
    if (platmap == null)
      throw new IllegalArgumentException("PlatMap not found for specified chunk");
   
    // figure out the lot
    PlatLot lot = platmap.getMapLot(chunkX, chunkZ);
View Full Code Here

Examples of me.daddychurchill.CityWorld.WorldGenerator

  }

  public String getSchematicName(Chunk c) throws IllegalArgumentException, IndexOutOfBoundsException {
    String name = null;

    WorldGenerator gen = (WorldGenerator) c.getWorld().getGenerator();
    int chunkX = c.getX();
    int chunkZ = c.getZ();

    // Setup info - seams to require this to prevent NPE's when server is restarted.
    gen.initializeWorldInfo(c.getWorld());

    // figure out what everything looks like. Again :/
    PlatMap platmap = gen.getPlatMap(chunkX, chunkZ);
    if (platmap == null)
      throw new IllegalArgumentException("PlatMap not found for specified chunk");
   
    // figure out the lot
    PlatLot lot = platmap.getMapLot(chunkX, chunkZ);
View Full Code Here

Examples of me.daddychurchill.CityWorld.WorldGenerator

    //plugin.reportMessage(CityWorld.pluginName + " API Full info called");

    HashMap<String, String> info = new HashMap<String, String>();
    String classname;

    WorldGenerator gen = (WorldGenerator) c.getWorld().getGenerator();
    int chunkX = c.getX();
    int chunkZ = c.getZ();

    // Setup info - seams to require this to prevent NPE's when server is restarted.
    gen.initializeWorldInfo(c.getWorld());

    // figure out what everything looks like. Again :/
    PlatMap platmap = gen.getPlatMap(chunkX, chunkZ);
    if (platmap == null)
      throw new IllegalArgumentException("PlatMap not found for specified chunk");
   
    // figure out the lot
    PlatLot lot = platmap.getMapLot(chunkX, chunkZ);
View Full Code Here

Examples of me.daddychurchill.CityWorld.WorldGenerator

    return info;
  }

  public int getRoadCount(Chunk c) throws IllegalArgumentException {

    WorldGenerator gen = (WorldGenerator) c.getWorld().getGenerator();
    int chunkX = c.getX();
    int chunkZ = c.getZ();

    // Setup info - seams to require this to prevent NPE's when server is restarted.
    gen.initializeWorldInfo(c.getWorld());

    // figure out what everything looks like. Again :/
    PlatMap platmap = gen.getPlatMap(chunkX, chunkZ);
    if (platmap == null)
      throw new IllegalArgumentException("PlatMap not found for specified chunk");
   
    return platmap.getNumberOfRoads();
  }
View Full Code Here

Examples of net.minecraft.world.gen.feature.WorldGenerator

        if (world.isRemote)
            return false;

        int meta = world.getBlockMetadata(x, y, z);
        world.setBlockToAir(x, y, z);
        WorldGenerator obj = null;

        if (meta == 0)
        {
            obj = new GlowshroomGenBlueGreen(true, 0);
        }
        if (meta == 1)
        {
            obj = new GlowshroomGenPurple(true);
        }
        if (meta == 2)
        {
            obj = new GlowshroomGenBlueGreen(true, 1);
        }

        /*if (this.blockID == Block.mushroomBrown.blockID)
        {
            worldgenbigmushroom = new WorldGenBigMushroom(0);
        }
        else if (this.blockID == Block.mushroomRed.blockID)
        {
            worldgenbigmushroom = new WorldGenBigMushroom(1);
        }*/

        if (obj != null && obj.generate(world, random, x, y, z))
        {
            return true;
        }
        else
        {
View Full Code Here

Examples of net.minecraft.world.gen.feature.WorldGenerator

            }
            if (random.nextInt(35) == 0)
            {
                for (int i = 0; i < 5; i++)
                {
                    WorldGenerator obj = random.nextInt(3) == 0 ? purpleGlowshroom : blueGreenGlowshroom;
                    xSpawn = xPos + random.nextInt(24) - 4;
                    zSpawn = zPos + random.nextInt(24) - 4;
                    ySpawn = findGround(world, xSpawn, random.nextInt(64) + 32, zSpawn);
                    if (ySpawn != -1)
                    {
                        obj.generate(world, random, xSpawn, ySpawn, zSpawn);
                    }
                }
            }
        }
    }
View Full Code Here

Examples of net.minecraft.world.gen.feature.WorldGenerator

    public void func_149878_d (World world, int x, int y, int z, Random random)
    {
        int md = world.getBlockMetadata(x, y, z) % 8;
        world.setBlock(x, y, z, Blocks.air);
        WorldGenerator obj = null;

        if (md == 1)
            obj = new RareTreeGen(true, 4, 2, 1, 1);

        else if (md == 2)
            obj = new RareTreeGen(true, 9, 8, 2, 2);

        else if (md == 3)
            obj = new RareTreeGen(true, 6, 4, 3, 3);

        else if (md == 4)
            obj = new WillowGen(true);

        else
            obj = new RareTreeGen(true, 4, 2, 0, 0);

        if (!(obj.generate(world, random, x, y, z)))
            world.setBlock(x, y, z, this, md + 8, 3);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.