<commit_before>package com.khorn.terraincontrol.bukkit;

import com.khorn.terraincontrol.configuration.BiomeConfig;

import net.minecraft.server.BiomeBase;
import net.minecraft.server.BiomeMeta;

import org.bukkit.block.Biome;
import org.bukkit.craftbukkit.block.CraftBlock;

import java.lang.reflect.Field;
import java.util.List;

public class CustomBiome extends BiomeBase
{
    @SuppressWarnings("MismatchedReadAndWriteOfArray")
    public CustomBiome(int id, String name)
    {
        super(id);
        this.a(name);

        try
        {
            Field biomeMapping = CraftBlock.class.getDeclaredField("BIOME_MAPPING");

            biomeMapping.setAccessible(true);

            Biome[] mappingArray = (Biome[]) biomeMapping.get(null);
            mappingArray[id] = Biome.OCEAN;

        }
        catch (NoSuchFieldException e)
        {
            e.printStackTrace();  
        }
        catch (IllegalAccessException e)
        {
            e.printStackTrace();
        }
    }

    public void SetBiome(BiomeConfig config)
    {
        this.D = config.BiomeHeight;
        this.E = config.BiomeVolatility;
        this.A = config.SurfaceBlock;
        this.B = config.GroundBlock;
        this.F = config.BiomeTemperature;
        this.G = config.BiomeWetness;
        
        // This section modifies the BiomeMetas... or "SpawnGroups" as I would like to call them :P
        List<BiomeMeta> monsters = Obfu.getBiomeBase_MonsterBiomeMetas(this);
        List<BiomeMeta> creatures = Obfu.getBiomeBase_CreatureBiomeMetas(this);
        List<BiomeMeta> watercreatures = Obfu.getBiomeBase_WaterCreatureBiomeMetas(this);
        
        List<BiomeMeta> monsterMetas = Obfu.convertToBiomeMetaList(config.spawnMonsters);
        List<BiomeMeta> creatureMetas = Obfu.convertToBiomeMetaList(config.spawnCreatures);
        List<BiomeMeta> waterCreatureMetas = Obfu.convertToBiomeMetaList(config.spawnWaterCreatures);
        
        if ( ! config.spawnMonstersAddDefaults) monsters.clear();
        monsters.addAll(monsterMetas);
        
        if (monsterMetas.size() > 0)
        {
            System.out.println("monsterMetas: "+ monsterMetas.toString());
            System.out.println("monsters: "+ monsters.toString());
        }
        

        if ( ! config.spawnCreaturesAddDefaults) creatures.clear();
        creatures.addAll(creatureMetas);
        
        if ( ! config.spawnWaterCreaturesAddDefaults) watercreatures.clear();
        watercreatures.addAll(waterCreatureMetas);
    }
}<commit_msg>Forgot some debug.<commit_after>package com.khorn.terraincontrol.bukkit;

import com.khorn.terraincontrol.configuration.BiomeConfig;

import net.minecraft.server.BiomeBase;
import net.minecraft.server.BiomeMeta;

import org.bukkit.block.Biome;
import org.bukkit.craftbukkit.block.CraftBlock;

import java.lang.reflect.Field;
import java.util.List;

public class CustomBiome extends BiomeBase
{
    @SuppressWarnings("MismatchedReadAndWriteOfArray")
    public CustomBiome(int id, String name)
    {
        super(id);
        this.a(name);

        try
        {
            Field biomeMapping = CraftBlock.class.getDeclaredField("BIOME_MAPPING");

            biomeMapping.setAccessible(true);

            Biome[] mappingArray = (Biome[]) biomeMapping.get(null);
            mappingArray[id] = Biome.OCEAN;

        }
        catch (NoSuchFieldException e)
        {
            e.printStackTrace();  
        }
        catch (IllegalAccessException e)
        {
            e.printStackTrace();
        }
    }

    public void SetBiome(BiomeConfig config)
    {
        this.D = config.BiomeHeight;
        this.E = config.BiomeVolatility;
        this.A = config.SurfaceBlock;
        this.B = config.GroundBlock;
        this.F = config.BiomeTemperature;
        this.G = config.BiomeWetness;
        
        // This section modifies the BiomeMetas... or "SpawnGroups" as I would like to call them :P
        List<BiomeMeta> monsters = Obfu.getBiomeBase_MonsterBiomeMetas(this);
        List<BiomeMeta> creatures = Obfu.getBiomeBase_CreatureBiomeMetas(this);
        List<BiomeMeta> watercreatures = Obfu.getBiomeBase_WaterCreatureBiomeMetas(this);
        
        List<BiomeMeta> monsterMetas = Obfu.convertToBiomeMetaList(config.spawnMonsters);
        List<BiomeMeta> creatureMetas = Obfu.convertToBiomeMetaList(config.spawnCreatures);
        List<BiomeMeta> waterCreatureMetas = Obfu.convertToBiomeMetaList(config.spawnWaterCreatures);
        
        if ( ! config.spawnMonstersAddDefaults) monsters.clear();
        monsters.addAll(monsterMetas);

        if ( ! config.spawnCreaturesAddDefaults) creatures.clear();
        creatures.addAll(creatureMetas);
        
        if ( ! config.spawnWaterCreaturesAddDefaults) watercreatures.clear();
        watercreatures.addAll(waterCreatureMetas);
    }
}
{'fraction_non_alphanumeric': 0.09674092409240924, 'fraction_numerical': 0.00020627062706270627, 'mean_word_length': 2.7676767676767677, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '934784', 'n_tokens_mistral': 1521, 'n_tokens_neox': 1488, 'n_words': 227}