<commit_before>package com.mcmoddev.orespawn;

import com.google.common.base.Function;
import com.mcmoddev.lib.init.Materials;

import mmd.orespawn.api.OreSpawnAPI;
import mmd.orespawn.api.SpawnLogic;
import net.minecraftforge.fml.common.Loader;

public class NetherMetalsOreSpawn implements Function<OreSpawnAPI, SpawnLogic> {

	@Override
	public SpawnLogic apply(OreSpawnAPI api) {

		SpawnLogic logic = api.createSpawnLogic();

		// Vanilla
		logic.getDimension(-1)
				.addOre(Materials.getMaterialByName("coal").oreNether.getDefaultState(), 10, 8,  12, 0,  200)
				.addOre(Materials.getMaterialByName("diamond").oreNether.getDefaultState(), 2, 8,  12, 0,  200)
				.addOre(Materials.getMaterialByName("emerald").oreNether.getDefaultState(), 4, 8,  12, 0,  200)
				.addOre(Materials.getMaterialByName("gold").oreNether.getDefaultState(), 5, 8,  12, 0,  200)
				.addOre(Materials.getMaterialByName("iron").oreNether.getDefaultState(), 10, 8,  12, 0,  200);
				/*
				.addOre(ModBlocks.lapisOre.getDefaultState(), 8, 8,  12, 0,  96)
				.addOre(ModBlocks.redstoneOre.getDefaultState(), 8, 8,  12, 0,  96);
		 		*/

		//Base Metals
		if (Loader.isModLoaded("basemetals")) {
			logic.getDimension(-1)
					.addOre(Materials.getMaterialByName("antimony").oreNether.getDefaultState(), 8, 4, 10, 0,  200)
					.addOre(Materials.getMaterialByName("bismuth").oreNether.getDefaultState(), 8, 4,  10, 0,  200)
					.addOre(Materials.getMaterialByName("copper").oreNether.getDefaultState(), 10, 12,  20, 0,  200)
					.addOre(Materials.getMaterialByName("lead").oreNether.getDefaultState(), 8, 12,  20, 0,  200)
					.addOre(Materials.getMaterialByName("mercury").oreNether.getDefaultState(), 4, 4,  10, 0,  200)
					.addOre(Materials.getMaterialByName("nickel").oreNether.getDefaultState(), 6, 4,  10, 0,  200)
					.addOre(Materials.getMaterialByName("platinum").oreNether.getDefaultState(), 2, 4,  10, 0,  200)
					.addOre(Materials.getMaterialByName("silver").oreNether.getDefaultState(), 8, 8,  10, 0,  200)
					.addOre(Materials.getMaterialByName("tin").oreNether.getDefaultState(), 10, 12,  20, 0,  200)
					.addOre(Materials.getMaterialByName("zinc").oreNether.getDefaultState(), 6, 8,  12, 0,  200);
		}

		//Modern Metals
		if (Loader.isModLoaded("modernmetals")) {
			logic.getDimension(-1)
					.addOre(Materials.getMaterialByName("aluminum").oreNether.getDefaultState(), 10, 8,  10, 0,  200)
					.addOre(Materials.getMaterialByName("cadmium").oreNether.getDefaultState(), 4, 8,  10, 0,  200)
					.addOre(Materials.getMaterialByName("chromium").oreNether.getDefaultState(), 4, 8,  10, 0,  200)
					.addOre(Materials.getMaterialByName("iridium").oreNether.getDefaultState(), 6, 8,  10, 0,  200)
					.addOre(Materials.getMaterialByName("magnesium").oreNether.getDefaultState(), 6, 8,  10, 0,  200)
					.addOre(Materials.getMaterialByName("manganese").oreNether.getDefaultState(), 6, 8,  10, 0,  200)
					.addOre(Materials.getMaterialByName("osmium").oreNether.getDefaultState(), 10, 8,  10, 0,  200)
					.addOre(Materials.getMaterialByName("plutonium").oreNether.getDefaultState(), 4, 4,  10, 0,  200)
					.addOre(Materials.getMaterialByName("rutile").oreNether.getDefaultState(), 8, 8,  10, 0,  200)
					.addOre(Materials.getMaterialByName("tantalum").oreNether.getDefaultState(), 8, 8,  10, 0,  200)
					.addOre(Materials.getMaterialByName("titanium").oreNether.getDefaultState(), 4, 4,  10, 0,  200)
					.addOre(Materials.getMaterialByName("tungsten").oreNether.getDefaultState(), 8, 8,  10, 0,  200)
					.addOre(Materials.getMaterialByName("uranium").oreNether.getDefaultState(), 2, 4,  10, 0,  200)
					.addOre(Materials.getMaterialByName("zirconium").oreNether.getDefaultState(), 8, 8,  10, 0,  200);
		}

		return logic;
	}
}<commit_msg>lets fix this up so it actually checks if a materials is enabled before trying to use it<commit_after>package com.mcmoddev.orespawn;

