forked from TAIGA/TAIGA
Fixed a lot of minor issues. Added configuration for ore values and ore generation.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -175,3 +175,4 @@ gradle-app.setting
|
||||
|
||||
# Forge
|
||||
run/
|
||||
src/main/java/com/sosnitzka/taiga/dev
|
||||
|
@@ -106,7 +106,6 @@ public class Blocks {
|
||||
try {
|
||||
Block block = (Block) field.get(targetType); // Gets the field as a BasicBlock which is then casted to an Block
|
||||
Utils.registerBlockWithItem(block); // Registers block and its item
|
||||
|
||||
if (block instanceof BasicBlock) { // Checks that the block is a BasicBlock
|
||||
if (((BasicBlock) block).isOreDict()) { // Checks that the block has an oreDict entry
|
||||
String oreDictName;
|
||||
|
@@ -105,9 +105,10 @@ public class Fluids {
|
||||
registerMelting(Blocks.OBSIDIAN, FluidRegistry.LAVA, 432);
|
||||
registerMelting(Blocks.NETHERRACK, FluidRegistry.LAVA, 48);
|
||||
registerMelting(Blocks.STONE, FluidRegistry.LAVA, 144);
|
||||
registerMelting(slaggoldOre, TinkerFluids.gold, 16);
|
||||
registerMelting(slagironOre, TinkerFluids.iron, 16);
|
||||
registerMelting(slagironIngot, TinkerFluids.iron, 24);
|
||||
registerMelting(slaggoldOre, TinkerFluids.gold, 16);
|
||||
registerMelting(slaggoldIngot, TinkerFluids.gold, 24);
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -1,12 +1,14 @@
|
||||
package com.sosnitzka.taiga;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.sosnitzka.taiga.dev.BlockHandler;
|
||||
import com.sosnitzka.taiga.proxy.CommonProxy;
|
||||
import com.sosnitzka.taiga.recipes.Crafting;
|
||||
import com.sosnitzka.taiga.recipes.Smelting;
|
||||
import com.sosnitzka.taiga.recipes.CraftingRegistry;
|
||||
import com.sosnitzka.taiga.recipes.SmeltingRegistry;
|
||||
import com.sosnitzka.taiga.util.FuelHandler;
|
||||
import com.sosnitzka.taiga.world.ZWorldGen;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.Mod.EventHandler;
|
||||
@@ -29,6 +31,9 @@ import java.util.List;
|
||||
|
||||
import static com.sosnitzka.taiga.Fluids.*;
|
||||
import static com.sosnitzka.taiga.MaterialTraits.*;
|
||||
import static com.sosnitzka.taiga.TAIGAConfiguration.attackFactorGeneral;
|
||||
import static com.sosnitzka.taiga.TAIGAConfiguration.durabilityFactorGeneral;
|
||||
import static com.sosnitzka.taiga.TAIGAConfiguration.speedFactorGeneral;
|
||||
import static slimeknights.tconstruct.library.utils.HarvestLevels.*;
|
||||
|
||||
@Mod(modid = TAIGA.MODID, version = TAIGA.VERSION, guiFactory = TAIGA.GUIFACTORY, dependencies = "required-after:tconstruct@[1.10-2.3.3,);" + "required-after:mantle@[1.10-0.10.3,)")
|
||||
@@ -45,6 +50,7 @@ public class TAIGA {
|
||||
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent e) {
|
||||
MinecraftForge.EVENT_BUS.register(new BlockHandler());
|
||||
proxy.initConfig();
|
||||
|
||||
Items.register(); // Registers items and its oreDict
|
||||
@@ -61,8 +67,8 @@ public class TAIGA {
|
||||
proxy.registerModels(); // Registers models on the client side
|
||||
GameRegistry.registerWorldGenerator(new ZWorldGen(), 100); // Generates ores
|
||||
GameRegistry.registerFuelHandler(new FuelHandler()); // Registeres fuels' burn times
|
||||
Smelting.register(); // Registers smelting recipes
|
||||
Crafting.register(); // Registers crafting recipes
|
||||
SmeltingRegistry.register(); // Registers smelting recipes
|
||||
CraftingRegistry.register(); // Registers crafting recipes
|
||||
|
||||
// Adds new harvest levels' names
|
||||
harvestLevelNames.put(METEORITE, TinkerMaterials.bone.getTextColor() + "Meteorite");
|
||||
@@ -127,42 +133,50 @@ public class TAIGA {
|
||||
* Registers materials and associated fluids and stats into tconstruct
|
||||
*/
|
||||
private void registerTinkerMaterials() {
|
||||
|
||||
double d = durabilityFactorGeneral;
|
||||
System.out.println("DURABILITY FACTOR" + d);
|
||||
float s = (float) speedFactorGeneral;
|
||||
System.out.println("SPEED FACTOR" + s);
|
||||
float a = (float) attackFactorGeneral;
|
||||
System.out.println("ATTACK FACTOR" + a);
|
||||
|
||||
// ARCANE ORES
|
||||
registerTinkerMaterial("Tiberium", tiberium, tiberiumFluid, 223, 6.2f, 8.35f, 0.63f, 50, 50, OBSIDIAN, false, true);
|
||||
registerTinkerMaterial("Rubium", rubium, rubiumFluid, 351, 5.15f, 7.00f, 1.05f, -100, 250, COBALT, false, true);
|
||||
registerTinkerMaterial("Prometheum", prometheum, prometheumFluid, 539, 3.6f, 6.60f, 0.90f, 0, 150, TITANITE, false, true);
|
||||
registerTinkerMaterial("Arcanite", arcanite, arcaniteFluid, 698, 4.3f, 7.88f, 0.85f, -50, 150, METEORITE, false, true);
|
||||
registerTinkerMaterial("Tiberium", tiberium, tiberiumFluid, (int) (223 * d), 6.2f * s, 8.35f * a, 0.63f, 50, 50, OBSIDIAN, false, true);
|
||||
registerTinkerMaterial("Rubium", rubium, rubiumFluid, (int) (351 * d), 5.15f * s, 7.00f * a, 1.05f, -100, 250, COBALT, false, true);
|
||||
registerTinkerMaterial("Prometheum", prometheum, prometheumFluid, (int) (539 * d), 3.6f * s, 6.60f, 0.90f, 0, 150, TITANITE, false, true);
|
||||
registerTinkerMaterial("Arcanite", arcanite, arcaniteFluid, (int) (698 * d), 4.3f * s, 7.88f * a, 0.85f, -50, 150, METEORITE, false, true);
|
||||
// SOLIDE ORES
|
||||
registerTinkerMaterial("Titanite", titanite, titaniteFluid, 811, 4.8f, 6.40f, 1.00f, -50, 150, TITANITE, false, true);
|
||||
registerTinkerMaterial("Meteorite", meteorite, meteoriteFluid, 823, 6.1f, 6.83f, 1.20f, -50, 200, METEORITE, false, true);
|
||||
registerTinkerMaterial("Vibranium", vibranium, vibraniumFluid, 917, 7.45f, 7.17f, 1.15f, 50, 150, VIBRANIUM, false, true);
|
||||
registerTinkerMaterial("Adamantite", adamantite, adamantiteFluid, 981, 8.9f, 9.11f, 1.20f, -200, 300, ADAMANTITE, false, true);
|
||||
registerTinkerMaterial("Titanite", titanite, titaniteFluid, (int) (811 * d), 4.8f * s, 6.40f * a, 1.00f, -50, 150, TITANITE, false, true);
|
||||
registerTinkerMaterial("Meteorite", meteorite, meteoriteFluid, (int) (823 * d), 6.1f * s, 6.83f * a, 1.20f, -50, 200, METEORITE, false, true);
|
||||
registerTinkerMaterial("Vibranium", vibranium, vibraniumFluid, (int) (917 * d), 7.45f * s, 7.17f * a, 1.15f, 50, 150, VIBRANIUM, false, true);
|
||||
registerTinkerMaterial("Adamantite", adamantite, adamantiteFluid, (int) (981 * d), 8.9f * s, 9.11f * a, 1.20f, -200, 300, ADAMANTITE, false, true);
|
||||
// ETHERE ORES
|
||||
registerTinkerMaterial("Eternite", eternite, eterniteFluid, 592, 7.35f, 1.95f, 1.10f, 150, 150, COBALT, false, true);
|
||||
registerTinkerMaterial("Mythril", mythril, mythrilFluid, 552, 8.75f, 2.87f, 0.98f, -100, 200, TITANITE, false, true);
|
||||
registerTinkerMaterial("Palladium", palladium, palladiumFluid, 578, 10.4f, 3.13f, 1.09f, 0, 100, METEORITE, false, true);
|
||||
registerTinkerMaterial("Ignitite", ignitite, ignititeFluid, 673, 12.1f, 4.10f, 1.15f, -50, 150, VIBRANIUM, false, true);
|
||||
registerTinkerMaterial("Eternite", eternite, eterniteFluid, (int) (592 * d), 7.35f * s, 1.95f * a, 1.10f, 150, 150, COBALT, false, true);
|
||||
registerTinkerMaterial("Mythril", mythril, mythrilFluid, (int) (552 * d), 8.75f * s, 2.87f * a, 0.98f, -100, 200, TITANITE, false, true);
|
||||
registerTinkerMaterial("Palladium", palladium, palladiumFluid, (int) (578 * d), 10.4f * s, 3.13f * a, 1.09f, 0, 100, METEORITE, false, true);
|
||||
registerTinkerMaterial("Ignitite", ignitite, ignititeFluid, (int) (673 * d), 12.1f * s, 4.10f * a, 1.15f, -50, 150, VIBRANIUM, false, true);
|
||||
// RATIO ORES
|
||||
registerTinkerMaterial("Bismuth", bismuth, bismuthFluid, 235, 5.33f, 3.80f, 1.15f, 17, 117, OBSIDIAN, false, true);
|
||||
registerTinkerMaterial("Violium", violium, violiumFluid, 427, 4.2f, 3.30f, 1.00f, 133, 150, COBALT, false, true);
|
||||
registerTinkerMaterial("Mindorite", mindorite, mindoriteFluid, 458, 6.41f, 4.40f, 0.90f, 83, 100, TITANITE, false, true);
|
||||
registerTinkerMaterial("Karmesine", karmesine, karmesineFluid, 627, 6.75f, 5.10f, 0.99f, 0, 200, METEORITE, false, true);
|
||||
registerTinkerMaterial("Bismuth", bismuth, bismuthFluid, (int) (235 * d), 5.33f * s, 3.80f * a, 1.15f, 17, 117, OBSIDIAN, false, true);
|
||||
registerTinkerMaterial("Violium", violium, violiumFluid, (int) (427 * d), 4.2f * s, 3.30f * a, 1.00f, 133, 150, COBALT, false, true);
|
||||
registerTinkerMaterial("Mindorite", mindorite, mindoriteFluid, (int) (458 * d), 6.41f * s, 4.40f * a, 0.90f, 83, 100, TITANITE, false, true);
|
||||
registerTinkerMaterial("Karmesine", karmesine, karmesineFluid, (int) (627 * d), 6.75f * s, 5.10f * a, 0.99f, 0, 200, METEORITE, false, true);
|
||||
// Material from alloys
|
||||
registerTinkerMaterial("Nitronite", nitronite, nitroniteFluid, 745, 6.74f, 8.74f, 0.85f, 75, 93, TITANITE, false, true);
|
||||
registerTinkerMaterial("Bysmuid", bysmuid, bysmuidFluid, 305, 5.22f, 6.47f, 1.09f, -80, 197, COBALT, false, true);
|
||||
registerTinkerMaterial("Ultranite", ultranite, ultraniteFluid, 1016, 5.72f, 6.76f, 1.02f, -120, 210, VIBRANIUM, false, true);
|
||||
registerTinkerMaterial("Astrium", astrium, astriumFluid, 670, 5.28f, 9.14f, 0.91f, -45, 170, VIBRANIUM, false, true);
|
||||
registerTinkerMaterial("Imperomite", imperomite, imperomiteFluid, 770, 11.60f, 3.57f, 1.05f, -38, 125, METEORITE, false, true);
|
||||
registerTinkerMaterial("Dyonite", dyonite, dyoniteFluid, 733, 6.14f, 7.69f, 0.97f, -15, 140, TITANITE, false, true);
|
||||
registerTinkerMaterial("Solarium", solarium, solariumFluid, 1020, 13.78f, 4.64f, 1.15f, 0, 150, ADAMANTITE, false, true);
|
||||
registerTinkerMaterial("Fractoryte", fractoryte, fractoryteFluid, 1071, 7.65f, 7.75f, 1.15f, -250, 283, METEORITE, false, true);
|
||||
registerTinkerMaterial("Aegisalt", aegisalt, aegisaltFluid, 355, 8.88f, 3.18f, 1.00f, 175, 125, TITANITE, false, true);
|
||||
registerTinkerMaterial("Noctunyx", noctunyx, noctunyxFluid, 713, 10.43f, 3.25f, 0.99f, -125, 183, METEORITE, false, true);
|
||||
registerTinkerMaterial("Nucleum", nucleum, nucleumFluid, 503, 11.30f, 3.22f, 1.05f, 100, 125, TITANITE, false, true);
|
||||
registerTinkerMaterial("Seismodium", seismodium, seismodiumFluid, 879, 13.85f, 4.19f, 1.17f, -75, 169, VIBRANIUM, false, true);
|
||||
registerTinkerMaterial("Lumixyl", lumixyl, lumixylFluid, 357, 4.64f, 5.92f, 1.05f, 15, 130, COBALT, false, true);
|
||||
registerTinkerMaterial("Terramite", terramite, terramiteFluid, 482, 7.25f, 2.85f, 1.03f, 208, 150, TITANITE, false, true);
|
||||
registerTinkerMaterial("Cryptogen", cryptogen, cryptogenFluid, 538, 5.71f, 6.93f, 0.88f, 58, 117, METEORITE, false, true);
|
||||
registerTinkerMaterial("Proxideum", proxideum, proxideumFluid, 597, 10.55f, 4.21f, 0.99f, -60, 200, METEORITE, false, true);
|
||||
registerTinkerMaterial("Nitronite", nitronite, nitroniteFluid, (int) (745 * d), 6.74f * s, 8.74f * a, 0.85f, 75, 93, TITANITE, false, true);
|
||||
registerTinkerMaterial("Bysmuid", bysmuid, bysmuidFluid, (int) (305 * d), 5.22f * s, 6.47f * a, 1.09f, -80, 197, COBALT, false, true);
|
||||
registerTinkerMaterial("Ultranite", ultranite, ultraniteFluid, (int) (1016 * d), 5.72f * s, 6.76f * a, 1.02f, -120, 210, VIBRANIUM, false, true);
|
||||
registerTinkerMaterial("Astrium", astrium, astriumFluid, (int) (670 * d), 5.28f * s, 9.14f * a, 0.91f, -45, 170, VIBRANIUM, false, true);
|
||||
registerTinkerMaterial("Imperomite", imperomite, imperomiteFluid, (int) (770 * d), 11.60f * s, 3.57f * a, 1.05f, -38, 125, METEORITE, false, true);
|
||||
registerTinkerMaterial("Dyonite", dyonite, dyoniteFluid, (int) (733 * d), 6.14f * s, 7.69f * a, 0.97f, -15, 140, TITANITE, false, true);
|
||||
registerTinkerMaterial("Solarium", solarium, solariumFluid, (int) (1020 * d), 13.78f * s, 4.64f * a, 1.15f, 0, 150, ADAMANTITE, false, true);
|
||||
registerTinkerMaterial("Fractoryte", fractoryte, fractoryteFluid, (int) (1071 * d), 7.65f * s, 7.75f * a, 1.15f, -250, 283, METEORITE, false, true);
|
||||
registerTinkerMaterial("Aegisalt", aegisalt, aegisaltFluid, (int) (355 * d), 8.88f * s, 3.18f * a, 1.00f, 175, 125, TITANITE, false, true);
|
||||
registerTinkerMaterial("Noctunyx", noctunyx, noctunyxFluid, (int) (713 * d), 10.43f * s, 3.25f * a, 0.99f, -125, 183, METEORITE, false, true);
|
||||
registerTinkerMaterial("Nucleum", nucleum, nucleumFluid, (int) (503 * d), 11.30f * s, 3.22f * a, 1.05f, 100, 125, TITANITE, false, true);
|
||||
registerTinkerMaterial("Seismodium", seismodium, seismodiumFluid, (int) (879 * d), 13.85f * s, 4.19f * a, 1.17f, -75, 169, VIBRANIUM, false, true);
|
||||
registerTinkerMaterial("Lumixyl", lumixyl, lumixylFluid, (int) (357 * d), 4.64f * s, 5.92f * a, 1.05f, 15, 130, COBALT, false, true);
|
||||
registerTinkerMaterial("Terramite", terramite, terramiteFluid, (int) (482 * d), 7.25f * s, 2.85f * a, 1.03f, 208, 150, TITANITE, false, true);
|
||||
registerTinkerMaterial("Cryptogen", cryptogen, cryptogenFluid, (int) (538 * d), 5.71f * s, 6.93f * a, 0.88f, 58, 117, METEORITE, false, true);
|
||||
registerTinkerMaterial("Proxideum", proxideum, proxideumFluid, (int) (597 * d), 10.55f * s, 4.21f * a, 0.99f, -60, 200, METEORITE, false, true);
|
||||
}
|
||||
}
|
@@ -16,7 +16,38 @@ public class TAIGAConfiguration {
|
||||
public static final String CATEGORY_NAME_GENERAL = "category_general";
|
||||
public static final String CATEGORY_NAME_ORE_GEN = "category_ore_gen";
|
||||
public static final String CATEGORY_NAME_ORE_VAL = "category_ore_val";
|
||||
public static double oreResistenceFactor;
|
||||
|
||||
public static double oreFactorGeneral;
|
||||
public static double speedFactorGeneral;
|
||||
public static double attackFactorGeneral;
|
||||
public static double durabilityFactorGeneral;
|
||||
|
||||
public static double ironFactor;
|
||||
public static double slagironFactor;
|
||||
public static double slaggoldFactor;
|
||||
public static double titaniteFactor;
|
||||
public static double adamantiteFactor;
|
||||
public static double arcaniteFactor;
|
||||
public static double violiumFactor;
|
||||
public static double bismuthFactor;
|
||||
public static double eterniteFactor;
|
||||
public static double ignititeFactor;
|
||||
public static double karmesineFactor;
|
||||
public static double meteoriteFactor;
|
||||
public static double mindoriteFactor;
|
||||
public static double mythrilFactor;
|
||||
public static double palladiumFactor;
|
||||
public static double prometheumFactor;
|
||||
public static double tiberiumFactor;
|
||||
public static double vibraniumFactor;
|
||||
public static double rubiumFactor;
|
||||
public static double basaltFactor;
|
||||
public static double rottengroundFactor;
|
||||
public static double ligniteFactor;
|
||||
|
||||
|
||||
|
||||
|
||||
public static boolean slagIronGen;
|
||||
public static boolean slagGoldGen;
|
||||
public static boolean ironGen;
|
||||
@@ -54,55 +85,291 @@ public class TAIGAConfiguration {
|
||||
config.load();
|
||||
}
|
||||
|
||||
final double RESMUT_MIN_VALUE = 0;
|
||||
final double RESMUT_MAX_VALUE = 9999;
|
||||
final double RESMUT_DEFAULT_VALUE = 1.0;
|
||||
/**
|
||||
* Declaration of general ore generation values: <br>
|
||||
* Activation of additional ores (iron/gold) <br>
|
||||
* Ore generation chance multiplier
|
||||
*/
|
||||
|
||||
Property resMultiplier = config.get(CATEGORY_NAME_ORE_GEN, "Percentage resource multiplier", RESMUT_DEFAULT_VALUE,
|
||||
"Resistance multiplier", RESMUT_MIN_VALUE, RESMUT_MAX_VALUE);
|
||||
resMultiplier.setLanguageKey("gui.taiga_configuration.res_multiplier");
|
||||
final boolean GENERATION_DEFAULT_VALUE = true;
|
||||
final double RESFAC_MIN_VALUE = 0;
|
||||
final double RESFAC_MAX_VALUE = 9999;
|
||||
final double RESFAC_DEFAULT_VALUE = 1.0;
|
||||
|
||||
|
||||
final boolean IRONGEN_DEFAULT_VALUE = true;
|
||||
final boolean SLAGIRONGEN_DEFAULT_VALUE = true;
|
||||
final boolean SLAGGOLDGEN_DEFAULT_VALUE = true;
|
||||
Property ironSwitch = config.get(CATEGORY_NAME_GENERAL, "switch_iron", IRONGEN_DEFAULT_VALUE);
|
||||
Property slagIronSwitch = config.get(CATEGORY_NAME_GENERAL, "switch_slagiron", SLAGIRONGEN_DEFAULT_VALUE);
|
||||
Property slagGoldSwitch = config.get(CATEGORY_NAME_GENERAL, "switch_slaggold", SLAGGOLDGEN_DEFAULT_VALUE);
|
||||
ironSwitch.setComment("Switch extra iron on/off");
|
||||
slagGoldSwitch.setComment("Switch slaggold on/off");
|
||||
slagIronSwitch.setComment("Switch slagiron on/off");
|
||||
ironSwitch.setLanguageKey("gui.taiga_configuration.gen_iron");
|
||||
Property slagIronSwitch = config.get(CATEGORY_NAME_GENERAL, "SlagIron Switch", GENERATION_DEFAULT_VALUE);
|
||||
slagIronSwitch.setComment("Switch ore on/off");
|
||||
slagIronSwitch.setLanguageKey("gui.taiga_configuration.gen_slagiron");
|
||||
Property slagGoldSwitch = config.get(CATEGORY_NAME_GENERAL, "SlagGold Switch", GENERATION_DEFAULT_VALUE);
|
||||
slagGoldSwitch.setComment("Switch ore on/off");
|
||||
slagGoldSwitch.setLanguageKey("gui.taiga_configuration.gen_slaggold");
|
||||
Property ironSwitch = config.get(CATEGORY_NAME_GENERAL, "Extra Iron Switch", GENERATION_DEFAULT_VALUE);
|
||||
ironSwitch.setComment("Switch ore on/off");
|
||||
ironSwitch.setLanguageKey("gui.taiga_configuration.gen_iron");
|
||||
|
||||
Property oreFactorGeneralProp = config.get(CATEGORY_NAME_GENERAL, "Ore factor", RESFAC_DEFAULT_VALUE,
|
||||
"General multiplier for all ores at once", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
oreFactorGeneralProp.setLanguageKey("gui.taiga_configuration.ore_multiplier");
|
||||
Property durabilityFactorGeneralProp = config.get(CATEGORY_NAME_GENERAL, "Durability factor", RESFAC_DEFAULT_VALUE,
|
||||
"General multiplier for all materials", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
durabilityFactorGeneralProp.setLanguageKey("gui.taiga_configuration.durability_multiplier");
|
||||
durabilityFactorGeneralProp.setRequiresMcRestart(true);
|
||||
Property speedFactorGeneralProp = config.get(CATEGORY_NAME_GENERAL, "Speed factor", RESFAC_DEFAULT_VALUE,
|
||||
"General multiplier for all materials", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
speedFactorGeneralProp.setLanguageKey("gui.taiga_configuration.speed_multiplier");
|
||||
speedFactorGeneralProp.setRequiresMcRestart(true);
|
||||
Property attackFactorGeneralProp = config.get(CATEGORY_NAME_GENERAL, "Attack factor", RESFAC_DEFAULT_VALUE,
|
||||
"General multiplier for all materials", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
attackFactorGeneralProp.setLanguageKey("gui.taiga_configuration.attack_multiplier");
|
||||
attackFactorGeneralProp.setRequiresMcRestart(true);
|
||||
|
||||
List<String> propOrderGeneral = new ArrayList<String>();
|
||||
propOrderGeneral.add(ironSwitch.getName());
|
||||
propOrderGeneral.add(slagIronSwitch.getName());
|
||||
propOrderGeneral.add(slagGoldSwitch.getName());
|
||||
propOrderGeneral.add(oreFactorGeneralProp.getName());
|
||||
propOrderGeneral.add(durabilityFactorGeneralProp.getName());
|
||||
propOrderGeneral.add(speedFactorGeneralProp.getName());
|
||||
propOrderGeneral.add(attackFactorGeneralProp.getName());
|
||||
config.setCategoryPropertyOrder(CATEGORY_NAME_GENERAL, propOrderGeneral);
|
||||
|
||||
List<String> propOrderOre = new ArrayList<String>();
|
||||
propOrderOre.add(resMultiplier.getName());
|
||||
config.setCategoryPropertyOrder(CATEGORY_NAME_ORE_GEN, propOrderOre);
|
||||
/**
|
||||
* Declaration of specific ore generation values: <br>
|
||||
* Generation chance multiplier
|
||||
*/
|
||||
Property ironFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Iron factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
ironFactorProp.setLanguageKey("gui.taiga_configuration.titanite_multiplier");
|
||||
Property slagironFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Slagiorn factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
slagironFactorProp.setLanguageKey("gui.taiga_configuration.titanite_multiplier");
|
||||
Property slaggoldFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Slaggold factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
slaggoldFactorProp.setLanguageKey("gui.taiga_configuration.titanite_multiplier");
|
||||
Property titaniteFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Titanite factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
titaniteFactorProp.setLanguageKey("gui.taiga_configuration.titanite_multiplier");
|
||||
Property adamantiteFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Adamantite factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
adamantiteFactorProp.setLanguageKey("gui.taiga_configuration.adamantite_multiplier");
|
||||
Property arcaniteFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Arcanite factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
arcaniteFactorProp.setLanguageKey("gui.taiga_configuration.arcanite_multiplier");
|
||||
Property violiumFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Violium factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
violiumFactorProp.setLanguageKey("gui.taiga_configuration.violium_multiplier");
|
||||
Property bismuthFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Bismuth factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
bismuthFactorProp.setLanguageKey("gui.taiga_configuration.bismuth_multiplier");
|
||||
Property eterniteFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Eternite factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
eterniteFactorProp.setLanguageKey("gui.taiga_configuration.eternite_multiplier");
|
||||
Property ignititeFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Ignitite factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
ignititeFactorProp.setLanguageKey("gui.taiga_configuration.ignitite_multiplier");
|
||||
Property karmesineFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Karmesine factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
karmesineFactorProp.setLanguageKey("gui.taiga_configuration.karmesine_multiplier");
|
||||
Property meteoriteFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Meteorite factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
meteoriteFactorProp.setLanguageKey("gui.taiga_configuration.meteorite_multiplier");
|
||||
Property mindoriteFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Mindorite factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
mindoriteFactorProp.setLanguageKey("gui.taiga_configuration.mindorite_multiplier");
|
||||
Property mythrilFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Mythril factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
mythrilFactorProp.setLanguageKey("gui.taiga_configuration.mythril_multiplier");
|
||||
Property palladiumFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Palladium factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
palladiumFactorProp.setLanguageKey("gui.taiga_configuration.palladium_multiplier");
|
||||
Property prometheumFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Prometheum factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
prometheumFactorProp.setLanguageKey("gui.taiga_configuration.prometheum_multiplier");
|
||||
Property tiberiumFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Tiberium factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
tiberiumFactorProp.setLanguageKey("gui.taiga_configuration.tiberium_multiplier");
|
||||
Property vibraniumFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Vibranium factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
vibraniumFactorProp.setLanguageKey("gui.taiga_configuration.vibranium_multiplier");
|
||||
Property rubiumFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Rubium factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
rubiumFactorProp.setLanguageKey("gui.taiga_configuration.rubium_multiplier");
|
||||
// RottenGround + Basalt
|
||||
Property basaltFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Basalt factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
basaltFactorProp.setLanguageKey("gui.taiga_configuration.basalt_multiplier");
|
||||
Property rottengroundFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "RottenGround factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
rottengroundFactorProp.setLanguageKey("gui.taiga_configuration.rottenground_multiplier");
|
||||
Property ligniteFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Lignite factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
ligniteFactorProp.setLanguageKey("gui.taiga_configuration.lignite_multiplier");
|
||||
|
||||
List<String> propOrderOreGen = new ArrayList<String>();
|
||||
propOrderOreGen.add(ironFactorProp.getName());
|
||||
propOrderOreGen.add(slagironFactorProp.getName());
|
||||
propOrderOreGen.add(slaggoldFactorProp.getName());
|
||||
propOrderOreGen.add(ligniteFactorProp.getName());
|
||||
propOrderOreGen.add(basaltFactorProp.getName());
|
||||
propOrderOreGen.add(rottengroundFactorProp.getName());
|
||||
propOrderOreGen.add(titaniteFactorProp.getName());
|
||||
propOrderOreGen.add(adamantiteFactorProp.getName());
|
||||
propOrderOreGen.add(arcaniteFactorProp.getName());
|
||||
propOrderOreGen.add(violiumFactorProp.getName());
|
||||
propOrderOreGen.add(bismuthFactorProp.getName());
|
||||
propOrderOreGen.add(eterniteFactorProp.getName());
|
||||
propOrderOreGen.add(ignititeFactorProp.getName());
|
||||
propOrderOreGen.add(karmesineFactorProp.getName());
|
||||
propOrderOreGen.add(meteoriteFactorProp.getName());
|
||||
propOrderOreGen.add(mindoriteFactorProp.getName());
|
||||
propOrderOreGen.add(mythrilFactorProp.getName());
|
||||
propOrderOreGen.add(palladiumFactorProp.getName());
|
||||
propOrderOreGen.add(prometheumFactorProp.getName());
|
||||
propOrderOreGen.add(tiberiumFactorProp.getName());
|
||||
propOrderOreGen.add(vibraniumFactorProp.getName());
|
||||
propOrderOreGen.add(rubiumFactorProp.getName());
|
||||
config.setCategoryPropertyOrder(CATEGORY_NAME_ORE_GEN, propOrderOreGen);
|
||||
|
||||
|
||||
List<String> propOrderOreVal = new ArrayList<String>();
|
||||
config.setCategoryPropertyOrder(CATEGORY_NAME_ORE_VAL, propOrderOreVal);
|
||||
|
||||
|
||||
if (readFieldsFromConfig) {
|
||||
oreResistenceFactor = resMultiplier.getDouble(RESMUT_DEFAULT_VALUE);
|
||||
if (oreResistenceFactor > RESMUT_MAX_VALUE || oreResistenceFactor < RESMUT_MIN_VALUE) {
|
||||
oreResistenceFactor = RESMUT_DEFAULT_VALUE;
|
||||
oreFactorGeneral = oreFactorGeneralProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (oreFactorGeneral > RESFAC_MAX_VALUE || oreFactorGeneral < RESFAC_MIN_VALUE) {
|
||||
oreFactorGeneral = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
durabilityFactorGeneral = durabilityFactorGeneralProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (durabilityFactorGeneral > RESFAC_MAX_VALUE || durabilityFactorGeneral < RESFAC_MIN_VALUE) {
|
||||
durabilityFactorGeneral = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
speedFactorGeneral = speedFactorGeneralProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (speedFactorGeneral > RESFAC_MAX_VALUE || speedFactorGeneral < RESFAC_MIN_VALUE) {
|
||||
speedFactorGeneral = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
attackFactorGeneral = attackFactorGeneralProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (attackFactorGeneral > RESFAC_MAX_VALUE || attackFactorGeneral < RESFAC_MIN_VALUE) {
|
||||
attackFactorGeneral = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
ironGen = ironSwitch.getBoolean(GENERATION_DEFAULT_VALUE);
|
||||
slagIronGen = slagIronSwitch.getBoolean(GENERATION_DEFAULT_VALUE);
|
||||
slagGoldGen = slagGoldSwitch.getBoolean(GENERATION_DEFAULT_VALUE);
|
||||
ironFactor = ironFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (ironFactor > RESFAC_MAX_VALUE || ironFactor < RESFAC_MIN_VALUE) {
|
||||
ironFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
slagironFactor = slagironFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (slagironFactor > RESFAC_MAX_VALUE || slagironFactor < RESFAC_MIN_VALUE) {
|
||||
slagironFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
slaggoldFactor = slaggoldFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (slaggoldFactor > RESFAC_MAX_VALUE || slaggoldFactor < RESFAC_MIN_VALUE) {
|
||||
slaggoldFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
titaniteFactor = titaniteFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (titaniteFactor > RESFAC_MAX_VALUE || titaniteFactor < RESFAC_MIN_VALUE) {
|
||||
titaniteFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
adamantiteFactor = adamantiteFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (adamantiteFactor > RESFAC_MAX_VALUE || adamantiteFactor < RESFAC_MIN_VALUE) {
|
||||
adamantiteFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
arcaniteFactor = arcaniteFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (arcaniteFactor > RESFAC_MAX_VALUE || arcaniteFactor < RESFAC_MIN_VALUE) {
|
||||
arcaniteFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
violiumFactor = violiumFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (violiumFactor > RESFAC_MAX_VALUE || violiumFactor < RESFAC_MIN_VALUE) {
|
||||
violiumFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
bismuthFactor = bismuthFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (bismuthFactor > RESFAC_MAX_VALUE || bismuthFactor < RESFAC_MIN_VALUE) {
|
||||
bismuthFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
eterniteFactor = eterniteFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (eterniteFactor > RESFAC_MAX_VALUE || eterniteFactor < RESFAC_MIN_VALUE) {
|
||||
eterniteFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
ignititeFactor = ignititeFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (ignititeFactor > RESFAC_MAX_VALUE || ignititeFactor < RESFAC_MIN_VALUE) {
|
||||
ignititeFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
karmesineFactor = karmesineFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (karmesineFactor > RESFAC_MAX_VALUE || karmesineFactor < RESFAC_MIN_VALUE) {
|
||||
karmesineFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
meteoriteFactor = meteoriteFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (meteoriteFactor > RESFAC_MAX_VALUE || meteoriteFactor < RESFAC_MIN_VALUE) {
|
||||
meteoriteFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
mindoriteFactor = mindoriteFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (mindoriteFactor > RESFAC_MAX_VALUE || mindoriteFactor < RESFAC_MIN_VALUE) {
|
||||
mindoriteFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
mythrilFactor = mythrilFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (mythrilFactor > RESFAC_MAX_VALUE || mythrilFactor < RESFAC_MIN_VALUE) {
|
||||
mythrilFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
palladiumFactor = palladiumFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (palladiumFactor > RESFAC_MAX_VALUE || palladiumFactor < RESFAC_MIN_VALUE) {
|
||||
palladiumFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
prometheumFactor = prometheumFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (prometheumFactor > RESFAC_MAX_VALUE || prometheumFactor < RESFAC_MIN_VALUE) {
|
||||
prometheumFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
tiberiumFactor = tiberiumFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (tiberiumFactor > RESFAC_MAX_VALUE || tiberiumFactor < RESFAC_MIN_VALUE) {
|
||||
tiberiumFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
vibraniumFactor = vibraniumFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (vibraniumFactor > RESFAC_MAX_VALUE || vibraniumFactor < RESFAC_MIN_VALUE) {
|
||||
vibraniumFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
rubiumFactor = rubiumFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (rubiumFactor > RESFAC_MAX_VALUE || rubiumFactor < RESFAC_MIN_VALUE) {
|
||||
rubiumFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
basaltFactor = basaltFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (basaltFactor > RESFAC_MAX_VALUE || basaltFactor < RESFAC_MIN_VALUE) {
|
||||
basaltFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
rottengroundFactor = rottengroundFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (rottengroundFactor > RESFAC_MAX_VALUE || rottengroundFactor < RESFAC_MIN_VALUE) {
|
||||
rottengroundFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
ligniteFactor = ligniteFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (ligniteFactor > RESFAC_MAX_VALUE || ligniteFactor < RESFAC_MIN_VALUE) {
|
||||
ligniteFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
|
||||
ironGen = ironSwitch.getBoolean(IRONGEN_DEFAULT_VALUE);
|
||||
slagIronGen = slagIronSwitch.getBoolean(SLAGIRONGEN_DEFAULT_VALUE);
|
||||
slagGoldGen = slagGoldSwitch.getBoolean(SLAGGOLDGEN_DEFAULT_VALUE);
|
||||
|
||||
}
|
||||
|
||||
resMultiplier.set(oreResistenceFactor);
|
||||
ironSwitch.set(ironGen);
|
||||
slagIronSwitch.set(slagIronGen);
|
||||
slagGoldSwitch.set(slagGoldGen);
|
||||
oreFactorGeneralProp.set(oreFactorGeneral);
|
||||
durabilityFactorGeneralProp.set(durabilityFactorGeneral);
|
||||
speedFactorGeneralProp.set(speedFactorGeneral);
|
||||
attackFactorGeneralProp.set(attackFactorGeneral);
|
||||
titaniteFactorProp.set(titaniteFactor);
|
||||
adamantiteFactorProp.set(adamantiteFactor);
|
||||
arcaniteFactorProp.set(arcaniteFactor);
|
||||
violiumFactorProp.set(violiumFactor);
|
||||
bismuthFactorProp.set(bismuthFactor);
|
||||
eterniteFactorProp.set(eterniteFactor);
|
||||
ignititeFactorProp.set(ignititeFactor);
|
||||
karmesineFactorProp.set(karmesineFactor);
|
||||
meteoriteFactorProp.set(meteoriteFactor);
|
||||
mindoriteFactorProp.set(mindoriteFactor);
|
||||
mythrilFactorProp.set(mythrilFactor);
|
||||
palladiumFactorProp.set(palladiumFactor);
|
||||
prometheumFactorProp.set(prometheumFactor);
|
||||
tiberiumFactorProp.set(tiberiumFactor);
|
||||
vibraniumFactorProp.set(vibraniumFactor);
|
||||
rubiumFactorProp.set(rubiumFactor);
|
||||
basaltFactorProp.set(basaltFactor);
|
||||
rottengroundFactorProp.set(rottengroundFactor);
|
||||
ligniteFactorProp.set(ligniteFactor);
|
||||
|
||||
if (config.hasChanged()) {
|
||||
config.save();
|
||||
|
@@ -43,9 +43,9 @@ public class TAIGAGuiFactory implements IModGuiFactory {
|
||||
|
||||
private static List<IConfigElement> getConfigElements() {
|
||||
List<IConfigElement> list = new ArrayList<IConfigElement>();
|
||||
list.add(new DummyConfigElement.DummyCategoryElement("Main Configuration", "gui.taiga_configuration.ctgy.general", CategoryEntryGeneral.class));
|
||||
list.add(new DummyConfigElement.DummyCategoryElement("Ore Generation", "gui.taiga_configuration.ctgy.oregen", CategoryEntryOreGen.class));
|
||||
list.add(new DummyConfigElement.DummyCategoryElement("Ore Values", "gui.taiga_configuration.ctgy.oreval", CategoryEntryOreVal.class));
|
||||
list.add(new DummyConfigElement.DummyCategoryElement("Basics configuration", "gui.taiga_configuration.ctgy.general", CategoryEntryGeneral.class));
|
||||
list.add(new DummyConfigElement.DummyCategoryElement("Specific ore generation", "gui.taiga_configuration.ctgy.oregen", CategoryEntryOreGen.class));
|
||||
list.add(new DummyConfigElement.DummyCategoryElement("Specific ore values", "gui.taiga_configuration.ctgy.oreval", CategoryEntryOreVal.class));
|
||||
return list;
|
||||
}
|
||||
|
||||
|
@@ -32,7 +32,7 @@ public class BlockLignite extends BasicBlock {
|
||||
@Override
|
||||
@ParametersAreNonnullByDefault
|
||||
public int quantityDropped(IBlockState state, int fortune, Random random) {
|
||||
return MathHelper.getRandomIntegerInRange(random, 1, 3 + fortune);
|
||||
return random.nextInt(3) + 1 + fortune;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -8,7 +8,7 @@ import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import static com.sosnitzka.taiga.Items.*;
|
||||
import static slimeknights.tconstruct.shared.TinkerCommons.matNecroticBone;
|
||||
|
||||
public class Crafting {
|
||||
public class CraftingRegistry {
|
||||
public static void register() {
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(fuel_brick), Items.COAL, Items.COAL, Items.COAL, lignite, lignite, lignite);
|
||||
|
@@ -1,38 +0,0 @@
|
||||
package com.sosnitzka.taiga.recipes;
|
||||
|
||||
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
|
||||
import static com.sosnitzka.taiga.Blocks.*;
|
||||
import static com.sosnitzka.taiga.Items.*;
|
||||
|
||||
public class Smelting {
|
||||
public static void register() {
|
||||
GameRegistry.addSmelting(slagironOre, new ItemStack(slagironIngot), 1.0F);
|
||||
GameRegistry.addSmelting(slaggoldOre, new ItemStack(slaggoldIngot), 1.0F);
|
||||
GameRegistry.addSmelting(slagironIngot, new ItemStack(iron_nugget), 0);
|
||||
GameRegistry.addSmelting(slaggoldIngot, new ItemStack(Items.GOLD_NUGGET), 0);
|
||||
GameRegistry.addSmelting(tiberiumOre, new ItemStack(tiberiumShardInstable, 6), (2F));
|
||||
GameRegistry.addSmelting(tiberiumShardInstable, new ItemStack(tiberiumIngot), (.1F));
|
||||
|
||||
// Removed until TiC put its own ores back in.
|
||||
/* GameRegistry.addSmelting(titaniteOre, new ItemStack(titaniteIngot), RandomUtils.nextFloat(0F, 2F));
|
||||
GameRegistry.addSmelting(arcaniteOre, new ItemStack(arcaniteIngot), RandomUtils.nextFloat(0F, 2F));
|
||||
GameRegistry.addSmelting(adamantiteOre, new ItemStack(adamantiteIngot), RandomUtils.nextFloat(0F, 2F));
|
||||
GameRegistry.addSmelting(violiumOre, new ItemStack(violiumIngot), RandomUtils.nextFloat(0F, 2F));
|
||||
GameRegistry.addSmelting(bismuthOre, new ItemStack(bismuthIngot), RandomUtils.nextFloat(0F, 2F));
|
||||
GameRegistry.addSmelting(eterniteOre, new ItemStack(eterniteIngot), RandomUtils.nextFloat(0F, 2F));
|
||||
GameRegistry.addSmelting(ignititeOre, new ItemStack(ignititeIngot), RandomUtils.nextFloat(0F, 2F));
|
||||
GameRegistry.addSmelting(karmesineOre, new ItemStack(karmesineIngot), RandomUtils.nextFloat(0F, 2F));
|
||||
GameRegistry.addSmelting(meteoriteOre, new ItemStack(meteoriteIngot), RandomUtils.nextFloat(0F, 2F));
|
||||
GameRegistry.addSmelting(mindoriteOre, new ItemStack(mindoriteIngot), RandomUtils.nextFloat(0F, 2F));
|
||||
GameRegistry.addSmelting(mythrilOre, new ItemStack(mythrilIngot), RandomUtils.nextFloat(0F, 2F));
|
||||
GameRegistry.addSmelting(palladiumOre, new ItemStack(palladiumIngot), RandomUtils.nextFloat(0F, 2F));
|
||||
GameRegistry.addSmelting(prometheumOre, new ItemStack(prometheumIngot), RandomUtils.nextFloat(0F, 2F));
|
||||
GameRegistry.addSmelting(vibraniumOre, new ItemStack(vibraniumIngot), RandomUtils.nextFloat(0F, 2F));
|
||||
GameRegistry.addSmelting(rubiumOre, new ItemStack(rubiumIngot), RandomUtils.nextFloat(0F, 2F));
|
||||
*/
|
||||
}
|
||||
}
|
@@ -0,0 +1,20 @@
|
||||
package com.sosnitzka.taiga.recipes;
|
||||
|
||||
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
|
||||
import static com.sosnitzka.taiga.Blocks.*;
|
||||
import static com.sosnitzka.taiga.Items.*;
|
||||
|
||||
public class SmeltingRegistry {
|
||||
public static void register() {
|
||||
GameRegistry.addSmelting(slagironOre, new ItemStack(slagironIngot), 1.0F);
|
||||
GameRegistry.addSmelting(slagironIngot, new ItemStack(iron_nugget), 0);
|
||||
GameRegistry.addSmelting(slaggoldIngot, new ItemStack(Items.GOLD_NUGGET), 0);
|
||||
GameRegistry.addSmelting(slaggoldOre, new ItemStack(slaggoldIngot), 1.0F);
|
||||
GameRegistry.addSmelting(tiberiumOre, new ItemStack(tiberiumShardInstable, 6), (2F));
|
||||
GameRegistry.addSmelting(tiberiumShardInstable, new ItemStack(tiberiumIngot), (.1F));
|
||||
}
|
||||
}
|
@@ -34,7 +34,7 @@ public class TraitGarishly extends AbstractTrait {
|
||||
EntityPlayer player = (EntityPlayer) event.getSource().getEntity();
|
||||
if (event.getEntity() instanceof EntityMob && TinkerUtil.hasTrait(TagUtil.getTagSafe(player.getHeldItemMainhand()), identifier)) {
|
||||
|
||||
int r = random.nextInt(5);
|
||||
int r = random.nextInt(6);
|
||||
ItemStack i = null;
|
||||
switch (r) {
|
||||
case 0:
|
||||
@@ -56,7 +56,6 @@ public class TraitGarishly extends AbstractTrait {
|
||||
i = new ItemStack(lignite, random.nextInt(3));
|
||||
break;
|
||||
}
|
||||
|
||||
assert i != null;
|
||||
event.getDrops().add(0, new EntityItem(w, event.getEntity().posX, event.getEntity().posY, event.getEntity().posZ, i));
|
||||
}
|
||||
|
@@ -18,7 +18,6 @@ import slimeknights.tconstruct.library.utils.ToolHelper;
|
||||
|
||||
|
||||
public class TraitNatureBound extends AbstractTrait {
|
||||
private static int chance = 20;
|
||||
|
||||
public TraitNatureBound() {
|
||||
super("naturebound", TextFormatting.GREEN);
|
||||
@@ -34,6 +33,7 @@ public class TraitNatureBound extends AbstractTrait {
|
||||
@Override
|
||||
public void onUpdate(ItemStack tool, World world, Entity entity, int itemSlot, boolean isSelected) {
|
||||
// *20 because 20 ticks in a second
|
||||
int chance = 20;
|
||||
if (!world.isRemote && entity instanceof EntityLivingBase && random.nextInt(30 * chance) == 0) {
|
||||
ToolHelper.healTool(tool, random.nextInt(9) + 1, (EntityLivingBase) entity);
|
||||
}
|
||||
|
@@ -11,39 +11,50 @@ import net.minecraftforge.fml.common.IWorldGenerator;
|
||||
import java.util.Random;
|
||||
|
||||
import static com.sosnitzka.taiga.Blocks.*;
|
||||
import static com.sosnitzka.taiga.TAIGAConfiguration.*;
|
||||
|
||||
public class ZWorldGen implements IWorldGenerator {
|
||||
private void nether(Random random, int x, int z, World world) {
|
||||
|
||||
Generator.generateNetherOre(titaniteOre.getDefaultState(), random, x, z, world, 35, 1, 64, 2, 12);
|
||||
Generator.generateNetherOre(tiberiumOre.getDefaultState(), random, x, z, world, 30, 1, 128, 7, 15);
|
||||
Generator.generateNetherOre(palladiumOre.getDefaultState(), random, x, z, world, 35, 32, 64, 2, 6);
|
||||
Generator.generateNetherOre(prometheumOre.getDefaultState(), random, x, z, world, 35, 64, 128, 2, 6);
|
||||
Generator.generateNetherOre(titaniteOre.getDefaultState(), random, x, z, world, (int) (35 * titaniteFactor * oreFactorGeneral), 1, 64, 2, 12);
|
||||
Generator.generateNetherOre(tiberiumOre.getDefaultState(), random, x, z, world, (int) (30 * tiberiumFactor * oreFactorGeneral), 0, 128, 2, 15);
|
||||
Generator.generateNetherOre(palladiumOre.getDefaultState(), random, x, z, world, (int) (35 * palladiumFactor * oreFactorGeneral), 32, 64, 2, 6);
|
||||
Generator.generateNetherOre(prometheumOre.getDefaultState(), random, x, z, world, (int) (35 * prometheumFactor * oreFactorGeneral), 64, 128, 2, 6);
|
||||
}
|
||||
|
||||
private void world(Random random, int x, int z, World world) {
|
||||
Generator.generateOre(slagironOre.getDefaultState(), random, x, z, world, 45, 8, 96, 5, 12);
|
||||
Generator.generateOre(slaggoldOre.getDefaultState(), random, x, z, world, 30, 8, 48, 4, 8);
|
||||
Generator.generateOre(ligniteOre.getDefaultState(), random, x, z, world, 30, 8, 96, 5, 12);
|
||||
Generator.generateOre(Blocks.IRON_ORE.getDefaultState(), random, x, z, world, 40, 8, 96, 2, 8);
|
||||
Generator.generateOre(basalt.getDefaultState(), Blocks.LAVA.getDefaultState(), random, x, z, world, 100, 8, 24, 2, 5);
|
||||
Generator.generateOre(rottenGround.getDefaultState(), Blocks.DIRT.getDefaultState(), random, x, z, world, 25, 50, 70, 2, 15);
|
||||
|
||||
Generator.generateOre(vibraniumOre.getDefaultState(), random, x, z, world, 30, 48, 64, 2, 8);
|
||||
Generator.generateOre(karmesineOre.getDefaultState(), random, x, z, world, 35, 16, 48, 2, 7);
|
||||
Generator.generateOre(bismuthOre.getDefaultState(), random, x, z, world, 60, 50, 130, 2, 4);
|
||||
Generator.generateOre(mythrilOre.getDefaultState(), random, x, z, world, 33, 16, 32, 2, 8);
|
||||
Generator.generateOre(meteoriteOre.getDefaultState(), random, x, z, world, 10, 0, 32, 2, 25);
|
||||
Generator.generateOre(mindoriteOre.getDefaultState(), Blocks.STONE.getDefaultState(), BlockStone.VARIANT, BlockStone.EnumType.DIORITE, random, x, z, world, 150, 16, 96, 2, 8);
|
||||
Generator.generateOre(arcaniteOre.getDefaultState(), Blocks.STONE.getDefaultState(), BlockStone.VARIANT, BlockStone.EnumType.GRANITE, random, x, z, world, 150, 16, 96, 2, 8);
|
||||
Generator.generateOre(eterniteOre.getDefaultState(), Blocks.STONE.getDefaultState(), BlockStone.VARIANT, BlockStone.EnumType.ANDESITE, random, x, z, world, 150, 16, 96, 2, 8);
|
||||
// Optional
|
||||
if (slagIronGen) {
|
||||
Generator.generateOre(slagironOre.getDefaultState(), random, x, z, world, (int) (45 * slagironFactor * oreFactorGeneral), 0, 128, 2, 12);
|
||||
}
|
||||
if (slagGoldGen) {
|
||||
Generator.generateOre(slaggoldOre.getDefaultState(), random, x, z, world, (int) (20 * slaggoldFactor * oreFactorGeneral), 0, 32, 2, 12);
|
||||
}
|
||||
if (ironGen) {
|
||||
Generator.generateOre(Blocks.IRON_ORE.getDefaultState(), random, x, z, world, (int) (30 * ironFactor * oreFactorGeneral), 0, 128, 1, 9);
|
||||
}
|
||||
|
||||
// to be integrated mod specific
|
||||
Generator.generateOre(basalt.getDefaultState(), Blocks.LAVA.getDefaultState(), random, x, z, world, (int) (125 * basaltFactor * oreFactorGeneral), 0, 28, 2, 4);
|
||||
Generator.generateOre(rottenGround.getDefaultState(), Blocks.DIRT.getDefaultState(), random, x, z, world, (int) (25 * rottengroundFactor * oreFactorGeneral), 50, 70, 2, 15);
|
||||
|
||||
Generator.generateOre(ligniteOre.getDefaultState(), random, x, z, world, (int) (30 * ligniteFactor * oreFactorGeneral), 8, 96, 2, 12);
|
||||
Generator.generateOre(vibraniumOre.getDefaultState(), random, x, z, world, (int) (30 * vibraniumFactor * oreFactorGeneral), 48, 64, 2, 8);
|
||||
Generator.generateOre(karmesineOre.getDefaultState(), random, x, z, world, (int) (35 * karmesineFactor * oreFactorGeneral), 16, 48, 2, 8);
|
||||
Generator.generateOre(bismuthOre.getDefaultState(), random, x, z, world, (int) (40 * bismuthFactor * oreFactorGeneral), 50, 130, 2, 4);
|
||||
Generator.generateOre(mythrilOre.getDefaultState(), random, x, z, world, (int) (34 * mythrilFactor * oreFactorGeneral), 16, 32, 2, 8);
|
||||
Generator.generateOre(meteoriteOre.getDefaultState(), random, x, z, world, (int) (10 * meteoriteFactor * oreFactorGeneral), 0, 32, 2, 25);
|
||||
Generator.generateOre(mindoriteOre.getDefaultState(), Blocks.STONE.getDefaultState(), BlockStone.VARIANT, BlockStone.EnumType.DIORITE, random, x, z, world, (int) (120 * mindoriteFactor * oreFactorGeneral), 16, 96, 2, 8);
|
||||
Generator.generateOre(arcaniteOre.getDefaultState(), Blocks.STONE.getDefaultState(), BlockStone.VARIANT, BlockStone.EnumType.GRANITE, random, x, z, world, (int) (120 * arcaniteFactor * oreFactorGeneral), 16, 96, 2, 8);
|
||||
Generator.generateOre(eterniteOre.getDefaultState(), Blocks.STONE.getDefaultState(), BlockStone.VARIANT, BlockStone.EnumType.ANDESITE, random, x, z, world, (int) (120 * eterniteFactor * oreFactorGeneral), 16, 96, 2, 8);
|
||||
}
|
||||
|
||||
private void end(Random random, int x, int z, World world) {
|
||||
Generator.generateEndOre(adamantiteOre.getDefaultState(), random, x, z, world, 15, 10, 35, 2, 8);
|
||||
Generator.generateEndOre(rubiumOre.getDefaultState(), random, x, z, world, 15, 10, 65, 2, 8);
|
||||
Generator.generateEndOre(ignititeOre.getDefaultState(), random, x, z, world, 15, 10, 45, 2, 8);
|
||||
Generator.generateEndOre(violiumOre.getDefaultState(), random, x, z, world, 15, 10, 55, 2, 8);
|
||||
Generator.generateEndOre(adamantiteOre.getDefaultState(), random, x, z, world, (int) (15 * adamantiteFactor * oreFactorGeneral), 10, 35, 2, 8);
|
||||
Generator.generateEndOre(rubiumOre.getDefaultState(), random, x, z, world, (int) (15 * rubiumFactor * oreFactorGeneral), 10, 65, 2, 8);
|
||||
Generator.generateEndOre(ignititeOre.getDefaultState(), random, x, z, world, (int) (15 * ignititeFactor * oreFactorGeneral), 10, 45, 2, 8);
|
||||
Generator.generateEndOre(violiumOre.getDefaultState(), random, x, z, world, (int) (15 * violiumFactor * oreFactorGeneral), 10, 55, 2, 8);
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user