package net.glowstone.generator.decorators;

import java.util.HashMap;
import java.util.Map;
import java.util.Random;

import org.bukkit.Chunk;
import org.bukkit.World;
import org.bukkit.block.Biome;
import org.bukkit.generator.BlockPopulator;

public class BlockDecorator extends BlockPopulator {

    private int defaultAmount;
    private final Map<Biome, Integer> biomesDecorations = new HashMap<Biome, Integer>();

    public final BlockDecorator setDefaultAmount(int amount) {
        defaultAmount = amount;
        return this;
    }

    public final BlockDecorator setBiomeAmount(int amount, Biome... biomes) {
        for (Biome biome : biomes) {
            biomesDecorations.put(biome, amount);
        }
        return this;
    }

    public void decorate(World world, Random random, Chunk chunk) {
        // do nothing
    }

    @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);
        }
    }
}

@@ -245,16 +245,25 @@
 %0Apublic 
+abstract 
 class Bl
@@ -755,24 +755,33 @@
 %0A    public 
+abstract 
 void decorat
@@ -826,38 +826,9 @@
 unk)
- %7B%0A        // do nothing%0A    %7D
+;
 %0A%0A  

Mark BlockDecorator as abstract