import com.google.common.base.Function;
import com.mcmoddev.lib.init.Materials;

import mmd.orespawn.api.OreSpawnAPI;
import mmd.orespawn.api.SpawnLogic;
import net.minecraftforge.fml.common.Loader;

public class NetherMetalsOreSpawn implements Function<OreSpawnAPI, SpawnLogic> {

	@Override
	public SpawnLogic apply(OreSpawnAPI api) {

		SpawnLogic logic = api.createSpawnLogic();

		// Vanilla
		logic.getDimension(-1)
		.addOre(Materials.getMaterialByName("coal").oreNether.getDefaultState(), 10, 8,  12, 0,  200)
		.addOre(Materials.getMaterialByName("diamond").oreNether.getDefaultState(), 2, 8,  12, 0,  200)
		.addOre(Materials.getMaterialByName("emerald").oreNether.getDefaultState(), 4, 8,  12, 0,  200)
		.addOre(Materials.getMaterialByName("gold").oreNether.getDefaultState(), 5, 8,  12, 0,  200)
		.addOre(Materials.getMaterialByName("iron").oreNether.getDefaultState(), 10, 8,  12, 0,  200)
		.addOre(Materials.getMaterialByName("lapis").oreNether.getDefaultState(), 8, 8,  12, 0,  96)
		.addOre(Materials.getMaterialByName("redstone").oreNether.getDefaultState(), 8, 8,  12, 0,  96);

		//Base Metals
		if (Loader.isModLoaded("basemetals")) {
			if( com.mcmoddev.basemetals.util.Config.Options.enableAntimony ) {
				logic.getDimension(-1).addOre(Materials.getMaterialByName("antimony").oreNether.getDefaultState(), 8, 4, 10, 0,  200);
			}

			if( com.mcmoddev.basemetals.util.Config.Options.enableBismuth ) {
				logic.getDimension(-1).addOre(Materials.getMaterialByName("bismuth").oreNether.getDefaultState(), 8, 4,  10, 0,  200);
			}

			if( com.mcmoddev.basemetals.util.Config.Options.enableCopper ) {
				logic.getDimension(-1).addOre(Materials.getMaterialByName("copper").oreNether.getDefaultState(), 10, 12,  20, 0,  200);
			}

			if( com.mcmoddev.basemetals.util.Config.Options.enableLead ) {
				logic.getDimension(-1).addOre(Materials.getMaterialByName("lead").oreNether.getDefaultState(), 8, 12,  20, 0,  200);
			}

			if( com.mcmoddev.basemetals.util.Config.Options.enableMercury ) {
				logic.getDimension(-1).addOre(Materials.getMaterialByName("mercury").oreNether.getDefaultState(), 4, 4,  10, 0,  200);
			}

			if( com.mcmoddev.basemetals.util.Config.Options.enableNickel ) {
				logic.getDimension(-1).addOre(Materials.getMaterialByName("nickel").oreNether.getDefaultState(), 6, 4,  10, 0,  200);
			}

			if( com.mcmoddev.basemetals.util.Config.Options.enablePlatinum ) {
				logic.getDimension(-1).addOre(Materials.getMaterialByName("platinum").oreNether.getDefaultState(), 2, 4,  10, 0,  200);
			}

			if( com.mcmoddev.basemetals.util.Config.Options.enableSilver ) {
				logic.getDimension(-1).addOre(Materials.getMaterialByName("silver").oreNether.getDefaultState(), 8, 8,  10, 0,  200);
			}

			if( com.mcmoddev.basemetals.util.Config.Options.enableTin ) {
				logic.getDimension(-1).addOre(Materials.getMaterialByName("tin").oreNether.getDefaultState(), 10, 12,  20, 0,  200);
			}

			if( com.mcmoddev.basemetals.util.Config.Options.enableZinc ) {
				logic.getDimension(-1).addOre(Materials.getMaterialByName("zinc").oreNether.getDefaultState(), 6, 8,  12, 0,  200);
			}


		}

		//Modern Metals
		if (Loader.isModLoaded("modernmetals")) {
			if( com.mcmoddev.modernmetals.util.Config.Options.enableAluminum ) {
				logic.getDimension(-1).addOre(Materials.getMaterialByName("aluminum").oreNether.getDefaultState(), 10, 8,  10, 0,  200);
			}

			if( com.mcmoddev.modernmetals.util.Config.Options.enableCadmium ) {
				logic.getDimension(-1).addOre(Materials.getMaterialByName("cadmium").oreNether.getDefaultState(), 4, 8,  10, 0,  200);
			}

			if( com.mcmoddev.modernmetals.util.Config.Options.enableChromium ) {
				logic.getDimension(-1).addOre(Materials.getMaterialByName("chromium").oreNether.getDefaultState(), 4, 8,  10, 0,  200);
			}

			if( com.mcmoddev.modernmetals.util.Config.Options.enableIridium ) {
				logic.getDimension(-1).addOre(Materials.getMaterialByName("iridium").oreNether.getDefaultState(), 6, 8,  10, 0,  200);
			}

			if( com.mcmoddev.modernmetals.util.Config.Options.enableMagnesium ) {
				logic.getDimension(-1).addOre(Materials.getMaterialByName("magnesium").oreNether.getDefaultState(), 6, 8,  10, 0,  200);
			}

			if( com.mcmoddev.modernmetals.util.Config.Options.enableManganese ) {
				logic.getDimension(-1).addOre(Materials.getMaterialByName("manganese").oreNether.getDefaultState(), 6, 8,  10, 0,  200);
			}

			if( com.mcmoddev.modernmetals.util.Config.Options.enableOsmium ) {
				logic.getDimension(-1).addOre(Materials.getMaterialByName("osmium").oreNether.getDefaultState(), 10, 8,  10, 0,  200);
			}

			if( com.mcmoddev.modernmetals.util.Config.Options.enablePlutonium ) {
				logic.getDimension(-1).addOre(Materials.getMaterialByName("plutonium").oreNether.getDefaultState(), 4, 4,  10, 0,  200);
			}

			if( com.mcmoddev.modernmetals.util.Config.Options.enableRutile ) {
				logic.getDimension(-1).addOre(Materials.getMaterialByName("rutile").oreNether.getDefaultState(), 8, 8,  10, 0,  200);
			}

			if( com.mcmoddev.modernmetals.util.Config.Options.enableTantalum ) {
				logic.getDimension(-1).addOre(Materials.getMaterialByName("tantalum").oreNether.getDefaultState(), 8, 8,  10, 0,  200);
			}

			if( com.mcmoddev.modernmetals.util.Config.Options.enableTitanium ) {
				logic.getDimension(-1).addOre(Materials.getMaterialByName("titanium").oreNether.getDefaultState(), 4, 4,  10, 0,  200);
			}

			if( com.mcmoddev.modernmetals.util.Config.Options.enableTungsten ) {
				logic.getDimension(-1).addOre(Materials.getMaterialByName("tungsten").oreNether.getDefaultState(), 8, 8,  10, 0,  200);
			}

			if( com.mcmoddev.modernmetals.util.Config.Options.enableUranium ) {
				logic.getDimension(-1).addOre(Materials.getMaterialByName("uranium").oreNether.getDefaultState(), 2, 4,  10, 0,  200);
			}

			if( com.mcmoddev.modernmetals.util.Config.Options.enableZirconium ) {
				logic.getDimension(-1).addOre(Materials.getMaterialByName("zirconium").oreNether.getDefaultState(), 8, 8,  10, 0,  200);
			}
		}

		return logic;
	}
}
{'fraction_non_alphanumeric': 0.1576934688537788, 'fraction_numerical': 0.05414108885981685, 'mean_word_length': 4.708213670304422, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3401141', 'n_tokens_mistral': 4388, 'n_tokens_neox': 3674, 'n_words': 515}