Examples of Biome


Examples of amidst.minecraft.Biome

    g2d.setColor(innerBoxBorderColor);
    g2d.drawRect(innerBox.x - 1, innerBox.y - 1, innerBox.width + 1 + (scrollbarVisible?scrollbarWidth:0), innerBox.height + 1);
    g2d.setClip(innerBox);
   
    for (int i = 0; i < biomes.size(); i++) {
      Biome biome = biomes.get(i);
      if (BiomeLayer.instance.isBiomeSelected(biome.index))
        g2d.setColor(((i % 2) == 1)?biomeLitBgColor1:biomeLitBgColor2);
      else
        g2d.setColor(((i % 2) == 1)?biomeBgColor1:biomeBgColor2);
      g2d.fillRect(innerBox.x, innerBox.y + i * 16 + biomeListYOffset,innerBox.width, 16);
View Full Code Here

Examples of amidst.minecraft.Biome

          //Log.i("Received NetGetBiomeDataResult: " + currentResults);
        } else if (object instanceof NetBiome[]) {
          NetBiome[] biomes = (NetBiome[])object;
          for (int i = 0; i < biomes.length; i++) {
            if (biomes[i] != null) {
              new Biome(biomes[i].name, biomes[i].id, biomes[i].color | 0xFF000000, true);
            }
          }
        }
      }
    });
View Full Code Here

Examples of org.bukkit.block.Biome

    public void playerMoveEvent(PlayerMoveEvent event) {

        if (event.getFrom().getBlock().equals(event.getTo().getBlock())) return;

        // Compare the two biomes
        Biome from = event.getFrom().getWorld().getBiome(event.getFrom().getBlockX(), event.getFrom().getBlockZ());
        Biome to = event.getTo().getWorld().getBiome(event.getTo().getBlockX(), event.getTo().getBlockZ());
        if (!from.equals(to)) {

            // Create contexts
            Map<String, dObject> context = new HashMap<String, dObject>();
            context.put("from", new dLocation(event.getFrom()));
            context.put("to", new dLocation(event.getFrom()));
            context.put("old_biome", new Element(from.name()));
            context.put("new_biome", new Element(to.name()));

            String determination = EventManager.doEvents(Arrays.asList(
                    "player enters biome", "player exits biome",
                    "player enters " + to.name(), "player exits " + from.name()
                ), null, new dPlayer(event.getPlayer()), context, true);

            if (determination.toUpperCase().startsWith("CANCELLED"))
                event.setCancelled(true);
        }
View Full Code Here

Examples of org.bukkit.block.Biome

    @Override
    public boolean setBiome(Vector2D position, BaseBiome biome) {
        BukkitImplAdapter adapter = WorldEditPlugin.getInstance().getBukkitImplAdapter();
        if (adapter != null) {
            Biome bukkitBiome = adapter.getBiome(biome.getId());
            getWorld().setBiome(position.getBlockX(), position.getBlockZ(), bukkitBiome);
            return true;
        } else {
            return false;
        }
View Full Code Here

Examples of org.bukkit.block.Biome

    @Nullable
    @Override
    public BiomeData getData(BaseBiome biome) {
        BukkitImplAdapter adapter = WorldEditPlugin.getInstance().getBukkitImplAdapter();
        if (adapter != null) {
            final Biome bukkitBiome = adapter.getBiome(biome.getId());
            return new BiomeData() {
                @Override
                public String getName() {
                    return bukkitBiome.name();
                }
            };
        } else {
            return null;
        }
View Full Code Here

Examples of org.bukkit.block.Biome

        int sourceZ = (source.getZ() << 4) + random.nextInt(16);
        int sourceY = random.nextInt(world.getHighestBlockYAt(sourceX, sourceZ+ 32);

        // the flower can change on each decoration pass
        Flower flower = null;
        final Biome biome = world.getBiome(sourceX, sourceZ);
        if (biomesFlowers.containsKey(biome)) {
            flower = getRandomFlower(random, biomesFlowers.get(biome));
        } else {
            flower = getRandomFlower(random, defaultFlowers);
        }
View Full Code Here

Examples of org.bukkit.block.Biome

            sourceY--;
        }

        // the grass species can change on each decoration pass
        GrassSpecies species = GrassSpecies.NORMAL;
        final Biome biome = world.getBiome(sourceX, sourceZ);
        if (biomesFernDensity.containsKey(biome)) {
            double density = biomesFernDensity.get(biome);
            if (random.nextFloat() < density) {
                species = GrassSpecies.FERN_LIKE;
            }
View Full Code Here

Examples of org.bukkit.block.Biome

    }

    @Override
    public void populate(World world, Random random, Chunk chunk) {
        int amount = defaultAmount;
        final Biome biome = world.getBiome(chunk.getX() << 4, chunk.getZ() << 4);
        if (biomesDecorations.containsKey(biome)) {
            amount = biomesDecorations.get(biome);
        }
        for (int i = 0; i < amount; i++) {
            decorate(world, random, chunk);
View Full Code Here

Examples of org.bukkit.block.Biome

        int chunkX = source.getX() * 16;
        int chunkZ = source.getZ() * 16;
        ChunkSnapshot snapshot = source.getChunkSnapshot();
        for (int x = 0; x < 16; x++) {
            for (int z = 0; z < 16; z++) {
                Biome biome = world.getBiome(x + chunkX, z + chunkZ);
                if (biome != Biome.TAIGA) {
                    continue;
                }

                int y = snapshot.getHighestBlockYAt(x, z);
View Full Code Here

Examples of org.bukkit.block.Biome

    return generator.oreProvider.remapBiome(biome);
  }

  @Override
  public void preGenerateChunk(WorldGenerator generator, PlatLot lot, ByteChunk chunk, BiomeGrid biomes, CachedYs blockYs) {
    Biome biome = lot.getChunkBiome();
    OreProvider ores = generator.oreProvider;
//    boolean surfaceCaves = isSurfaceCaveAt(chunk.chunkX, chunk.chunkZ);
    boolean flattened = blockYs.segmentWidth > 1;
   
    // shape the world
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.