mirror of
https://github.com/turbodiesel4598/NuclearCraft
synced 2025-12-26 07:04:41 +01:00
Compare commits
6 Commits
a49c75bce0
...
ae14a76fc2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae14a76fc2 | ||
|
|
0e6e61222e | ||
|
|
f32cb65e64 | ||
|
|
c080f76c74 | ||
|
|
ce77c7b9bb | ||
|
|
c71569241f |
@ -3,8 +3,8 @@
|
||||
|
||||
All recipes involve five sets of information - item inputs, fluid inputs, item outputs, fluid outputs and extra info. The
|
||||
first four are clearly the ingredients and products involved in the recipe, and the extra info contains data such as
|
||||
processing time and power for machines, the base depletion time, heat gen, efficiency, criticality, and radiation level
|
||||
of solid fission fuels, etc.
|
||||
processing time and power for machines, the base depletion time, heat gen, efficiency, criticality factor, decay heat
|
||||
factor, and radiation level of solid fission fuels, etc.
|
||||
|
||||
All parts of the recipe are simply listed in the method - the internal NC code will deal with splitting it up into those
|
||||
five categories and packaging the information up into a recipe.
|
||||
@ -328,7 +328,7 @@ mods.nuclearcraft.FissionIrradiator.removeRecipeWithOutput(IIngredient itemOutpu
|
||||
Pebble Bed Fission:
|
||||
-------------------
|
||||
|
||||
mods.nuclearcraft.PebbleFission.addRecipe(IIngredient itemInput, IIngredient itemOutput, int time, int heat, double efficiency, int criticality, boolean selfPriming, double radiation);
|
||||
mods.nuclearcraft.PebbleFission.addRecipe(IIngredient itemInput, IIngredient itemOutput, int time, int heat, double efficiency, int criticality, double decayFactor, boolean selfPriming, double radiation);
|
||||
|
||||
mods.nuclearcraft.PebbleFission.removeRecipeWithInput(IIngredient itemInput);
|
||||
mods.nuclearcraft.PebbleFission.removeRecipeWithOutput(IIngredient itemOutput);
|
||||
@ -337,7 +337,7 @@ mods.nuclearcraft.PebbleFission.removeRecipeWithOutput(IIngredient itemOutput);
|
||||
Solid Fuel Fission:
|
||||
-------------------
|
||||
|
||||
mods.nuclearcraft.SolidFission.addRecipe(IIngredient itemInput, IIngredient itemOutput, int time, int heat, double efficiency, int criticality, boolean selfPriming, double radiation);
|
||||
mods.nuclearcraft.SolidFission.addRecipe(IIngredient itemInput, IIngredient itemOutput, int time, int heat, double efficiency, int criticality, double decayFactor, boolean selfPriming, double radiation);
|
||||
|
||||
mods.nuclearcraft.SolidFission.removeRecipeWithInput(IIngredient itemInput);
|
||||
mods.nuclearcraft.SolidFission.removeRecipeWithOutput(IIngredient itemOutput);
|
||||
@ -355,7 +355,7 @@ mods.nuclearcraft.FissionHeating.removeRecipeWithOutput(ILiquidStack fluidOutput
|
||||
Molten Salt Fission:
|
||||
--------------------
|
||||
|
||||
mods.nuclearcraft.SaltFission.addRecipe(ILiquidStack fluidInput, ILiquidStack fluidOutput, double time, int heat, double efficiency, int criticality, boolean selfPriming, double radiation);
|
||||
mods.nuclearcraft.SaltFission.addRecipe(ILiquidStack fluidInput, ILiquidStack fluidOutput, double time, int heat, double efficiency, int criticality, double decayFactor, boolean selfPriming, double radiation);
|
||||
|
||||
mods.nuclearcraft.SaltFission.removeRecipeWithInput(ILiquidStack fluidInput);
|
||||
mods.nuclearcraft.SaltFission.removeRecipeWithOutput(ILiquidStack fluidOutput);
|
||||
@ -491,7 +491,7 @@ get the Solid Fuel Fission recipe handler, use `mods.nuclearcraft.SolidFission.g
|
||||
Recipe Handler Methods:
|
||||
-----------------------
|
||||
|
||||
RecipeHandler::getRecipeName();
|
||||
RecipeHandler::getName();
|
||||
RecipeHandler::getRecipeList();
|
||||
|
||||
RecipeHandler::getItemInputSize();
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
mc_version=1.12.2
|
||||
forge_version=14.23.5.2847
|
||||
mapping_version=stable_39
|
||||
mod_version=2o.4.7
|
||||
mod_version=2o.5.0beta2
|
||||
|
||||
ic2_version=2.8.197-ex112
|
||||
jei_version=4.15.0.293
|
||||
|
||||
@ -9,7 +9,7 @@ import com.google.common.collect.Lists;
|
||||
import nc.enumm.*;
|
||||
import nc.multiblock.turbine.TurbineDynamoCoilType;
|
||||
import nc.radiation.RadiationHelper;
|
||||
import nc.recipe.ProcessorRecipe;
|
||||
import nc.recipe.BasicRecipe;
|
||||
import nc.util.*;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
|
||||
@ -17,8 +17,14 @@ public class NCInfo {
|
||||
|
||||
// Fission Fuel
|
||||
|
||||
public static String[] fissionFuelInfo(ProcessorRecipe fuelInfo) {
|
||||
List<String> list = Lists.newArrayList(Lang.localise("info." + Global.MOD_ID + ".fission_fuel.desc"), Lang.localise("info." + Global.MOD_ID + ".fission_fuel.base_time.desc", UnitHelper.applyTimeUnit(fuelInfo.getFissionFuelTime() * fission_fuel_time_multiplier, 3)), Lang.localise("info." + Global.MOD_ID + ".fission_fuel.base_heat.desc", UnitHelper.prefix(fuelInfo.getFissionFuelHeat(), 5, "H/t")), Lang.localise("info." + Global.MOD_ID + ".fission_fuel.base_efficiency.desc", Math.round(100D * fuelInfo.getFissionFuelEfficiency()) + "%"), Lang.localise("info." + Global.MOD_ID + ".fission_fuel.criticality.desc", fuelInfo.getFissionFuelCriticality() + " N/t"));
|
||||
public static String[] fissionFuelInfo(BasicRecipe fuelInfo) {
|
||||
List<String> list = Lists.newArrayList(
|
||||
Lang.localise("info." + Global.MOD_ID + ".fission_fuel.desc"),
|
||||
Lang.localise("info." + Global.MOD_ID + ".fission_fuel.base_time.desc", UnitHelper.applyTimeUnit(fuelInfo.getFissionFuelTime() * fission_fuel_time_multiplier, 3)),
|
||||
Lang.localise("info." + Global.MOD_ID + ".fission_fuel.base_heat.desc", UnitHelper.prefix(fuelInfo.getFissionFuelHeat(), 5, "H/t")),
|
||||
Lang.localise("info." + Global.MOD_ID + ".fission_fuel.base_efficiency.desc", NCMath.pcDecimalPlaces(fuelInfo.getFissionFuelEfficiency(), 1)),
|
||||
Lang.localise("info." + Global.MOD_ID + ".fission_fuel.criticality.desc", fuelInfo.getFissionFuelCriticality() + " N/t"),
|
||||
Lang.localise("info." + Global.MOD_ID + ".fission_fuel.decay_factor.desc", NCMath.pcDecimalPlaces(fuelInfo.getFissionFuelDecayFactor(), 1)));
|
||||
if (fuelInfo.getFissionFuelSelfPriming()) {
|
||||
list.add(Lang.localise("info." + Global.MOD_ID + ".fission_fuel.self_priming.desc"));
|
||||
}
|
||||
@ -61,7 +67,7 @@ public class NCInfo {
|
||||
MetaEnums.NeutronSourceType[] values = MetaEnums.NeutronSourceType.values();
|
||||
String[][] info = new String[values.length][];
|
||||
for (int i = 0; i < values.length; i++) {
|
||||
info[i] = new String[] {Lang.localise("info." + Global.MOD_ID + ".fission_source.efficiency.fixd", Math.round(100D * values[i].getEfficiency()) + "%"),};
|
||||
info[i] = new String[] {Lang.localise("info." + Global.MOD_ID + ".fission_source.efficiency.fixd", NCMath.pcDecimalPlaces(values[i].getEfficiency(), 1)),};
|
||||
}
|
||||
return info;
|
||||
}
|
||||
@ -81,7 +87,10 @@ public class NCInfo {
|
||||
MetaEnums.NeutronShieldType[] values = MetaEnums.NeutronShieldType.values();
|
||||
String[][] info = new String[values.length][];
|
||||
for (int i = 0; i < values.length; i++) {
|
||||
info[i] = new String[] {Lang.localise("info." + Global.MOD_ID + ".fission_shield.heat_per_flux.fixd", UnitHelper.prefix(values[i].getHeatPerFlux(), 5, "H/t/N")), Lang.localise("info." + Global.MOD_ID + ".fission_shield.efficiency.fixd", Math.round(100D * values[i].getEfficiency()) + "%"),};
|
||||
info[i] = new String[] {
|
||||
Lang.localise("info." + Global.MOD_ID + ".fission_shield.heat_per_flux.fixd", UnitHelper.prefix(values[i].getHeatPerFlux(), 5, "H/t/N")),
|
||||
Lang.localise("info." + Global.MOD_ID + ".fission_shield.efficiency.fixd", NCMath.pcDecimalPlaces(values[i].getEfficiency(), 1))
|
||||
};
|
||||
}
|
||||
return info;
|
||||
}
|
||||
@ -97,8 +106,12 @@ public class NCInfo {
|
||||
|
||||
// Fission Moderators
|
||||
|
||||
public static String[] fissionModeratorFixedInfo(ProcessorRecipe moderatorInfo) {
|
||||
return new String[] {Lang.localise("info." + Global.MOD_ID + ".moderator.fixd"), Lang.localise("info." + Global.MOD_ID + ".moderator.flux_factor.fixd", moderatorInfo.getFissionModeratorFluxFactor() + " N/t"), Lang.localise("info." + Global.MOD_ID + ".moderator.efficiency.fixd", Math.round(100D * moderatorInfo.getFissionModeratorEfficiency()) + "%")};
|
||||
public static String[] fissionModeratorFixedInfo(BasicRecipe moderatorInfo) {
|
||||
return new String[] {
|
||||
Lang.localise("info." + Global.MOD_ID + ".moderator.fixd"),
|
||||
Lang.localise("info." + Global.MOD_ID + ".moderator.flux_factor.fixd", moderatorInfo.getFissionModeratorFluxFactor() + " N/t"),
|
||||
Lang.localise("info." + Global.MOD_ID + ".moderator.efficiency.fixd", NCMath.pcDecimalPlaces(moderatorInfo.getFissionModeratorEfficiency(), 1))
|
||||
};
|
||||
}
|
||||
|
||||
public static String[] fissionModeratorInfo() {
|
||||
@ -107,8 +120,12 @@ public class NCInfo {
|
||||
|
||||
// Fission Reflectors
|
||||
|
||||
public static String[] fissionReflectorFixedInfo(ProcessorRecipe reflectorInfo) {
|
||||
return new String[] {Lang.localise("info." + Global.MOD_ID + ".reflector.fixd"), Lang.localise("info." + Global.MOD_ID + ".reflector.reflectivity.fixd", Math.round(100D * reflectorInfo.getFissionReflectorReflectivity()) + "%"), Lang.localise("info." + Global.MOD_ID + ".reflector.efficiency.fixd", Math.round(100D * reflectorInfo.getFissionReflectorEfficiency()) + "%")};
|
||||
public static String[] fissionReflectorFixedInfo(BasicRecipe reflectorInfo) {
|
||||
return new String[] {
|
||||
Lang.localise("info." + Global.MOD_ID + ".reflector.fixd"),
|
||||
Lang.localise("info." + Global.MOD_ID + ".reflector.reflectivity.fixd", NCMath.pcDecimalPlaces(reflectorInfo.getFissionReflectorReflectivity(), 1)),
|
||||
Lang.localise("info." + Global.MOD_ID + ".reflector.efficiency.fixd", NCMath.pcDecimalPlaces(reflectorInfo.getFissionReflectorEfficiency(), 1))
|
||||
};
|
||||
}
|
||||
|
||||
public static String[] fissionReflectorInfo() {
|
||||
@ -119,7 +136,6 @@ public class NCInfo {
|
||||
|
||||
public static String[][] dynamoCoilFixedInfo() {
|
||||
String[][] info = new String[TurbineDynamoCoilType.values().length][];
|
||||
info[0] = new String[] {};
|
||||
for (int i = 0; i < TurbineDynamoCoilType.values().length; i++) {
|
||||
info[i] = new String[] {coilConductivityString(i)};
|
||||
}
|
||||
@ -127,7 +143,7 @@ public class NCInfo {
|
||||
}
|
||||
|
||||
private static String coilConductivityString(int meta) {
|
||||
return Lang.localise("tile." + Global.MOD_ID + ".turbine_dynamo_coil.conductivity") + " " + NCMath.decimalPlaces(100D * TurbineDynamoCoilType.values()[meta].getConductivity(), 1) + "%";
|
||||
return Lang.localise("tile." + Global.MOD_ID + ".turbine_dynamo_coil.conductivity") + " " + NCMath.pcDecimalPlaces(TurbineDynamoCoilType.values()[meta].getConductivity(), 1);
|
||||
}
|
||||
|
||||
// Speed Upgrade
|
||||
|
||||
@ -75,6 +75,5 @@ public class BlockProcessor extends BlockSidedTile implements IActivatable, ITil
|
||||
}
|
||||
BlockHelper.spawnParticleOnProcessor(state, world, pos, rand, state.getValue(FACING_HORIZONTAL), type.getParticle1());
|
||||
BlockHelper.spawnParticleOnProcessor(state, world, pos, rand, state.getValue(FACING_HORIZONTAL), type.getParticle2());
|
||||
BlockHelper.playSoundOnProcessor(world, pos, rand, type.getSound());
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@ import nc.block.tile.BlockSimpleTile;
|
||||
import nc.enumm.BlockEnums.SimpleTileType;
|
||||
import nc.radiation.RadiationHelper;
|
||||
import nc.tile.radiation.TileRadiationScrubber;
|
||||
import nc.util.Lang;
|
||||
import nc.util.*;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@ -33,7 +33,7 @@ public class BlockScrubber extends BlockSimpleTile {
|
||||
TileRadiationScrubber scrubber = (TileRadiationScrubber) tile;
|
||||
scrubber.checkRadiationEnvironmentInfo();
|
||||
double radRemoval = scrubber.getRawScrubberRate();
|
||||
player.sendMessage(new TextComponentString(Lang.localise("message.nuclearcraft.scrubber_removal_rate") + " " + (Math.abs(radRemoval) < radiation_lowest_rate ? "0 Rad/t" : RadiationHelper.radsPrefix(radRemoval, true)) + " [" + Math.abs(Math.round(100D * scrubber.getRadiationContributionFraction() / TileRadiationScrubber.getMaxScrubberFraction())) + "%]"));
|
||||
player.sendMessage(new TextComponentString(Lang.localise("message.nuclearcraft.scrubber_removal_rate") + " " + (Math.abs(radRemoval) < radiation_lowest_rate ? "0 Rad/t" : RadiationHelper.radsPrefix(radRemoval, true)) + " [" + NCMath.pcDecimalPlaces(Math.abs(scrubber.getRadiationContributionFraction() / TileRadiationScrubber.getMaxScrubberFraction()), 1) + "]"));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package nc.config;
|
||||
|
||||
import static nc.util.CollectionHelper.arrayCopies;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.*;
|
||||
|
||||
@ -10,7 +12,7 @@ import nc.multiblock.turbine.TurbinePlacement;
|
||||
import nc.network.PacketHandler;
|
||||
import nc.network.config.ConfigUpdatePacket;
|
||||
import nc.radiation.RadSources;
|
||||
import nc.recipe.ProcessorRecipeHandler;
|
||||
import nc.recipe.BasicRecipeHandler;
|
||||
import nc.util.*;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
@ -117,6 +119,7 @@ public class NCConfig {
|
||||
public static int[] fission_thorium_heat_generation;
|
||||
public static double[] fission_thorium_efficiency;
|
||||
public static int[] fission_thorium_criticality;
|
||||
public static double[] fission_thorium_decay_factor;
|
||||
public static boolean[] fission_thorium_self_priming;
|
||||
public static double[] fission_thorium_radiation;
|
||||
|
||||
@ -124,6 +127,7 @@ public class NCConfig {
|
||||
public static int[] fission_uranium_heat_generation;
|
||||
public static double[] fission_uranium_efficiency;
|
||||
public static int[] fission_uranium_criticality;
|
||||
public static double[] fission_uranium_decay_factor;
|
||||
public static boolean[] fission_uranium_self_priming;
|
||||
public static double[] fission_uranium_radiation;
|
||||
|
||||
@ -131,6 +135,7 @@ public class NCConfig {
|
||||
public static int[] fission_neptunium_heat_generation;
|
||||
public static double[] fission_neptunium_efficiency;
|
||||
public static int[] fission_neptunium_criticality;
|
||||
public static double[] fission_neptunium_decay_factor;
|
||||
public static boolean[] fission_neptunium_self_priming;
|
||||
public static double[] fission_neptunium_radiation;
|
||||
|
||||
@ -138,6 +143,7 @@ public class NCConfig {
|
||||
public static int[] fission_plutonium_heat_generation;
|
||||
public static double[] fission_plutonium_efficiency;
|
||||
public static int[] fission_plutonium_criticality;
|
||||
public static double[] fission_plutonium_decay_factor;
|
||||
public static boolean[] fission_plutonium_self_priming;
|
||||
public static double[] fission_plutonium_radiation;
|
||||
|
||||
@ -145,6 +151,7 @@ public class NCConfig {
|
||||
public static int[] fission_mixed_heat_generation;
|
||||
public static double[] fission_mixed_efficiency;
|
||||
public static int[] fission_mixed_criticality;
|
||||
public static double[] fission_mixed_decay_factor;
|
||||
public static boolean[] fission_mixed_self_priming;
|
||||
public static double[] fission_mixed_radiation;
|
||||
|
||||
@ -152,6 +159,7 @@ public class NCConfig {
|
||||
public static int[] fission_americium_heat_generation;
|
||||
public static double[] fission_americium_efficiency;
|
||||
public static int[] fission_americium_criticality;
|
||||
public static double[] fission_americium_decay_factor;
|
||||
public static boolean[] fission_americium_self_priming;
|
||||
public static double[] fission_americium_radiation;
|
||||
|
||||
@ -159,6 +167,7 @@ public class NCConfig {
|
||||
public static int[] fission_curium_heat_generation;
|
||||
public static double[] fission_curium_efficiency;
|
||||
public static int[] fission_curium_criticality;
|
||||
public static double[] fission_curium_decay_factor;
|
||||
public static boolean[] fission_curium_self_priming;
|
||||
public static double[] fission_curium_radiation;
|
||||
|
||||
@ -166,6 +175,7 @@ public class NCConfig {
|
||||
public static int[] fission_berkelium_heat_generation;
|
||||
public static double[] fission_berkelium_efficiency;
|
||||
public static int[] fission_berkelium_criticality;
|
||||
public static double[] fission_berkelium_decay_factor;
|
||||
public static boolean[] fission_berkelium_self_priming;
|
||||
public static double[] fission_berkelium_radiation;
|
||||
|
||||
@ -173,6 +183,7 @@ public class NCConfig {
|
||||
public static int[] fission_californium_heat_generation;
|
||||
public static double[] fission_californium_efficiency;
|
||||
public static int[] fission_californium_criticality;
|
||||
public static double[] fission_californium_decay_factor;
|
||||
public static boolean[] fission_californium_self_priming;
|
||||
public static double[] fission_californium_radiation;
|
||||
|
||||
@ -255,7 +266,7 @@ public class NCConfig {
|
||||
|
||||
public static String[] radiation_worlds;
|
||||
public static String[] radiation_biomes;
|
||||
public static String[] radiation_structures;
|
||||
public static String[] radiation_structures; // Mineshaft, Village, Fortress, Stronghold, Temple, Monument, EndCity, Mansion
|
||||
public static String[] radiation_world_limits;
|
||||
public static String[] radiation_biome_limits;
|
||||
public static int[] radiation_from_biomes_dims_blacklist;
|
||||
@ -558,6 +569,8 @@ public class NCConfig {
|
||||
propertyFissionThoriumEfficiency.setLanguageKey("gui.nc.config.fission_thorium_efficiency");
|
||||
Property propertyFissionThoriumCriticality = config.get(CATEGORY_FISSION, "fission_thorium_criticality", new int[] {199, 234, 293, 199, 234}, Lang.localise("gui.nc.config.fission_thorium_criticality.comment"), 0, 32767);
|
||||
propertyFissionThoriumCriticality.setLanguageKey("gui.nc.config.fission_thorium_criticality");
|
||||
Property propertyFissionThoriumDecayFactor = config.get(CATEGORY_FISSION, "fission_thorium_decay_factor", arrayCopies(5, 0.04D), Lang.localise("gui.nc.config.fission_thorium_decay_factor.comment"), 0D, 1D);
|
||||
propertyFissionThoriumDecayFactor.setLanguageKey("gui.nc.config.fission_thorium_decay_factor");
|
||||
Property propertyFissionThoriumSelfPriming = config.get(CATEGORY_FISSION, "fission_thorium_self_priming", new boolean[] {false, false, false, false, false}, Lang.localise("gui.nc.config.fission_thorium_self_priming.comment"));
|
||||
propertyFissionThoriumSelfPriming.setLanguageKey("gui.nc.config.fission_thorium_self_priming");
|
||||
Property propertyFissionThoriumRadiation = config.get(CATEGORY_FISSION, "fission_thorium_radiation", new double[] {RadSources.TBU_FISSION, RadSources.TBU_FISSION, RadSources.TBU_FISSION, RadSources.TBU_FISSION, RadSources.TBU_FISSION}, Lang.localise("gui.nc.config.fission_thorium_radiation.comment"), 0D, 1000D);
|
||||
@ -571,6 +584,8 @@ public class NCConfig {
|
||||
propertyFissionUraniumEfficiency.setLanguageKey("gui.nc.config.fission_uranium_efficiency");
|
||||
Property propertyFissionUraniumCriticality = config.get(CATEGORY_FISSION, "fission_uranium_criticality", new int[] {66, 78, 98, 66, 78, 66 / 2, 78 / 2, 98 / 2, 66 / 2, 78 / 2, 87, 102, 128, 87, 102, 87 / 2, 102 / 2, 128 / 2, 87 / 2, 102 / 2}, Lang.localise("gui.nc.config.fission_uranium_criticality.comment"), 0, 32767);
|
||||
propertyFissionUraniumCriticality.setLanguageKey("gui.nc.config.fission_uranium_criticality");
|
||||
Property propertyFissionUraniumDecayFactor = config.get(CATEGORY_FISSION, "fission_uranium_decay_factor", arrayCopies(20, 0.065D), Lang.localise("gui.nc.config.fission_uranium_decay_factor.comment"), 0D, 1D);
|
||||
propertyFissionUraniumDecayFactor.setLanguageKey("gui.nc.config.fission_uranium_decay_factor");
|
||||
Property propertyFissionUraniumSelfPriming = config.get(CATEGORY_FISSION, "fission_uranium_self_priming", new boolean[] {false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, Lang.localise("gui.nc.config.fission_uranium_self_priming.comment"));
|
||||
propertyFissionUraniumSelfPriming.setLanguageKey("gui.nc.config.fission_uranium_self_priming");
|
||||
Property propertyFissionUraniumRadiation = config.get(CATEGORY_FISSION, "fission_uranium_radiation", new double[] {RadSources.LEU_233_FISSION, RadSources.LEU_233_FISSION, RadSources.LEU_233_FISSION, RadSources.LEU_233_FISSION, RadSources.LEU_233_FISSION, RadSources.HEU_233_FISSION, RadSources.HEU_233_FISSION, RadSources.HEU_233_FISSION, RadSources.HEU_233_FISSION, RadSources.HEU_233_FISSION, RadSources.LEU_235_FISSION, RadSources.LEU_235_FISSION, RadSources.LEU_235_FISSION, RadSources.LEU_235_FISSION, RadSources.LEU_235_FISSION, RadSources.HEU_235_FISSION, RadSources.HEU_235_FISSION, RadSources.HEU_235_FISSION, RadSources.HEU_235_FISSION, RadSources.HEU_235_FISSION}, Lang.localise("gui.nc.config.fission_uranium_radiation.comment"), 0D, 1000D);
|
||||
@ -584,6 +599,8 @@ public class NCConfig {
|
||||
propertyFissionNeptuniumEfficiency.setLanguageKey("gui.nc.config.fission_neptunium_efficiency");
|
||||
Property propertyFissionNeptuniumCriticality = config.get(CATEGORY_FISSION, "fission_neptunium_criticality", new int[] {60, 70, 88, 60, 70, 60 / 2, 70 / 2, 88 / 2, 60 / 2, 70 / 2}, Lang.localise("gui.nc.config.fission_neptunium_criticality.comment"), 0, 32767);
|
||||
propertyFissionNeptuniumCriticality.setLanguageKey("gui.nc.config.fission_neptunium_criticality");
|
||||
Property propertyFissionNeptuniumDecayFactor = config.get(CATEGORY_FISSION, "fission_neptunium_decay_factor", arrayCopies(10, 0.07D), Lang.localise("gui.nc.config.fission_neptunium_decay_factor.comment"), 0D, 1D);
|
||||
propertyFissionNeptuniumDecayFactor.setLanguageKey("gui.nc.config.fission_neptunium_decay_factor");
|
||||
Property propertyFissionNeptuniumSelfPriming = config.get(CATEGORY_FISSION, "fission_neptunium_self_priming", new boolean[] {false, false, false, false, false, false, false, false, false, false}, Lang.localise("gui.nc.config.fission_neptunium_self_priming.comment"));
|
||||
propertyFissionNeptuniumSelfPriming.setLanguageKey("gui.nc.config.fission_neptunium_self_priming");
|
||||
Property propertyFissionNeptuniumRadiation = config.get(CATEGORY_FISSION, "fission_neptunium_radiation", new double[] {RadSources.LEN_236_FISSION, RadSources.LEN_236_FISSION, RadSources.LEN_236_FISSION, RadSources.LEN_236_FISSION, RadSources.LEN_236_FISSION, RadSources.HEN_236_FISSION, RadSources.HEN_236_FISSION, RadSources.HEN_236_FISSION, RadSources.HEN_236_FISSION, RadSources.HEN_236_FISSION}, Lang.localise("gui.nc.config.fission_neptunium_radiation.comment"), 0D, 1000D);
|
||||
@ -597,6 +614,8 @@ public class NCConfig {
|
||||
propertyFissionPlutoniumEfficiency.setLanguageKey("gui.nc.config.fission_plutonium_efficiency");
|
||||
Property propertyFissionPlutoniumCriticality = config.get(CATEGORY_FISSION, "fission_plutonium_criticality", new int[] {84, 99, 124, 84, 99, 84 / 2, 99 / 2, 124 / 2, 84 / 2, 99 / 2, 71, 84, 105, 71, 84, 71 / 2, 84 / 2, 105 / 2, 71 / 2, 84 / 2}, Lang.localise("gui.nc.config.fission_plutonium_criticality.comment"), 0, 32767);
|
||||
propertyFissionPlutoniumCriticality.setLanguageKey("gui.nc.config.fission_plutonium_criticality");
|
||||
Property propertyFissionPlutoniumDecayFactor = config.get(CATEGORY_FISSION, "fission_plutonium_decay_factor", arrayCopies(20, 0.075D), Lang.localise("gui.nc.config.fission_plutonium_decay_factor.comment"), 0D, 1D);
|
||||
propertyFissionPlutoniumDecayFactor.setLanguageKey("gui.nc.config.fission_plutonium_decay_factor");
|
||||
Property propertyFissionPlutoniumSelfPriming = config.get(CATEGORY_FISSION, "fission_plutonium_self_priming", new boolean[] {false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, Lang.localise("gui.nc.config.fission_plutonium_self_priming.comment"));
|
||||
propertyFissionPlutoniumSelfPriming.setLanguageKey("gui.nc.config.fission_plutonium_self_priming");
|
||||
Property propertyFissionPlutoniumRadiation = config.get(CATEGORY_FISSION, "fission_plutonium_radiation", new double[] {RadSources.LEP_239_FISSION, RadSources.LEP_239_FISSION, RadSources.LEP_239_FISSION, RadSources.LEP_239_FISSION, RadSources.LEP_239_FISSION, RadSources.HEP_239_FISSION, RadSources.HEP_239_FISSION, RadSources.HEP_239_FISSION, RadSources.HEP_239_FISSION, RadSources.HEP_239_FISSION, RadSources.LEP_241_FISSION, RadSources.LEP_241_FISSION, RadSources.LEP_241_FISSION, RadSources.LEP_241_FISSION, RadSources.LEP_241_FISSION, RadSources.HEP_241_FISSION, RadSources.HEP_241_FISSION, RadSources.HEP_241_FISSION, RadSources.HEP_241_FISSION, RadSources.HEP_241_FISSION}, Lang.localise("gui.nc.config.fission_plutonium_radiation.comment"), 0D, 1000D);
|
||||
@ -610,6 +629,8 @@ public class NCConfig {
|
||||
propertyFissionMixedEfficiency.setLanguageKey("gui.nc.config.fission_mixed_efficiency");
|
||||
Property propertyFissionMixedCriticality = config.get(CATEGORY_FISSION, "fission_mixed_criticality", new int[] {80, 94, 118, 80, 94, 68, 80, 100, 68, 80}, Lang.localise("gui.nc.config.fission_mixed_criticality.comment"), 0, 32767);
|
||||
propertyFissionMixedCriticality.setLanguageKey("gui.nc.config.fission_mixed_criticality");
|
||||
Property propertyFissionMixedDecayFactor = config.get(CATEGORY_FISSION, "fission_mixed_decay_factor", arrayCopies(10, 0.075D), Lang.localise("gui.nc.config.fission_mixed_decay_factor.comment"), 0D, 1D);
|
||||
propertyFissionMixedDecayFactor.setLanguageKey("gui.nc.config.fission_mixed_decay_factor");
|
||||
Property propertyFissionMixedSelfPriming = config.get(CATEGORY_FISSION, "fission_mixed_self_priming", new boolean[] {false, false, false, false, false, false, false, false, false, false}, Lang.localise("gui.nc.config.fission_mixed_self_priming.comment"));
|
||||
propertyFissionMixedSelfPriming.setLanguageKey("gui.nc.config.fission_mixed_self_priming");
|
||||
Property propertyFissionMixedRadiation = config.get(CATEGORY_FISSION, "fission_mixed_radiation", new double[] {RadSources.MIX_239_FISSION, RadSources.MIX_239_FISSION, RadSources.MIX_239_FISSION, RadSources.MIX_239_FISSION, RadSources.MIX_239_FISSION, RadSources.MIX_241_FISSION, RadSources.MIX_241_FISSION, RadSources.MIX_241_FISSION, RadSources.MIX_241_FISSION, RadSources.MIX_241_FISSION}, Lang.localise("gui.nc.config.fission_mixed_radiation.comment"), 0D, 1000D);
|
||||
@ -623,6 +644,8 @@ public class NCConfig {
|
||||
propertyFissionAmericiumEfficiency.setLanguageKey("gui.nc.config.fission_americium_efficiency");
|
||||
Property propertyFissionAmericiumCriticality = config.get(CATEGORY_FISSION, "fission_americium_criticality", new int[] {55, 65, 81, 55, 65, 55 / 2, 65 / 2, 81 / 2, 55 / 2, 65 / 2}, Lang.localise("gui.nc.config.fission_americium_criticality.comment"), 0, 32767);
|
||||
propertyFissionAmericiumCriticality.setLanguageKey("gui.nc.config.fission_americium_criticality");
|
||||
Property propertyFissionAmericiumDecayFactor = config.get(CATEGORY_FISSION, "fission_americium_decay_factor", arrayCopies(10, 0.08D), Lang.localise("gui.nc.config.fission_americium_decay_factor.comment"), 0D, 1D);
|
||||
propertyFissionAmericiumDecayFactor.setLanguageKey("gui.nc.config.fission_americium_decay_factor");
|
||||
Property propertyFissionAmericiumSelfPriming = config.get(CATEGORY_FISSION, "fission_americium_self_priming", new boolean[] {false, false, false, false, false, false, false, false, false, false}, Lang.localise("gui.nc.config.fission_americium_self_priming.comment"));
|
||||
propertyFissionAmericiumSelfPriming.setLanguageKey("gui.nc.config.fission_americium_self_priming");
|
||||
Property propertyFissionAmericiumRadiation = config.get(CATEGORY_FISSION, "fission_americium_radiation", new double[] {RadSources.LEA_242_FISSION, RadSources.LEA_242_FISSION, RadSources.LEA_242_FISSION, RadSources.LEA_242_FISSION, RadSources.LEA_242_FISSION, RadSources.HEA_242_FISSION, RadSources.HEA_242_FISSION, RadSources.HEA_242_FISSION, RadSources.HEA_242_FISSION, RadSources.HEA_242_FISSION}, Lang.localise("gui.nc.config.fission_americium_radiation.comment"), 0D, 1000D);
|
||||
@ -636,6 +659,8 @@ public class NCConfig {
|
||||
propertyFissionCuriumEfficiency.setLanguageKey("gui.nc.config.fission_curium_efficiency");
|
||||
Property propertyFissionCuriumCriticality = config.get(CATEGORY_FISSION, "fission_curium_criticality", new int[] {56, 66, 83, 56, 66, 56 / 2, 66 / 2, 83 / 2, 56 / 2, 66 / 2, 64, 75, 94, 64, 75, 64 / 2, 75 / 2, 94 / 2, 64 / 2, 75 / 2, 61, 72, 90, 61, 72, 61 / 2, 72 / 2, 90 / 2, 61 / 2, 72 / 2}, Lang.localise("gui.nc.config.fission_curium_criticality.comment"), 0, 32767);
|
||||
propertyFissionCuriumCriticality.setLanguageKey("gui.nc.config.fission_curium_criticality");
|
||||
Property propertyFissionCuriumDecayFactor = config.get(CATEGORY_FISSION, "fission_curium_decay_factor", arrayCopies(30, 0.085D), Lang.localise("gui.nc.config.fission_curium_decay_factor.comment"), 0D, 1D);
|
||||
propertyFissionCuriumDecayFactor.setLanguageKey("gui.nc.config.fission_curium_decay_factor");
|
||||
Property propertyFissionCuriumSelfPriming = config.get(CATEGORY_FISSION, "fission_curium_self_priming", new boolean[] {false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, Lang.localise("gui.nc.config.fission_curium_self_priming.comment"));
|
||||
propertyFissionCuriumSelfPriming.setLanguageKey("gui.nc.config.fission_curium_self_priming");
|
||||
Property propertyFissionCuriumRadiation = config.get(CATEGORY_FISSION, "fission_curium_radiation", new double[] {RadSources.LECm_243_FISSION, RadSources.LECm_243_FISSION, RadSources.LECm_243_FISSION, RadSources.LECm_243_FISSION, RadSources.LECm_243_FISSION, RadSources.HECm_243_FISSION, RadSources.HECm_243_FISSION, RadSources.HECm_243_FISSION, RadSources.HECm_243_FISSION, RadSources.HECm_243_FISSION, RadSources.LECm_245_FISSION, RadSources.LECm_245_FISSION, RadSources.LECm_245_FISSION, RadSources.LECm_245_FISSION, RadSources.LECm_245_FISSION, RadSources.HECm_245_FISSION, RadSources.HECm_245_FISSION, RadSources.HECm_245_FISSION, RadSources.HECm_245_FISSION, RadSources.HECm_245_FISSION, RadSources.LECm_247_FISSION, RadSources.LECm_247_FISSION, RadSources.LECm_247_FISSION, RadSources.LECm_247_FISSION, RadSources.LECm_247_FISSION, RadSources.HECm_247_FISSION, RadSources.HECm_247_FISSION, RadSources.HECm_247_FISSION, RadSources.HECm_247_FISSION, RadSources.HECm_247_FISSION}, Lang.localise("gui.nc.config.fission_curium_radiation.comment"), 0D, 1000D);
|
||||
@ -649,6 +674,8 @@ public class NCConfig {
|
||||
propertyFissionBerkeliumEfficiency.setLanguageKey("gui.nc.config.fission_berkelium_efficiency");
|
||||
Property propertyFissionBerkeliumCriticality = config.get(CATEGORY_FISSION, "fission_berkelium_criticality", new int[] {62, 73, 91, 62, 73, 62 / 2, 73 / 2, 91 / 2, 62 / 2, 73 / 2}, Lang.localise("gui.nc.config.fission_berkelium_criticality.comment"), 0, 32767);
|
||||
propertyFissionBerkeliumCriticality.setLanguageKey("gui.nc.config.fission_berkelium_criticality");
|
||||
Property propertyFissionBerkeliumDecayFactor = config.get(CATEGORY_FISSION, "fission_berkelium_decay_factor", arrayCopies(10, 0.09D), Lang.localise("gui.nc.config.fission_berkelium_decay_factor.comment"), 0D, 1D);
|
||||
propertyFissionBerkeliumDecayFactor.setLanguageKey("gui.nc.config.fission_berkelium_decay_factor");
|
||||
Property propertyFissionBerkeliumSelfPriming = config.get(CATEGORY_FISSION, "fission_berkelium_self_priming", new boolean[] {false, false, false, false, false, false, false, false, false, false}, Lang.localise("gui.nc.config.fission_berkelium_self_priming.comment"));
|
||||
propertyFissionBerkeliumSelfPriming.setLanguageKey("gui.nc.config.fission_berkelium_self_priming");
|
||||
Property propertyFissionBerkeliumRadiation = config.get(CATEGORY_FISSION, "fission_berkelium_radiation", new double[] {RadSources.LEB_248_FISSION, RadSources.LEB_248_FISSION, RadSources.LEB_248_FISSION, RadSources.LEB_248_FISSION, RadSources.LEB_248_FISSION, RadSources.HEB_248_FISSION, RadSources.HEB_248_FISSION, RadSources.HEB_248_FISSION, RadSources.HEB_248_FISSION, RadSources.HEB_248_FISSION}, Lang.localise("gui.nc.config.fission_berkelium_radiation.comment"), 0D, 1000D);
|
||||
@ -662,6 +689,8 @@ public class NCConfig {
|
||||
propertyFissionCaliforniumEfficiency.setLanguageKey("gui.nc.config.fission_californium_efficiency");
|
||||
Property propertyFissionCaliforniumCriticality = config.get(CATEGORY_FISSION, "fission_californium_criticality", new int[] {51, 60, 75, 51, 60, 51 / 2, 60 / 2, 75 / 2, 51 / 2, 60 / 2, 60, 71, 89, 60, 71, 60 / 2, 71 / 2, 89 / 2, 60 / 2, 71 / 2}, Lang.localise("gui.nc.config.fission_californium_criticality.comment"), 0, 32767);
|
||||
propertyFissionCaliforniumCriticality.setLanguageKey("gui.nc.config.fission_californium_criticality");
|
||||
Property propertyFissionCaliforniumDecayFactor = config.get(CATEGORY_FISSION, "fission_californium_decay_factor", arrayCopies(20, 0.1D), Lang.localise("gui.nc.config.fission_californium_decay_factor.comment"), 0D, 1D);
|
||||
propertyFissionCaliforniumDecayFactor.setLanguageKey("gui.nc.config.fission_californium_decay_factor");
|
||||
Property propertyFissionCaliforniumSelfPriming = config.get(CATEGORY_FISSION, "fission_californium_self_priming", new boolean[] {true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true}, Lang.localise("gui.nc.config.fission_californium_self_priming.comment"));
|
||||
propertyFissionCaliforniumSelfPriming.setLanguageKey("gui.nc.config.fission_californium_self_priming");
|
||||
Property propertyFissionCaliforniumRadiation = config.get(CATEGORY_FISSION, "fission_californium_radiation", new double[] {RadSources.LECf_249_FISSION, RadSources.LECf_249_FISSION, RadSources.LECf_249_FISSION, RadSources.LECf_249_FISSION, RadSources.LECf_249_FISSION, RadSources.HECf_249_FISSION, RadSources.HECf_249_FISSION, RadSources.HECf_249_FISSION, RadSources.HECf_249_FISSION, RadSources.HECf_249_FISSION, RadSources.LECf_251_FISSION, RadSources.LECf_251_FISSION, RadSources.LECf_251_FISSION, RadSources.LECf_251_FISSION, RadSources.LECf_251_FISSION, RadSources.HECf_251_FISSION, RadSources.HECf_251_FISSION, RadSources.HECf_251_FISSION, RadSources.HECf_251_FISSION, RadSources.HECf_251_FISSION}, Lang.localise("gui.nc.config.fission_californium_radiation.comment"), 0D, 1000D);
|
||||
@ -694,7 +723,7 @@ public class NCConfig {
|
||||
|
||||
Property propertyFusionFuelTime = config.get(CATEGORY_FUSION, "fusion_fuel_time", new double[] {100D, 150D, 200D, 200D, 350D, 400D, 600D, 200D, 250D, 250D, 400D, 450D, 650D, 300D, 300D, 450D, 500D, 700D, 300D, 450D, 500D, 700D, 600D, 650D, 850D, 700D, 900D, 1100D}, Lang.localise("gui.nc.config.fusion_fuel_time.comment"), 1D, 32767D);
|
||||
propertyFusionFuelTime.setLanguageKey("gui.nc.config.fusion_fuel_time");
|
||||
Property propertyFusionPower = config.get(CATEGORY_FUSION, "fusion_power", new double[] {442D, 1123D, 0.3D, 3036D, 351D, 1330D, 444D, 507D, 1726D, 2252D, 1716D, 859D, 261D, 901D, 1099D, 915D, 435D, 7D, 1315D, 1151D, 727D, 140D, 1068D, 552D, 157D, 229D, 0.45D, 0.05D}, Lang.localise("gui.nc.config.fusion_power.comment"), 0D, 32767D);
|
||||
Property propertyFusionPower = config.get(CATEGORY_FUSION, "fusion_power", new double[] {44200D, 112300D, 30D, 303600D, 35100D, 133000D, 44400D, 50700D, 172600D, 225200D, 171600D, 85900D, 26100D, 90100D, 109900D, 91500D, 43500D, 700D, 131500D, 115100D, 72700D, 14000D, 106800D, 55200D, 15700D, 22900D, 45D, 5D}, Lang.localise("gui.nc.config.fusion_power.comment"), 0D, 32767D);
|
||||
propertyFusionPower.setLanguageKey("gui.nc.config.fusion_power");
|
||||
Property propertyFusionHeatVariable = config.get(CATEGORY_FUSION, "fusion_heat_variable", new double[] {3635D, 1022D, 4964D, 2740D, 5972D, 4161D, 13432D, 949D, 670D, 2160D, 3954D, 4131D, 13853D, 736D, 2137D, 4079D, 4522D, 27254D, 5420D, 7800D, 7937D, 24266D, 11268D, 11927D, 30399D, 13630D, 166414D, 293984D}, Lang.localise("gui.nc.config.fusion_heat_variable.comment"), 500D, 20000D);
|
||||
propertyFusionHeatVariable.setLanguageKey("gui.nc.config.fusion_heat_variable");
|
||||
@ -811,7 +840,7 @@ public class NCConfig {
|
||||
propertyRadiationWorlds.setLanguageKey("gui.nc.config.radiation_worlds");
|
||||
Property propertyRadiationBiomes = config.get(CATEGORY_RADIATION, "radiation_biomes", new String[] {"nuclearcraft:nuclear_wasteland_0.25"}, Lang.localise("gui.nc.config.radiation_biomes.comment"));
|
||||
propertyRadiationBiomes.setLanguageKey("gui.nc.config.radiation_biomes");
|
||||
Property propertyRadiationStructures = config.get(CATEGORY_RADIATION, "radiation_structures", new String[] {"Fortress_0.0025", "Mineshaft_0.00005", "Stronghold_0.001"}, Lang.localise("gui.nc.config.radiation_structures.comment"));
|
||||
Property propertyRadiationStructures = config.get(CATEGORY_RADIATION, "radiation_structures", new String[] {}, Lang.localise("gui.nc.config.radiation_structures.comment"));
|
||||
propertyRadiationStructures.setLanguageKey("gui.nc.config.radiation_structures");
|
||||
Property propertyRadiationWorldLimit = config.get(CATEGORY_RADIATION, "radiation_world_limits", new String[] {}, Lang.localise("gui.nc.config.radiation_world_limits.comment"));
|
||||
propertyRadiationWorldLimit.setLanguageKey("gui.nc.config.radiation_world_limits");
|
||||
@ -1099,6 +1128,7 @@ public class NCConfig {
|
||||
propertyOrderFission.add(propertyFissionThoriumHeatGeneration.getName());
|
||||
propertyOrderFission.add(propertyFissionThoriumEfficiency.getName());
|
||||
propertyOrderFission.add(propertyFissionThoriumCriticality.getName());
|
||||
propertyOrderFission.add(propertyFissionThoriumDecayFactor.getName());
|
||||
propertyOrderFission.add(propertyFissionThoriumSelfPriming.getName());
|
||||
propertyOrderFission.add(propertyFissionThoriumRadiation.getName());
|
||||
|
||||
@ -1106,6 +1136,7 @@ public class NCConfig {
|
||||
propertyOrderFission.add(propertyFissionUraniumHeatGeneration.getName());
|
||||
propertyOrderFission.add(propertyFissionUraniumEfficiency.getName());
|
||||
propertyOrderFission.add(propertyFissionUraniumCriticality.getName());
|
||||
propertyOrderFission.add(propertyFissionUraniumDecayFactor.getName());
|
||||
propertyOrderFission.add(propertyFissionUraniumSelfPriming.getName());
|
||||
propertyOrderFission.add(propertyFissionUraniumRadiation.getName());
|
||||
|
||||
@ -1113,6 +1144,7 @@ public class NCConfig {
|
||||
propertyOrderFission.add(propertyFissionNeptuniumHeatGeneration.getName());
|
||||
propertyOrderFission.add(propertyFissionNeptuniumEfficiency.getName());
|
||||
propertyOrderFission.add(propertyFissionNeptuniumCriticality.getName());
|
||||
propertyOrderFission.add(propertyFissionNeptuniumDecayFactor.getName());
|
||||
propertyOrderFission.add(propertyFissionNeptuniumSelfPriming.getName());
|
||||
propertyOrderFission.add(propertyFissionNeptuniumRadiation.getName());
|
||||
|
||||
@ -1120,6 +1152,7 @@ public class NCConfig {
|
||||
propertyOrderFission.add(propertyFissionPlutoniumHeatGeneration.getName());
|
||||
propertyOrderFission.add(propertyFissionPlutoniumEfficiency.getName());
|
||||
propertyOrderFission.add(propertyFissionPlutoniumCriticality.getName());
|
||||
propertyOrderFission.add(propertyFissionPlutoniumDecayFactor.getName());
|
||||
propertyOrderFission.add(propertyFissionPlutoniumSelfPriming.getName());
|
||||
propertyOrderFission.add(propertyFissionPlutoniumRadiation.getName());
|
||||
|
||||
@ -1127,6 +1160,7 @@ public class NCConfig {
|
||||
propertyOrderFission.add(propertyFissionMixedHeatGeneration.getName());
|
||||
propertyOrderFission.add(propertyFissionMixedEfficiency.getName());
|
||||
propertyOrderFission.add(propertyFissionMixedCriticality.getName());
|
||||
propertyOrderFission.add(propertyFissionMixedDecayFactor.getName());
|
||||
propertyOrderFission.add(propertyFissionMixedSelfPriming.getName());
|
||||
propertyOrderFission.add(propertyFissionMixedRadiation.getName());
|
||||
|
||||
@ -1134,6 +1168,7 @@ public class NCConfig {
|
||||
propertyOrderFission.add(propertyFissionAmericiumHeatGeneration.getName());
|
||||
propertyOrderFission.add(propertyFissionAmericiumEfficiency.getName());
|
||||
propertyOrderFission.add(propertyFissionAmericiumCriticality.getName());
|
||||
propertyOrderFission.add(propertyFissionAmericiumDecayFactor.getName());
|
||||
propertyOrderFission.add(propertyFissionAmericiumSelfPriming.getName());
|
||||
propertyOrderFission.add(propertyFissionAmericiumRadiation.getName());
|
||||
|
||||
@ -1141,6 +1176,7 @@ public class NCConfig {
|
||||
propertyOrderFission.add(propertyFissionCuriumHeatGeneration.getName());
|
||||
propertyOrderFission.add(propertyFissionCuriumEfficiency.getName());
|
||||
propertyOrderFission.add(propertyFissionCuriumCriticality.getName());
|
||||
propertyOrderFission.add(propertyFissionCuriumDecayFactor.getName());
|
||||
propertyOrderFission.add(propertyFissionCuriumSelfPriming.getName());
|
||||
propertyOrderFission.add(propertyFissionCuriumRadiation.getName());
|
||||
|
||||
@ -1148,6 +1184,7 @@ public class NCConfig {
|
||||
propertyOrderFission.add(propertyFissionBerkeliumHeatGeneration.getName());
|
||||
propertyOrderFission.add(propertyFissionBerkeliumEfficiency.getName());
|
||||
propertyOrderFission.add(propertyFissionBerkeliumCriticality.getName());
|
||||
propertyOrderFission.add(propertyFissionBerkeliumDecayFactor.getName());
|
||||
propertyOrderFission.add(propertyFissionBerkeliumSelfPriming.getName());
|
||||
propertyOrderFission.add(propertyFissionBerkeliumRadiation.getName());
|
||||
|
||||
@ -1155,6 +1192,7 @@ public class NCConfig {
|
||||
propertyOrderFission.add(propertyFissionCaliforniumHeatGeneration.getName());
|
||||
propertyOrderFission.add(propertyFissionCaliforniumEfficiency.getName());
|
||||
propertyOrderFission.add(propertyFissionCaliforniumCriticality.getName());
|
||||
propertyOrderFission.add(propertyFissionCaliforniumDecayFactor.getName());
|
||||
propertyOrderFission.add(propertyFissionCaliforniumSelfPriming.getName());
|
||||
propertyOrderFission.add(propertyFissionCaliforniumRadiation.getName());
|
||||
config.setCategoryPropertyOrder(CATEGORY_FISSION, propertyOrderFission);
|
||||
@ -1433,6 +1471,7 @@ public class NCConfig {
|
||||
fission_thorium_heat_generation = readIntegerArrayFromConfig(propertyFissionThoriumHeatGeneration);
|
||||
fission_thorium_efficiency = readDoubleArrayFromConfig(propertyFissionThoriumEfficiency);
|
||||
fission_thorium_criticality = readIntegerArrayFromConfig(propertyFissionThoriumCriticality);
|
||||
fission_thorium_decay_factor = readDoubleArrayFromConfig(propertyFissionThoriumDecayFactor);
|
||||
fission_thorium_self_priming = readBooleanArrayFromConfig(propertyFissionThoriumSelfPriming);
|
||||
fission_thorium_radiation = readDoubleArrayFromConfig(propertyFissionThoriumRadiation);
|
||||
|
||||
@ -1440,6 +1479,7 @@ public class NCConfig {
|
||||
fission_uranium_heat_generation = readIntegerArrayFromConfig(propertyFissionUraniumHeatGeneration);
|
||||
fission_uranium_efficiency = readDoubleArrayFromConfig(propertyFissionUraniumEfficiency);
|
||||
fission_uranium_criticality = readIntegerArrayFromConfig(propertyFissionUraniumCriticality);
|
||||
fission_uranium_decay_factor = readDoubleArrayFromConfig(propertyFissionUraniumDecayFactor);
|
||||
fission_uranium_self_priming = readBooleanArrayFromConfig(propertyFissionUraniumSelfPriming);
|
||||
fission_uranium_radiation = readDoubleArrayFromConfig(propertyFissionUraniumRadiation);
|
||||
|
||||
@ -1447,6 +1487,7 @@ public class NCConfig {
|
||||
fission_neptunium_heat_generation = readIntegerArrayFromConfig(propertyFissionNeptuniumHeatGeneration);
|
||||
fission_neptunium_efficiency = readDoubleArrayFromConfig(propertyFissionNeptuniumEfficiency);
|
||||
fission_neptunium_criticality = readIntegerArrayFromConfig(propertyFissionNeptuniumCriticality);
|
||||
fission_neptunium_decay_factor = readDoubleArrayFromConfig(propertyFissionNeptuniumDecayFactor);
|
||||
fission_neptunium_self_priming = readBooleanArrayFromConfig(propertyFissionNeptuniumSelfPriming);
|
||||
fission_neptunium_radiation = readDoubleArrayFromConfig(propertyFissionNeptuniumRadiation);
|
||||
|
||||
@ -1454,6 +1495,7 @@ public class NCConfig {
|
||||
fission_plutonium_heat_generation = readIntegerArrayFromConfig(propertyFissionPlutoniumHeatGeneration);
|
||||
fission_plutonium_efficiency = readDoubleArrayFromConfig(propertyFissionPlutoniumEfficiency);
|
||||
fission_plutonium_criticality = readIntegerArrayFromConfig(propertyFissionPlutoniumCriticality);
|
||||
fission_plutonium_decay_factor = readDoubleArrayFromConfig(propertyFissionPlutoniumDecayFactor);
|
||||
fission_plutonium_self_priming = readBooleanArrayFromConfig(propertyFissionPlutoniumSelfPriming);
|
||||
fission_plutonium_radiation = readDoubleArrayFromConfig(propertyFissionPlutoniumRadiation);
|
||||
|
||||
@ -1461,6 +1503,7 @@ public class NCConfig {
|
||||
fission_mixed_heat_generation = readIntegerArrayFromConfig(propertyFissionMixedHeatGeneration);
|
||||
fission_mixed_efficiency = readDoubleArrayFromConfig(propertyFissionMixedEfficiency);
|
||||
fission_mixed_criticality = readIntegerArrayFromConfig(propertyFissionMixedCriticality);
|
||||
fission_mixed_decay_factor = readDoubleArrayFromConfig(propertyFissionMixedDecayFactor);
|
||||
fission_mixed_self_priming = readBooleanArrayFromConfig(propertyFissionMixedSelfPriming);
|
||||
fission_mixed_radiation = readDoubleArrayFromConfig(propertyFissionMixedRadiation);
|
||||
|
||||
@ -1468,6 +1511,7 @@ public class NCConfig {
|
||||
fission_americium_heat_generation = readIntegerArrayFromConfig(propertyFissionAmericiumHeatGeneration);
|
||||
fission_americium_efficiency = readDoubleArrayFromConfig(propertyFissionAmericiumEfficiency);
|
||||
fission_americium_criticality = readIntegerArrayFromConfig(propertyFissionAmericiumCriticality);
|
||||
fission_americium_decay_factor = readDoubleArrayFromConfig(propertyFissionAmericiumDecayFactor);
|
||||
fission_americium_self_priming = readBooleanArrayFromConfig(propertyFissionAmericiumSelfPriming);
|
||||
fission_americium_radiation = readDoubleArrayFromConfig(propertyFissionAmericiumRadiation);
|
||||
|
||||
@ -1475,6 +1519,7 @@ public class NCConfig {
|
||||
fission_curium_heat_generation = readIntegerArrayFromConfig(propertyFissionCuriumHeatGeneration);
|
||||
fission_curium_efficiency = readDoubleArrayFromConfig(propertyFissionCuriumEfficiency);
|
||||
fission_curium_criticality = readIntegerArrayFromConfig(propertyFissionCuriumCriticality);
|
||||
fission_curium_decay_factor = readDoubleArrayFromConfig(propertyFissionCuriumDecayFactor);
|
||||
fission_curium_self_priming = readBooleanArrayFromConfig(propertyFissionCuriumSelfPriming);
|
||||
fission_curium_radiation = readDoubleArrayFromConfig(propertyFissionCuriumRadiation);
|
||||
|
||||
@ -1482,6 +1527,7 @@ public class NCConfig {
|
||||
fission_berkelium_heat_generation = readIntegerArrayFromConfig(propertyFissionBerkeliumHeatGeneration);
|
||||
fission_berkelium_efficiency = readDoubleArrayFromConfig(propertyFissionBerkeliumEfficiency);
|
||||
fission_berkelium_criticality = readIntegerArrayFromConfig(propertyFissionBerkeliumCriticality);
|
||||
fission_berkelium_decay_factor = readDoubleArrayFromConfig(propertyFissionBerkeliumDecayFactor);
|
||||
fission_berkelium_self_priming = readBooleanArrayFromConfig(propertyFissionBerkeliumSelfPriming);
|
||||
fission_berkelium_radiation = readDoubleArrayFromConfig(propertyFissionBerkeliumRadiation);
|
||||
|
||||
@ -1489,6 +1535,7 @@ public class NCConfig {
|
||||
fission_californium_heat_generation = readIntegerArrayFromConfig(propertyFissionCaliforniumHeatGeneration);
|
||||
fission_californium_efficiency = readDoubleArrayFromConfig(propertyFissionCaliforniumEfficiency);
|
||||
fission_californium_criticality = readIntegerArrayFromConfig(propertyFissionCaliforniumCriticality);
|
||||
fission_californium_decay_factor = readDoubleArrayFromConfig(propertyFissionCaliforniumDecayFactor);
|
||||
fission_californium_self_priming = readBooleanArrayFromConfig(propertyFissionCaliforniumSelfPriming);
|
||||
fission_californium_radiation = readDoubleArrayFromConfig(propertyFissionCaliforniumRadiation);
|
||||
|
||||
@ -1757,6 +1804,7 @@ public class NCConfig {
|
||||
propertyFissionThoriumHeatGeneration.set(fission_thorium_heat_generation);
|
||||
propertyFissionThoriumEfficiency.set(fission_thorium_efficiency);
|
||||
propertyFissionThoriumCriticality.set(fission_thorium_criticality);
|
||||
propertyFissionThoriumDecayFactor.set(fission_thorium_decay_factor);
|
||||
propertyFissionThoriumSelfPriming.set(fission_thorium_self_priming);
|
||||
propertyFissionThoriumRadiation.set(fission_thorium_radiation);
|
||||
|
||||
@ -1764,6 +1812,7 @@ public class NCConfig {
|
||||
propertyFissionUraniumHeatGeneration.set(fission_uranium_heat_generation);
|
||||
propertyFissionUraniumEfficiency.set(fission_uranium_efficiency);
|
||||
propertyFissionUraniumCriticality.set(fission_uranium_criticality);
|
||||
propertyFissionUraniumDecayFactor.set(fission_uranium_decay_factor);
|
||||
propertyFissionUraniumSelfPriming.set(fission_uranium_self_priming);
|
||||
propertyFissionUraniumRadiation.set(fission_uranium_radiation);
|
||||
|
||||
@ -1771,6 +1820,7 @@ public class NCConfig {
|
||||
propertyFissionNeptuniumHeatGeneration.set(fission_neptunium_heat_generation);
|
||||
propertyFissionNeptuniumEfficiency.set(fission_neptunium_efficiency);
|
||||
propertyFissionNeptuniumCriticality.set(fission_neptunium_criticality);
|
||||
propertyFissionNeptuniumDecayFactor.set(fission_neptunium_decay_factor);
|
||||
propertyFissionNeptuniumSelfPriming.set(fission_neptunium_self_priming);
|
||||
propertyFissionNeptuniumRadiation.set(fission_neptunium_radiation);
|
||||
|
||||
@ -1778,6 +1828,7 @@ public class NCConfig {
|
||||
propertyFissionPlutoniumHeatGeneration.set(fission_plutonium_heat_generation);
|
||||
propertyFissionPlutoniumEfficiency.set(fission_plutonium_efficiency);
|
||||
propertyFissionPlutoniumCriticality.set(fission_plutonium_criticality);
|
||||
propertyFissionPlutoniumDecayFactor.set(fission_plutonium_decay_factor);
|
||||
propertyFissionPlutoniumSelfPriming.set(fission_plutonium_self_priming);
|
||||
propertyFissionPlutoniumRadiation.set(fission_plutonium_radiation);
|
||||
|
||||
@ -1785,6 +1836,7 @@ public class NCConfig {
|
||||
propertyFissionMixedHeatGeneration.set(fission_mixed_heat_generation);
|
||||
propertyFissionMixedEfficiency.set(fission_mixed_efficiency);
|
||||
propertyFissionMixedCriticality.set(fission_mixed_criticality);
|
||||
propertyFissionMixedDecayFactor.set(fission_mixed_decay_factor);
|
||||
propertyFissionMixedSelfPriming.set(fission_mixed_self_priming);
|
||||
propertyFissionMixedRadiation.set(fission_mixed_radiation);
|
||||
|
||||
@ -1792,6 +1844,7 @@ public class NCConfig {
|
||||
propertyFissionAmericiumHeatGeneration.set(fission_americium_heat_generation);
|
||||
propertyFissionAmericiumEfficiency.set(fission_americium_efficiency);
|
||||
propertyFissionAmericiumCriticality.set(fission_americium_criticality);
|
||||
propertyFissionAmericiumDecayFactor.set(fission_americium_decay_factor);
|
||||
propertyFissionAmericiumSelfPriming.set(fission_americium_self_priming);
|
||||
propertyFissionAmericiumRadiation.set(fission_americium_radiation);
|
||||
|
||||
@ -1799,6 +1852,7 @@ public class NCConfig {
|
||||
propertyFissionCuriumHeatGeneration.set(fission_curium_heat_generation);
|
||||
propertyFissionCuriumEfficiency.set(fission_curium_efficiency);
|
||||
propertyFissionCuriumCriticality.set(fission_curium_criticality);
|
||||
propertyFissionCuriumDecayFactor.set(fission_curium_decay_factor);
|
||||
propertyFissionCuriumSelfPriming.set(fission_curium_self_priming);
|
||||
propertyFissionCuriumRadiation.set(fission_curium_radiation);
|
||||
|
||||
@ -1806,6 +1860,7 @@ public class NCConfig {
|
||||
propertyFissionBerkeliumHeatGeneration.set(fission_berkelium_heat_generation);
|
||||
propertyFissionBerkeliumEfficiency.set(fission_berkelium_efficiency);
|
||||
propertyFissionBerkeliumCriticality.set(fission_berkelium_criticality);
|
||||
propertyFissionBerkeliumDecayFactor.set(fission_berkelium_decay_factor);
|
||||
propertyFissionBerkeliumSelfPriming.set(fission_berkelium_self_priming);
|
||||
propertyFissionBerkeliumRadiation.set(fission_berkelium_radiation);
|
||||
|
||||
@ -1813,6 +1868,7 @@ public class NCConfig {
|
||||
propertyFissionCaliforniumHeatGeneration.set(fission_californium_heat_generation);
|
||||
propertyFissionCaliforniumEfficiency.set(fission_californium_efficiency);
|
||||
propertyFissionCaliforniumCriticality.set(fission_californium_criticality);
|
||||
propertyFissionCaliforniumDecayFactor.set(fission_californium_decay_factor);
|
||||
propertyFissionCaliforniumSelfPriming.set(fission_californium_self_priming);
|
||||
propertyFissionCaliforniumRadiation.set(fission_californium_radiation);
|
||||
|
||||
@ -1998,7 +2054,7 @@ public class NCConfig {
|
||||
propertyHWYLAEnabled.set(hwyla_enabled);
|
||||
|
||||
if (setFromConfig) {
|
||||
ProcessorRecipeHandler.initGTCEIntegration();
|
||||
BasicRecipeHandler.initGTCEIntegration();
|
||||
|
||||
radiation_enabled_public = radiation_enabled;
|
||||
radiation_horse_armor_public = radiation_horse_armor;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package nc.container.generator;
|
||||
|
||||
import nc.container.ContainerTile;
|
||||
import nc.recipe.ProcessorRecipeHandler;
|
||||
import nc.recipe.BasicRecipeHandler;
|
||||
import nc.tile.ITileGui;
|
||||
import nc.tile.generator.IItemGenerator;
|
||||
import nc.tile.inventory.ITileFilteredInventory;
|
||||
@ -12,9 +12,9 @@ import net.minecraft.item.ItemStack;
|
||||
public class ContainerFilteredItemGenerator<GENERATOR extends IItemGenerator & ITileFilteredInventory & ITileGui> extends ContainerTile<GENERATOR> {
|
||||
|
||||
protected final GENERATOR tile;
|
||||
protected final ProcessorRecipeHandler recipeHandler;
|
||||
protected final BasicRecipeHandler recipeHandler;
|
||||
|
||||
public ContainerFilteredItemGenerator(EntityPlayer player, GENERATOR tileEntity, ProcessorRecipeHandler recipeHandler) {
|
||||
public ContainerFilteredItemGenerator(EntityPlayer player, GENERATOR tileEntity, BasicRecipeHandler recipeHandler) {
|
||||
super(tileEntity);
|
||||
tile = tileEntity;
|
||||
this.recipeHandler = recipeHandler;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package nc.container.generator;
|
||||
|
||||
import nc.container.ContainerTile;
|
||||
import nc.recipe.ProcessorRecipeHandler;
|
||||
import nc.recipe.BasicRecipeHandler;
|
||||
import nc.tile.ITileGui;
|
||||
import nc.tile.generator.*;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -11,9 +11,9 @@ import net.minecraft.item.ItemStack;
|
||||
public abstract class ContainerFluidGenerator<GENERATOR extends IFluidGenerator & ITileGui> extends ContainerTile<GENERATOR> {
|
||||
|
||||
protected final GENERATOR tile;
|
||||
protected final ProcessorRecipeHandler recipeHandler;
|
||||
protected final BasicRecipeHandler recipeHandler;
|
||||
|
||||
public ContainerFluidGenerator(EntityPlayer player, GENERATOR tileEntity, ProcessorRecipeHandler recipeHandler) {
|
||||
public ContainerFluidGenerator(EntityPlayer player, GENERATOR tileEntity, BasicRecipeHandler recipeHandler) {
|
||||
super(tileEntity);
|
||||
tile = tileEntity;
|
||||
this.recipeHandler = recipeHandler;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package nc.container.generator;
|
||||
|
||||
import nc.container.ContainerTile;
|
||||
import nc.recipe.ProcessorRecipeHandler;
|
||||
import nc.recipe.BasicRecipeHandler;
|
||||
import nc.tile.ITileGui;
|
||||
import nc.tile.generator.*;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -11,9 +11,9 @@ import net.minecraft.item.ItemStack;
|
||||
public abstract class ContainerItemGenerator<GENERATOR extends IItemGenerator & ITileGui> extends ContainerTile<GENERATOR> {
|
||||
|
||||
protected final GENERATOR tile;
|
||||
protected final ProcessorRecipeHandler recipeHandler;
|
||||
protected final BasicRecipeHandler recipeHandler;
|
||||
|
||||
public ContainerItemGenerator(EntityPlayer player, GENERATOR tileEntity, ProcessorRecipeHandler recipeHandler) {
|
||||
public ContainerItemGenerator(EntityPlayer player, GENERATOR tileEntity, BasicRecipeHandler recipeHandler) {
|
||||
super(tileEntity);
|
||||
tile = tileEntity;
|
||||
this.recipeHandler = recipeHandler;
|
||||
|
||||
@ -2,7 +2,7 @@ package nc.container.processor;
|
||||
|
||||
import nc.container.ContainerTile;
|
||||
import nc.init.NCItems;
|
||||
import nc.recipe.ProcessorRecipeHandler;
|
||||
import nc.recipe.BasicRecipeHandler;
|
||||
import nc.tile.ITileGui;
|
||||
import nc.tile.inventory.ITileFilteredInventory;
|
||||
import nc.tile.processor.*;
|
||||
@ -13,9 +13,9 @@ import net.minecraft.item.ItemStack;
|
||||
public abstract class ContainerFilteredItemProcessor<PROCESSOR extends IItemProcessor & ITileFilteredInventory & ITileGui> extends ContainerTile<PROCESSOR> {
|
||||
|
||||
protected final PROCESSOR tile;
|
||||
protected final ProcessorRecipeHandler recipeHandler;
|
||||
protected final BasicRecipeHandler recipeHandler;
|
||||
|
||||
public ContainerFilteredItemProcessor(EntityPlayer player, PROCESSOR tileEntity, ProcessorRecipeHandler recipeHandler) {
|
||||
public ContainerFilteredItemProcessor(EntityPlayer player, PROCESSOR tileEntity, BasicRecipeHandler recipeHandler) {
|
||||
super(tileEntity);
|
||||
tile = tileEntity;
|
||||
this.recipeHandler = recipeHandler;
|
||||
|
||||
@ -2,7 +2,7 @@ package nc.container.processor;
|
||||
|
||||
import nc.container.ContainerTile;
|
||||
import nc.init.NCItems;
|
||||
import nc.recipe.ProcessorRecipeHandler;
|
||||
import nc.recipe.BasicRecipeHandler;
|
||||
import nc.tile.ITileGui;
|
||||
import nc.tile.inventory.ITileInventory;
|
||||
import nc.tile.processor.*;
|
||||
@ -13,12 +13,12 @@ import net.minecraft.item.ItemStack;
|
||||
public abstract class ContainerFluidProcessor<PROCESSOR extends IFluidProcessor & ITileGui> extends ContainerTile<PROCESSOR> {
|
||||
|
||||
protected final PROCESSOR tile;
|
||||
protected final ProcessorRecipeHandler recipeHandler;
|
||||
protected final BasicRecipeHandler recipeHandler;
|
||||
|
||||
protected static final ItemStack SPEED_UPGRADE = new ItemStack(NCItems.upgrade, 1, 0);
|
||||
protected static final ItemStack ENERGY_UPGRADE = new ItemStack(NCItems.upgrade, 1, 1);
|
||||
|
||||
public ContainerFluidProcessor(EntityPlayer player, PROCESSOR tileEntity, ProcessorRecipeHandler recipeHandler) {
|
||||
public ContainerFluidProcessor(EntityPlayer player, PROCESSOR tileEntity, BasicRecipeHandler recipeHandler) {
|
||||
super(tileEntity);
|
||||
tile = tileEntity;
|
||||
this.recipeHandler = recipeHandler;
|
||||
|
||||
@ -2,7 +2,7 @@ package nc.container.processor;
|
||||
|
||||
import nc.container.ContainerTile;
|
||||
import nc.init.NCItems;
|
||||
import nc.recipe.ProcessorRecipeHandler;
|
||||
import nc.recipe.BasicRecipeHandler;
|
||||
import nc.tile.ITileGui;
|
||||
import nc.tile.processor.*;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -12,12 +12,12 @@ import net.minecraft.item.ItemStack;
|
||||
public abstract class ContainerItemFluidProcessor<PROCESSOR extends IItemFluidProcessor & ITileGui> extends ContainerTile<PROCESSOR> {
|
||||
|
||||
protected final PROCESSOR tile;
|
||||
protected final ProcessorRecipeHandler recipeHandler;
|
||||
protected final BasicRecipeHandler recipeHandler;
|
||||
|
||||
protected static final ItemStack SPEED_UPGRADE = new ItemStack(NCItems.upgrade, 1, 0);
|
||||
protected static final ItemStack ENERGY_UPGRADE = new ItemStack(NCItems.upgrade, 1, 1);
|
||||
|
||||
public ContainerItemFluidProcessor(EntityPlayer player, PROCESSOR tileEntity, ProcessorRecipeHandler recipeHandler) {
|
||||
public ContainerItemFluidProcessor(EntityPlayer player, PROCESSOR tileEntity, BasicRecipeHandler recipeHandler) {
|
||||
super(tileEntity);
|
||||
tile = tileEntity;
|
||||
this.recipeHandler = recipeHandler;
|
||||
|
||||
@ -2,7 +2,7 @@ package nc.container.processor;
|
||||
|
||||
import nc.container.ContainerTile;
|
||||
import nc.init.NCItems;
|
||||
import nc.recipe.ProcessorRecipeHandler;
|
||||
import nc.recipe.BasicRecipeHandler;
|
||||
import nc.tile.ITileGui;
|
||||
import nc.tile.processor.*;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -12,12 +12,12 @@ import net.minecraft.item.ItemStack;
|
||||
public abstract class ContainerItemProcessor<PROCESSOR extends IItemProcessor & ITileGui> extends ContainerTile<PROCESSOR> {
|
||||
|
||||
protected final PROCESSOR tile;
|
||||
protected final ProcessorRecipeHandler recipeHandler;
|
||||
protected final BasicRecipeHandler recipeHandler;
|
||||
|
||||
protected static final ItemStack SPEED_UPGRADE = new ItemStack(NCItems.upgrade, 1, 0);
|
||||
protected static final ItemStack ENERGY_UPGRADE = new ItemStack(NCItems.upgrade, 1, 1);
|
||||
|
||||
public ContainerItemProcessor(EntityPlayer player, PROCESSOR tileEntity, ProcessorRecipeHandler recipeHandler) {
|
||||
public ContainerItemProcessor(EntityPlayer player, PROCESSOR tileEntity, BasicRecipeHandler recipeHandler) {
|
||||
super(tileEntity);
|
||||
tile = tileEntity;
|
||||
this.recipeHandler = recipeHandler;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package nc.container.slot;
|
||||
|
||||
import nc.recipe.ProcessorRecipeHandler;
|
||||
import nc.recipe.BasicRecipeHandler;
|
||||
import nc.tile.inventory.ITileFilteredInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -71,9 +71,9 @@ public class SlotFiltered extends Slot {
|
||||
|
||||
public static class ProcessorInput extends SlotFiltered {
|
||||
|
||||
protected final ProcessorRecipeHandler recipeHandler;
|
||||
protected final BasicRecipeHandler recipeHandler;
|
||||
|
||||
public ProcessorInput(ITileFilteredInventory tile, ProcessorRecipeHandler recipeHandler, int index, int xPosition, int yPosition) {
|
||||
public ProcessorInput(ITileFilteredInventory tile, BasicRecipeHandler recipeHandler, int index, int xPosition, int yPosition) {
|
||||
super(tile, index, xPosition, yPosition);
|
||||
this.recipeHandler = recipeHandler;
|
||||
}
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
package nc.container.slot;
|
||||
|
||||
import nc.recipe.ProcessorRecipeHandler;
|
||||
import nc.recipe.BasicRecipeHandler;
|
||||
import net.minecraft.inventory.*;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class SlotProcessorInput extends Slot {
|
||||
|
||||
protected final ProcessorRecipeHandler recipeHandler;
|
||||
protected final BasicRecipeHandler recipeHandler;
|
||||
|
||||
public SlotProcessorInput(IInventory tile, ProcessorRecipeHandler recipeHandler, int index, int xPosition, int yPosition) {
|
||||
public SlotProcessorInput(IInventory tile, BasicRecipeHandler recipeHandler, int index, int xPosition, int yPosition) {
|
||||
super(tile, index, xPosition, yPosition);
|
||||
this.recipeHandler = recipeHandler;
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ import nc.tile.radiation.*;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
|
||||
public class BlockEnums {
|
||||
|
||||
@ -155,11 +155,6 @@ public class BlockEnums {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("static-method")
|
||||
public SoundEvent getSound() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getParticle1() {
|
||||
return particle1;
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package nc.gui;
|
||||
|
||||
public interface IButtonEnum {
|
||||
public interface IGuiButton {
|
||||
|
||||
public int getTextureX();
|
||||
|
||||
@ -102,8 +102,7 @@ public abstract class NCGui extends GuiContainer {
|
||||
}
|
||||
|
||||
protected void drawTooltip(String text, int mouseX, int mouseY, int x, int y, int width, int height) {
|
||||
List<String> stringList = Lists.newArrayList(text);
|
||||
drawTooltip(stringList, mouseX, mouseY, x, y, width, height);
|
||||
drawTooltip(Lists.newArrayList(text), mouseX, mouseY, x, y, width, height);
|
||||
}
|
||||
|
||||
protected List<String> fluidInfo(Tank tank) {
|
||||
@ -154,8 +153,4 @@ public abstract class NCGui extends GuiContainer {
|
||||
protected int width(String string) {
|
||||
return fontRenderer.getStringWidth(string);
|
||||
}
|
||||
|
||||
protected int widthHalf(String string) {
|
||||
return width(string) / 2;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,119 +1,194 @@
|
||||
/** Massive thanks to CrazyPants, maker of EnderIO and related mods, for letting me use this code! */
|
||||
|
||||
package nc.gui.element;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import nc.util.StackHelper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.texture.*;
|
||||
import net.minecraft.client.entity.EntityPlayerSP;
|
||||
import net.minecraft.client.renderer.*;
|
||||
import net.minecraft.client.renderer.block.model.*;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.item.*;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraftforge.client.ForgeHooksClient;
|
||||
import net.minecraftforge.common.ForgeModContainer;
|
||||
|
||||
public class GuiItemRenderer extends Gui {
|
||||
public class GuiItemRenderer {
|
||||
|
||||
private static final Minecraft MC = Minecraft.getMinecraft();
|
||||
protected static final Minecraft MC = Minecraft.getMinecraft();
|
||||
|
||||
public static final int DEFAULT_WIDTH = 16;
|
||||
public static final int HWIDTH = DEFAULT_WIDTH / 2;
|
||||
public static final int DEFAULT_HEIGHT = 16;
|
||||
public static final int HHEIGHT = DEFAULT_HEIGHT / 2;
|
||||
protected final @Nonnull ItemStack stack;
|
||||
protected final int x, y;
|
||||
protected final float alpha;
|
||||
|
||||
protected int hwidth = HWIDTH;
|
||||
protected int hheight = HHEIGHT;
|
||||
protected int width = DEFAULT_WIDTH;
|
||||
protected int height = DEFAULT_HEIGHT;
|
||||
protected int width = 16, height = 16;
|
||||
|
||||
protected @Nonnull TextureAtlasSprite icon;
|
||||
protected @Nonnull ResourceLocation texture;
|
||||
|
||||
private final int yPosition;
|
||||
private final int xPosition;
|
||||
|
||||
private float alpha = 1F;
|
||||
|
||||
public GuiItemRenderer(int x, int y, float alpha, @Nonnull ItemStack stack) {
|
||||
this(x, y, alpha, stack.getItem(), StackHelper.getMetadata(stack));
|
||||
}
|
||||
|
||||
public GuiItemRenderer(int x, int y, float alpha, @Nonnull Item item, int itemMeta) {
|
||||
this(x, y, alpha, getIconForItem(item, itemMeta), TextureMap.LOCATION_BLOCKS_TEXTURE);
|
||||
}
|
||||
|
||||
public GuiItemRenderer(int x, int y, float alpha, @Nonnull TextureAtlasSprite icon, @Nonnull ResourceLocation texture) {
|
||||
xPosition = x;
|
||||
yPosition = y;
|
||||
setAlpha(alpha);
|
||||
this.icon = icon;
|
||||
this.texture = texture;
|
||||
}
|
||||
|
||||
public static @Nonnull TextureAtlasSprite getIconForItem(@Nonnull Item item, int meta) {
|
||||
final TextureAtlasSprite icon = MC.getRenderItem().getItemModelMesher().getParticleIcon(item, meta);
|
||||
return icon != null ? icon : MC.getTextureMapBlocks().getMissingSprite();
|
||||
}
|
||||
|
||||
public void setSize(int width, int height) {
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
hwidth = width / 2;
|
||||
hheight = height / 2;
|
||||
}
|
||||
|
||||
public int getWidth() {
|
||||
return width;
|
||||
}
|
||||
|
||||
public int getHeight() {
|
||||
return height;
|
||||
}
|
||||
|
||||
public @Nonnull TextureAtlasSprite getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
public float getAlpha() {
|
||||
return alpha;
|
||||
}
|
||||
|
||||
public void setAlpha(float alpha) {
|
||||
public GuiItemRenderer(@Nonnull ItemStack stack, int x, int y, float alpha) {
|
||||
this.stack = stack;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.alpha = alpha;
|
||||
}
|
||||
|
||||
public void setIcon(@Nonnull TextureAtlasSprite icon) {
|
||||
this.icon = icon;
|
||||
public GuiItemRenderer(@Nonnull Item item, int meta, int x, int y, float alpha) {
|
||||
this(new ItemStack(item, 1, meta), x, y, alpha);
|
||||
}
|
||||
|
||||
public @Nonnull ResourceLocation getTexture() {
|
||||
return texture;
|
||||
}
|
||||
|
||||
public void setTexture(@Nonnull ResourceLocation textureName) {
|
||||
texture = textureName;
|
||||
}
|
||||
|
||||
public static void bindTexture(String string) {
|
||||
MC.renderEngine.bindTexture(new ResourceLocation(string));
|
||||
}
|
||||
|
||||
public static void bindTexture(@Nonnull ResourceLocation tex) {
|
||||
MC.renderEngine.bindTexture(tex);
|
||||
public GuiItemRenderer size(int width, int height) {
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void draw() {
|
||||
GlStateManager.color(1F, 1F, 1F, alpha);
|
||||
if (!stack.isEmpty()) {
|
||||
GlStateManager.color(1F, 1F, 1F, alpha);
|
||||
renderItem();
|
||||
renderItemOverlays();
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
}
|
||||
}
|
||||
|
||||
protected void renderItem() {
|
||||
MC.getRenderItem().zLevel += 50F;
|
||||
GlStateManager.pushMatrix();
|
||||
MC.getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
|
||||
MC.getTextureManager().getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).setBlurMipmap(false, false);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.alphaFunc(516, 0.1F);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.color(1F, 1F, 1F, alpha);
|
||||
IBakedModel model = MC.getRenderItem().getItemModelWithOverrides(stack, null, null);
|
||||
setupGuiTransform(x, y, model.isGui3d());
|
||||
model = ForgeHooksClient.handleCameraTransforms(model, ItemCameraTransforms.TransformType.GUI, false);
|
||||
renderModelAndEffect(stack, model);
|
||||
GlStateManager.disableRescaleNormal();
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.popMatrix();
|
||||
MC.getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
|
||||
MC.getTextureManager().getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).restoreLastBlurMipmap();
|
||||
MC.getRenderItem().zLevel -= 50F;
|
||||
}
|
||||
|
||||
protected void setupGuiTransform(int x, int y, boolean isGui3d) {
|
||||
GlStateManager.translate(x, y, 100F + MC.getRenderItem().zLevel);
|
||||
GlStateManager.translate(8F, 8F, 0F);
|
||||
GlStateManager.scale(1F, -1F, 1F);
|
||||
GlStateManager.scale(width, 16F, height);
|
||||
|
||||
bindTexture(texture);
|
||||
drawTexturedModalRect(xPosition, yPosition, icon, width, height);
|
||||
if (isGui3d) {
|
||||
GlStateManager.enableLighting();
|
||||
}
|
||||
else {
|
||||
GlStateManager.disableLighting();
|
||||
}
|
||||
}
|
||||
|
||||
protected void renderModelAndEffect(ItemStack stack, IBakedModel model) {
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(-0.5F, -0.5F, -0.5F);
|
||||
|
||||
GlStateManager.disableBlend();
|
||||
if (model.isBuiltInRenderer()) {
|
||||
GlStateManager.color(1F, 1F, 1F, alpha);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
stack.getItem().getTileEntityItemStackRenderer().renderByItem(stack);
|
||||
}
|
||||
else {
|
||||
renderModel(model, new Color(1F, 1F, 1F, alpha).getRGB(), stack);
|
||||
if (stack.hasEffect()) {
|
||||
renderEffect(model);
|
||||
}
|
||||
}
|
||||
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
protected void renderEffect(IBakedModel model) {
|
||||
GlStateManager.depthMask(false);
|
||||
GlStateManager.depthFunc(514);
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_COLOR, GlStateManager.DestFactor.ONE);
|
||||
MC.getTextureManager().bindTexture(new ResourceLocation("textures/misc/enchanted_item_glint.png"));
|
||||
GlStateManager.matrixMode(5890);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(8F, 8F, 8F);
|
||||
float f = (Minecraft.getSystemTime() % 3000L) / 24000F;
|
||||
GlStateManager.translate(f, 0F, 0F);
|
||||
GlStateManager.rotate(-50F, 0F, 0F, 1F);
|
||||
renderModel(model, -8372020, ItemStack.EMPTY);
|
||||
GlStateManager.popMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(8F, 8F, 8F);
|
||||
float f1 = (Minecraft.getSystemTime() % 4873L) / 38984F;
|
||||
GlStateManager.translate(-f1, 0F, 0F);
|
||||
GlStateManager.rotate(10F, 0F, 0F, 1F);
|
||||
renderModel(model, -8372020, ItemStack.EMPTY);
|
||||
GlStateManager.popMatrix();
|
||||
GlStateManager.matrixMode(5888);
|
||||
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.enableLighting();
|
||||
GlStateManager.depthFunc(515);
|
||||
GlStateManager.depthMask(true);
|
||||
MC.getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
|
||||
}
|
||||
|
||||
protected void renderModel(IBakedModel model, int color, ItemStack stack) {
|
||||
if (ForgeModContainer.allowEmissiveItems) {
|
||||
ForgeHooksClient.renderLitItem(MC.getRenderItem(), model, color, stack);
|
||||
return;
|
||||
}
|
||||
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
BufferBuilder bufferbuilder = tessellator.getBuffer();
|
||||
bufferbuilder.begin(7, DefaultVertexFormats.ITEM);
|
||||
|
||||
for (EnumFacing facing : EnumFacing.values()) {
|
||||
MC.getRenderItem().renderQuads(bufferbuilder, model.getQuads(null, facing, 0L), color, stack);
|
||||
}
|
||||
|
||||
MC.getRenderItem().renderQuads(bufferbuilder, model.getQuads(null, null, 0L), color, stack);
|
||||
tessellator.draw();
|
||||
}
|
||||
|
||||
protected void renderItemOverlays() {
|
||||
if (!stack.isEmpty()) {
|
||||
BufferBuilder bufferbuilder = Tessellator.getInstance().getBuffer();
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.disableDepth();
|
||||
GlStateManager.disableTexture2D();
|
||||
|
||||
if (stack.getItem().showDurabilityBar(stack)) {
|
||||
GlStateManager.disableBlend();
|
||||
int i = Math.round(13F * (1F - (float) stack.getItem().getDurabilityForDisplay(stack)));
|
||||
int j = stack.getItem().getRGBDurabilityForDisplay(stack);
|
||||
draw(bufferbuilder, x + 2, y + 13, 13, 2, 0, 0, 0, (int) (255D * alpha));
|
||||
draw(bufferbuilder, x + 2, y + 13, i, 1, j >> 16 & 255, j >> 8 & 255, j & 255, (int) (255D * alpha));
|
||||
GlStateManager.enableBlend();
|
||||
}
|
||||
|
||||
EntityPlayerSP player = Minecraft.getMinecraft().player;
|
||||
float partialTicks = player == null ? 0F : player.getCooldownTracker().getCooldown(stack.getItem(), Minecraft.getMinecraft().getRenderPartialTicks());
|
||||
|
||||
if (partialTicks > 0F) {
|
||||
draw(bufferbuilder, x, y + MathHelper.floor(16F * (1F - partialTicks)), 16, MathHelper.ceil(16F * partialTicks), 255, 255, 255, (int) (127D * alpha));
|
||||
}
|
||||
|
||||
GlStateManager.enableTexture2D();
|
||||
GlStateManager.enableLighting();
|
||||
GlStateManager.enableDepth();
|
||||
}
|
||||
}
|
||||
|
||||
protected void draw(BufferBuilder bufferbuilder, int x, int y, int width, int height, int red, int green, int blue, int alpha) {
|
||||
bufferbuilder.begin(7, DefaultVertexFormats.POSITION_COLOR);
|
||||
bufferbuilder.pos(x, y, 0D).color(red, green, blue, alpha).endVertex();
|
||||
bufferbuilder.pos(x, y + height, 0D).color(red, green, blue, alpha).endVertex();
|
||||
bufferbuilder.pos(x + width, y + height, 0D).color(red, green, blue, alpha).endVertex();
|
||||
bufferbuilder.pos(x + width, y, 0D).color(red, green, blue, alpha).endVertex();
|
||||
Tessellator.getInstance().draw();
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,11 +76,11 @@ public abstract class NCButton extends GuiButton {
|
||||
|
||||
protected GuiItemRenderer itemRenderer;
|
||||
|
||||
public Item(int id, int x, int y, int width, int height, float alph, @Nonnull net.minecraft.item.Item item, int itemMeta) {
|
||||
public Item(int id, int x, int y, int width, int height, float alph, @Nonnull net.minecraft.item.Item item, int meta) {
|
||||
super(id, x, y, width, height);
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
itemRenderer = new GuiItemRenderer(x + (width - 16) / 2, y + (height - 16) / 2, alph, item, itemMeta);
|
||||
itemRenderer = new GuiItemRenderer(item, meta, x + (width - 16) / 2, y + (height - 16) / 2, alph);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -3,7 +3,7 @@ package nc.gui.element;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import nc.Global;
|
||||
import nc.gui.IButtonEnum;
|
||||
import nc.gui.IGuiButton;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.relauncher.*;
|
||||
@ -30,7 +30,7 @@ public abstract class NCEnumButton<T extends Enum<T>> extends NCButton {
|
||||
public abstract void toggle(int mouseButton);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static abstract class Image<T extends Enum<T> & IButtonEnum> extends NCEnumButton<T> {
|
||||
public static abstract class Image<T extends Enum<T> & IGuiButton> extends NCEnumButton<T> {
|
||||
|
||||
protected int textureX, textureY;
|
||||
protected int textureWidth, textureHeight;
|
||||
|
||||
@ -73,12 +73,12 @@ public abstract class NCToggleButton extends NCButton {
|
||||
|
||||
protected GuiItemRenderer unpressedItemRenderer, pressedItemRenderer;
|
||||
|
||||
public Item(int id, int x, int y, int width, int height, float unpressedAlph, @Nonnull net.minecraft.item.Item unpressedItem, int unpressedItemMeta, float pressedAlph, @Nonnull net.minecraft.item.Item pressedItem, int pressedItemMeta, boolean pressed) {
|
||||
public Item(int id, int x, int y, int width, int height, float unpressedAlpha, @Nonnull net.minecraft.item.Item unpressedItem, int unpressedMeta, float pressedAlpha, @Nonnull net.minecraft.item.Item pressedItem, int pressedMeta, boolean pressed) {
|
||||
super(id, x, y, width, height, pressed);
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
unpressedItemRenderer = new GuiItemRenderer(x + (width - 16) / 2, y + (height - 16) / 2, unpressedAlph, unpressedItem, unpressedItemMeta);
|
||||
pressedItemRenderer = new GuiItemRenderer(x + (width - 16) / 2, y + (height - 16) / 2, pressedAlph, pressedItem, pressedItemMeta);
|
||||
unpressedItemRenderer = new GuiItemRenderer(unpressedItem, unpressedMeta, x + (width - 16) / 2, y + (height - 16) / 2, unpressedAlpha);
|
||||
pressedItemRenderer = new GuiItemRenderer(pressedItem, pressedMeta, x + (width - 16) / 2, y + (height - 16) / 2, pressedAlpha);
|
||||
}
|
||||
|
||||
public GuiItemRenderer getItemRenderer() {
|
||||
|
||||
@ -81,10 +81,10 @@ public abstract class GuiFluidProcessor extends NCGui {
|
||||
|
||||
protected void drawUpgradeRenderers() {
|
||||
if (speedUpgradeRender == null) {
|
||||
speedUpgradeRender = new GuiItemRenderer(guiLeft + 132, guiTop + ySize - 102, 0.5F, NCItems.upgrade, 0);
|
||||
speedUpgradeRender = new GuiItemRenderer(NCItems.upgrade, 0, guiLeft + 132, guiTop + ySize - 102, 0.5F);
|
||||
}
|
||||
if (energyUpgradeRender == null) {
|
||||
energyUpgradeRender = new GuiItemRenderer(guiLeft + 152, guiTop + ySize - 102, 0.5F, NCItems.upgrade, 1);
|
||||
energyUpgradeRender = new GuiItemRenderer(NCItems.upgrade, 1, guiLeft + 152, guiTop + ySize - 102, 0.5F);
|
||||
}
|
||||
speedUpgradeRender.draw();
|
||||
energyUpgradeRender.draw();
|
||||
|
||||
@ -81,10 +81,10 @@ public abstract class GuiItemFluidProcessor extends NCGui {
|
||||
|
||||
protected void drawUpgradeRenderers() {
|
||||
if (speedUpgradeRender == null) {
|
||||
speedUpgradeRender = new GuiItemRenderer(guiLeft + 132, guiTop + ySize - 102, 0.5F, NCItems.upgrade, 0);
|
||||
speedUpgradeRender = new GuiItemRenderer(NCItems.upgrade, 0, guiLeft + 132, guiTop + ySize - 102, 0.5F);
|
||||
}
|
||||
if (energyUpgradeRender == null) {
|
||||
energyUpgradeRender = new GuiItemRenderer(guiLeft + 152, guiTop + ySize - 102, 0.5F, NCItems.upgrade, 1);
|
||||
energyUpgradeRender = new GuiItemRenderer(NCItems.upgrade, 1, guiLeft + 152, guiTop + ySize - 102, 0.5F);
|
||||
}
|
||||
speedUpgradeRender.draw();
|
||||
energyUpgradeRender.draw();
|
||||
|
||||
@ -75,10 +75,10 @@ public abstract class GuiItemProcessor extends NCGui {
|
||||
|
||||
protected void drawUpgradeRenderers() {
|
||||
if (speedUpgradeRender == null) {
|
||||
speedUpgradeRender = new GuiItemRenderer(guiLeft + 132, guiTop + ySize - 102, 0.5F, NCItems.upgrade, 0);
|
||||
speedUpgradeRender = new GuiItemRenderer(NCItems.upgrade, 0, guiLeft + 132, guiTop + ySize - 102, 0.5F);
|
||||
}
|
||||
if (energyUpgradeRender == null) {
|
||||
energyUpgradeRender = new GuiItemRenderer(guiLeft + 152, guiTop + ySize - 102, 0.5F, NCItems.upgrade, 1);
|
||||
energyUpgradeRender = new GuiItemRenderer(NCItems.upgrade, 1, guiLeft + 152, guiTop + ySize - 102, 0.5F);
|
||||
}
|
||||
speedUpgradeRender.draw();
|
||||
energyUpgradeRender.draw();
|
||||
|
||||
@ -44,8 +44,8 @@ public class TooltipHandler {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static void addPlacementRuleTooltip(List<String> tooltip, ItemStack stack) {
|
||||
RecipeInfo<ProcessorRecipe> recipeInfo = FissionPlacement.tooltip_recipe_handler.getRecipeInfoFromInputs(Lists.newArrayList(stack), new ArrayList<>());
|
||||
ProcessorRecipe recipe = recipeInfo == null ? null : recipeInfo.getRecipe();
|
||||
RecipeInfo<BasicRecipe> recipeInfo = FissionPlacement.tooltip_recipe_handler.getRecipeInfoFromInputs(Lists.newArrayList(stack), new ArrayList<>());
|
||||
BasicRecipe recipe = recipeInfo == null ? null : recipeInfo.getRecipe();
|
||||
if (recipe != null) {
|
||||
String rule = FissionPlacement.TOOLTIP_MAP.get(recipe.getPlacementRuleID());
|
||||
if (rule != null) {
|
||||
@ -67,16 +67,16 @@ public class TooltipHandler {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static void addRecipeTooltip(List<String> tooltip, ItemStack stack) {
|
||||
RecipeInfo<ProcessorRecipe> recipeInfo = NCRecipes.pebble_fission.getRecipeInfoFromInputs(Lists.newArrayList(stack), new ArrayList<>());
|
||||
ProcessorRecipe recipe = recipeInfo == null ? null : recipeInfo.getRecipe();
|
||||
RecipeInfo<BasicRecipe> recipeInfo = NCRecipes.pebble_fission.getRecipeInfoFromInputs(Lists.newArrayList(stack), new ArrayList<>());
|
||||
BasicRecipe recipe = recipeInfo == null ? null : recipeInfo.getRecipe();
|
||||
if (recipe != null) {
|
||||
InfoHelper.infoFull(tooltip, new TextFormatting[] {TextFormatting.UNDERLINE, TextFormatting.GREEN, TextFormatting.YELLOW, TextFormatting.LIGHT_PURPLE, TextFormatting.RED, TextFormatting.DARK_AQUA}, NCInfo.fissionFuelInfo(recipe));
|
||||
InfoHelper.infoFull(tooltip, new TextFormatting[] {TextFormatting.UNDERLINE, TextFormatting.GREEN, TextFormatting.YELLOW, TextFormatting.LIGHT_PURPLE, TextFormatting.RED, TextFormatting.GRAY, TextFormatting.DARK_AQUA}, NCInfo.fissionFuelInfo(recipe));
|
||||
}
|
||||
|
||||
recipeInfo = NCRecipes.solid_fission.getRecipeInfoFromInputs(Lists.newArrayList(stack), new ArrayList<>());
|
||||
recipe = recipeInfo == null ? null : recipeInfo.getRecipe();
|
||||
if (recipe != null) {
|
||||
InfoHelper.infoFull(tooltip, new TextFormatting[] {TextFormatting.UNDERLINE, TextFormatting.GREEN, TextFormatting.YELLOW, TextFormatting.LIGHT_PURPLE, TextFormatting.RED, TextFormatting.DARK_AQUA}, NCInfo.fissionFuelInfo(recipe));
|
||||
InfoHelper.infoFull(tooltip, new TextFormatting[] {TextFormatting.UNDERLINE, TextFormatting.GREEN, TextFormatting.YELLOW, TextFormatting.LIGHT_PURPLE, TextFormatting.RED, TextFormatting.GRAY, TextFormatting.DARK_AQUA}, NCInfo.fissionFuelInfo(recipe));
|
||||
}
|
||||
|
||||
recipeInfo = NCRecipes.fission_moderator.getRecipeInfoFromInputs(Lists.newArrayList(stack), new ArrayList<>());
|
||||
@ -100,7 +100,7 @@ public class TooltipHandler {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static void addArmorRadiationTooltip(List<String> tooltip, ItemStack stack) {
|
||||
if (!ArmorHelper.isArmor(stack.getItem(), radiation_horse_armor_public)) {
|
||||
if (stack.isEmpty() || !ArmorHelper.isArmor(stack.getItem(), radiation_horse_armor_public)) {
|
||||
return;
|
||||
}
|
||||
IRadiationResistance armorResistance = RadiationHelper.getRadiationResistance(stack);
|
||||
|
||||
@ -538,24 +538,24 @@ public class NCBlocks {
|
||||
registerBlock(heat_exchanger_casing);
|
||||
registerBlock(heat_exchanger_glass);
|
||||
registerBlock(heat_exchanger_vent);
|
||||
registerBlock(heat_exchanger_tube_copper, TextFormatting.BLUE, InfoHelper.formattedInfo(fixedLine("heat_exchanger_tube"), Math.round(100D * heat_exchanger_conductivity[0]) + "%"), TextFormatting.AQUA, InfoHelper.formattedInfo(infoLine("heat_exchanger_tube")));
|
||||
registerBlock(heat_exchanger_tube_hard_carbon, TextFormatting.BLUE, InfoHelper.formattedInfo(fixedLine("heat_exchanger_tube"), Math.round(100D * heat_exchanger_conductivity[1]) + "%"), TextFormatting.AQUA, InfoHelper.formattedInfo(infoLine("heat_exchanger_tube")));
|
||||
registerBlock(heat_exchanger_tube_thermoconducting, TextFormatting.BLUE, InfoHelper.formattedInfo(fixedLine("heat_exchanger_tube"), Math.round(100D * heat_exchanger_conductivity[2]) + "%"), TextFormatting.AQUA, InfoHelper.formattedInfo(infoLine("heat_exchanger_tube")));
|
||||
registerBlock(heat_exchanger_tube_copper, TextFormatting.BLUE, InfoHelper.formattedInfo(fixedLine("heat_exchanger_tube"), NCMath.pcDecimalPlaces(heat_exchanger_conductivity[0], 1)), TextFormatting.AQUA, InfoHelper.formattedInfo(infoLine("heat_exchanger_tube")));
|
||||
registerBlock(heat_exchanger_tube_hard_carbon, TextFormatting.BLUE, InfoHelper.formattedInfo(fixedLine("heat_exchanger_tube"), NCMath.pcDecimalPlaces(heat_exchanger_conductivity[1], 1)), TextFormatting.AQUA, InfoHelper.formattedInfo(infoLine("heat_exchanger_tube")));
|
||||
registerBlock(heat_exchanger_tube_thermoconducting, TextFormatting.BLUE, InfoHelper.formattedInfo(fixedLine("heat_exchanger_tube"), NCMath.pcDecimalPlaces(heat_exchanger_conductivity[2], 1)), TextFormatting.AQUA, InfoHelper.formattedInfo(infoLine("heat_exchanger_tube")));
|
||||
registerBlock(heat_exchanger_computer_port);
|
||||
|
||||
registerBlock(condenser_controller);
|
||||
registerBlock(condenser_tube_copper, TextFormatting.BLUE, InfoHelper.formattedInfo(fixedLine("condenser_tube"), Math.round(100D * heat_exchanger_conductivity[0]) + "%"), TextFormatting.AQUA, InfoHelper.formattedInfo(infoLine("condenser_tube")));
|
||||
registerBlock(condenser_tube_hard_carbon, TextFormatting.BLUE, InfoHelper.formattedInfo(fixedLine("condenser_tube"), Math.round(100D * heat_exchanger_conductivity[1]) + "%"), TextFormatting.AQUA, InfoHelper.formattedInfo(infoLine("condenser_tube")));
|
||||
registerBlock(condenser_tube_thermoconducting, TextFormatting.BLUE, InfoHelper.formattedInfo(fixedLine("condenser_tube"), Math.round(100D * heat_exchanger_conductivity[2]) + "%"), TextFormatting.AQUA, InfoHelper.formattedInfo(infoLine("condenser_tube")));
|
||||
registerBlock(condenser_tube_copper, TextFormatting.BLUE, InfoHelper.formattedInfo(fixedLine("condenser_tube"), NCMath.pcDecimalPlaces(heat_exchanger_conductivity[0], 1)), TextFormatting.AQUA, InfoHelper.formattedInfo(infoLine("condenser_tube")));
|
||||
registerBlock(condenser_tube_hard_carbon, TextFormatting.BLUE, InfoHelper.formattedInfo(fixedLine("condenser_tube"), NCMath.pcDecimalPlaces(heat_exchanger_conductivity[1], 1)), TextFormatting.AQUA, InfoHelper.formattedInfo(infoLine("condenser_tube")));
|
||||
registerBlock(condenser_tube_thermoconducting, TextFormatting.BLUE, InfoHelper.formattedInfo(fixedLine("condenser_tube"), NCMath.pcDecimalPlaces(heat_exchanger_conductivity[2], 1)), TextFormatting.AQUA, InfoHelper.formattedInfo(infoLine("condenser_tube")));
|
||||
|
||||
registerBlock(turbine_controller);
|
||||
registerBlock(turbine_casing);
|
||||
registerBlock(turbine_glass);
|
||||
registerBlock(turbine_rotor_shaft);
|
||||
registerBlock(turbine_rotor_blade_steel, new TextFormatting[] {TextFormatting.LIGHT_PURPLE, TextFormatting.GRAY}, new String[] {Lang.localise(fixedLine("turbine_rotor_blade_efficiency"), Math.round(100D * turbine_blade_efficiency[0]) + "%"), Lang.localise(fixedLine("turbine_rotor_blade_expansion"), Math.round(100D * turbine_blade_expansion[0]) + "%")}, TextFormatting.AQUA, InfoHelper.formattedInfo(infoLine("turbine_rotor_blade"), UnitHelper.prefix(turbine_mb_per_blade, 5, "B/t", -1)));
|
||||
registerBlock(turbine_rotor_blade_extreme, new TextFormatting[] {TextFormatting.LIGHT_PURPLE, TextFormatting.GRAY}, new String[] {Lang.localise(fixedLine("turbine_rotor_blade_efficiency"), Math.round(100D * turbine_blade_efficiency[1]) + "%"), Lang.localise(fixedLine("turbine_rotor_blade_expansion"), Math.round(100D * turbine_blade_expansion[1]) + "%")}, TextFormatting.AQUA, InfoHelper.formattedInfo(infoLine("turbine_rotor_blade"), UnitHelper.prefix(turbine_mb_per_blade, 5, "B/t", -1)));
|
||||
registerBlock(turbine_rotor_blade_sic_sic_cmc, new TextFormatting[] {TextFormatting.LIGHT_PURPLE, TextFormatting.GRAY}, new String[] {Lang.localise(fixedLine("turbine_rotor_blade_efficiency"), Math.round(100D * turbine_blade_efficiency[2]) + "%"), Lang.localise(fixedLine("turbine_rotor_blade_expansion"), Math.round(100D * turbine_blade_expansion[2]) + "%")}, TextFormatting.AQUA, InfoHelper.formattedInfo(infoLine("turbine_rotor_blade"), UnitHelper.prefix(turbine_mb_per_blade, 5, "B/t", -1)));
|
||||
registerBlock(turbine_rotor_stator, TextFormatting.GRAY, new String[] {Lang.localise(fixedLine("turbine_rotor_stator_expansion"), Math.round(100D * turbine_stator_expansion) + "%")}, TextFormatting.AQUA, InfoHelper.formattedInfo(infoLine("turbine_rotor_stator")));
|
||||
registerBlock(turbine_rotor_blade_steel, new TextFormatting[] {TextFormatting.LIGHT_PURPLE, TextFormatting.GRAY}, new String[] {Lang.localise(fixedLine("turbine_rotor_blade_efficiency"), NCMath.pcDecimalPlaces(turbine_blade_efficiency[0], 1)), Lang.localise(fixedLine("turbine_rotor_blade_expansion"), NCMath.pcDecimalPlaces(turbine_blade_expansion[0], 1))}, TextFormatting.AQUA, InfoHelper.formattedInfo(infoLine("turbine_rotor_blade"), UnitHelper.prefix(turbine_mb_per_blade, 5, "B/t", -1)));
|
||||
registerBlock(turbine_rotor_blade_extreme, new TextFormatting[] {TextFormatting.LIGHT_PURPLE, TextFormatting.GRAY}, new String[] {Lang.localise(fixedLine("turbine_rotor_blade_efficiency"), NCMath.pcDecimalPlaces(turbine_blade_efficiency[1], 1)), Lang.localise(fixedLine("turbine_rotor_blade_expansion"), NCMath.pcDecimalPlaces(turbine_blade_expansion[1], 1))}, TextFormatting.AQUA, InfoHelper.formattedInfo(infoLine("turbine_rotor_blade"), UnitHelper.prefix(turbine_mb_per_blade, 5, "B/t", -1)));
|
||||
registerBlock(turbine_rotor_blade_sic_sic_cmc, new TextFormatting[] {TextFormatting.LIGHT_PURPLE, TextFormatting.GRAY}, new String[] {Lang.localise(fixedLine("turbine_rotor_blade_efficiency"), NCMath.pcDecimalPlaces(turbine_blade_efficiency[2], 1)), Lang.localise(fixedLine("turbine_rotor_blade_expansion"), NCMath.pcDecimalPlaces(turbine_blade_expansion[2], 1))}, TextFormatting.AQUA, InfoHelper.formattedInfo(infoLine("turbine_rotor_blade"), UnitHelper.prefix(turbine_mb_per_blade, 5, "B/t", -1)));
|
||||
registerBlock(turbine_rotor_stator, TextFormatting.GRAY, new String[] {Lang.localise(fixedLine("turbine_rotor_stator_expansion"), NCMath.pcDecimalPlaces(turbine_stator_expansion, 1))}, TextFormatting.AQUA, InfoHelper.formattedInfo(infoLine("turbine_rotor_stator")));
|
||||
registerBlock(turbine_rotor_bearing);
|
||||
registerBlock(turbine_dynamo_coil, new ItemBlockMeta(turbine_dynamo_coil, TurbineDynamoCoilType.class, TextFormatting.LIGHT_PURPLE, NCInfo.dynamoCoilFixedInfo(), TextFormatting.AQUA, InfoHelper.NULL_ARRAYS));
|
||||
registerBlock(turbine_coil_connector);
|
||||
@ -582,7 +582,7 @@ public class NCBlocks {
|
||||
registerBlock(nitrogen_collector_dense, InfoHelper.formattedInfo(infoLine("nitrogen_collector"), UnitHelper.prefix(processor_passive_rate[2] * 64, 5, "B/t", -1)));
|
||||
}
|
||||
|
||||
registerBlock(radiation_scrubber, radiation_scrubber_non_linear ? InfoHelper.formattedInfo(infoLine("radiation_scrubber_non_linear"), NCMath.decimalPlaces(100D * RadiationHelper.getAltScrubbingFraction(1D), 1) + "%", Lang.localise("nuclearcraft.one_hundred_percent")) : InfoHelper.formattedInfo(infoLine("radiation_scrubber"), NCMath.decimalPlaces(100D * radiation_scrubber_fraction, 1) + "%", Lang.localise("nuclearcraft.one_hundred_percent")));
|
||||
registerBlock(radiation_scrubber, radiation_scrubber_non_linear ? InfoHelper.formattedInfo(infoLine("radiation_scrubber_non_linear"), NCMath.pcDecimalPlaces(RadiationHelper.getAltScrubbingFraction(1D), 1), Lang.localise("nuclearcraft.one_hundred_percent")) : InfoHelper.formattedInfo(infoLine("radiation_scrubber"), NCMath.pcDecimalPlaces(radiation_scrubber_fraction, 1), Lang.localise("nuclearcraft.one_hundred_percent")));
|
||||
|
||||
registerBlock(geiger_block);
|
||||
|
||||
|
||||
@ -179,8 +179,8 @@ public class NCItems {
|
||||
rad_shielding = withName(new ItemRadShielding(NCInfo.radShieldingInfo()), "rad_shielding");
|
||||
radiation_badge = withName(new ItemRadiationBadge(InfoHelper.formattedInfo(infoLine("radiation_badge"), UnitHelper.prefix(radiation_badge_durability * radiation_badge_info_rate, 3, "Rad"), UnitHelper.prefix(radiation_badge_durability, 3, "Rad"))), "radiation_badge");
|
||||
|
||||
radaway = withName(new ItemRadaway(false, InfoHelper.formattedInfo(infoLine("radaway"), RadiationHelper.radsPrefix(radiation_radaway_amount, false), Math.round(100D * radiation_radaway_amount / max_player_rads) + "%", RadiationHelper.radsPrefix(radiation_radaway_rate, true))), "radaway");
|
||||
radaway_slow = withName(new ItemRadaway(true, InfoHelper.formattedInfo(infoLine("radaway"), RadiationHelper.radsPrefix(radiation_radaway_slow_amount, false), Math.round(100D * radiation_radaway_slow_amount / max_player_rads) + "%", RadiationHelper.radsPrefix(radiation_radaway_slow_rate, true))), "radaway_slow");
|
||||
radaway = withName(new ItemRadaway(false, InfoHelper.formattedInfo(infoLine("radaway"), RadiationHelper.radsPrefix(radiation_radaway_amount, false), NCMath.pcDecimalPlaces(radiation_radaway_amount / max_player_rads, 1), RadiationHelper.radsPrefix(radiation_radaway_rate, true))), "radaway");
|
||||
radaway_slow = withName(new ItemRadaway(true, InfoHelper.formattedInfo(infoLine("radaway"), RadiationHelper.radsPrefix(radiation_radaway_slow_amount, false), NCMath.pcDecimalPlaces(radiation_radaway_slow_amount / max_player_rads, 1), RadiationHelper.radsPrefix(radiation_radaway_slow_rate, true))), "radaway_slow");
|
||||
rad_x = withName(new ItemRadX(InfoHelper.formattedInfo(infoLine("rad_x"), RadiationHelper.resistanceSigFigs(radiation_rad_x_amount), UnitHelper.applyTimeUnit(radiation_rad_x_lifetime, 2))), "rad_x");
|
||||
|
||||
portable_ender_chest = withName(new ItemPortableEnderChest(), "portable_ender_chest");
|
||||
|
||||
@ -7,12 +7,12 @@ import crafttweaker.api.item.IIngredient;
|
||||
import nc.recipe.*;
|
||||
import nc.recipe.ingredient.*;
|
||||
|
||||
public class AddProcessorRecipe implements IAction {
|
||||
public class CTAddRecipe implements IAction {
|
||||
|
||||
protected static boolean errored = false;
|
||||
|
||||
protected final ProcessorRecipeHandler recipeHandler;
|
||||
protected ProcessorRecipe recipe;
|
||||
protected final BasicRecipeHandler recipeHandler;
|
||||
protected BasicRecipe recipe;
|
||||
|
||||
protected final List<IItemIngredient> itemIngredients = new ArrayList<>();
|
||||
protected final List<IFluidIngredient> fluidIngredients = new ArrayList<>();
|
||||
@ -22,7 +22,7 @@ public class AddProcessorRecipe implements IAction {
|
||||
|
||||
protected boolean nullInputs = true, nullIngredient, nullRecipe, wrongSize;
|
||||
|
||||
public AddProcessorRecipe(ProcessorRecipeHandler recipeHandler, List objects) {
|
||||
public CTAddRecipe(BasicRecipeHandler recipeHandler, List objects) {
|
||||
this.recipeHandler = recipeHandler;
|
||||
|
||||
int count = 0;
|
||||
@ -93,7 +93,7 @@ public class AddProcessorRecipe implements IAction {
|
||||
}
|
||||
|
||||
if (itemIngredients.size() != recipeHandler.getItemInputSize() || fluidIngredients.size() != recipeHandler.getFluidInputSize() || itemProducts.size() != recipeHandler.getItemOutputSize() || fluidProducts.size() != recipeHandler.getFluidOutputSize()) {
|
||||
CraftTweakerAPI.logError("A " + recipeHandler.getRecipeName() + " recipe addition had the wrong size: " + RecipeHelper.getRecipeString(itemIngredients, fluidIngredients, itemProducts, fluidProducts));
|
||||
CraftTweakerAPI.logError("A " + recipeHandler.getName() + " recipe addition had the wrong size: " + RecipeHelper.getRecipeString(itemIngredients, fluidIngredients, itemProducts, fluidProducts));
|
||||
wrongSize = true;
|
||||
return;
|
||||
}
|
||||
@ -115,12 +115,12 @@ public class AddProcessorRecipe implements IAction {
|
||||
public String describe() {
|
||||
String recipeString = RecipeHelper.getRecipeString(itemIngredients, fluidIngredients, itemProducts, fluidProducts);
|
||||
if (!isError()) {
|
||||
return "Adding " + recipeHandler.getRecipeName() + " recipe: " + recipeString;
|
||||
return "Adding " + recipeHandler.getName() + " recipe: " + recipeString;
|
||||
}
|
||||
else {
|
||||
callError();
|
||||
|
||||
String out = "Failed to add " + recipeHandler.getRecipeName() + " recipe " + recipeString;
|
||||
String out = "Failed to add " + recipeHandler.getName() + " recipe " + recipeString;
|
||||
|
||||
if (nullInputs) {
|
||||
return out + " as all ingredients were null";
|
||||
@ -1,13 +1,13 @@
|
||||
package nc.integration.crafttweaker;
|
||||
|
||||
import crafttweaker.IAction;
|
||||
import nc.recipe.ProcessorRecipeHandler;
|
||||
import nc.recipe.BasicRecipeHandler;
|
||||
|
||||
public class RemoveAllProcessorRecipes implements IAction {
|
||||
public class CTClearRecipes implements IAction {
|
||||
|
||||
protected final ProcessorRecipeHandler recipeHandler;
|
||||
protected final BasicRecipeHandler recipeHandler;
|
||||
|
||||
public RemoveAllProcessorRecipes(ProcessorRecipeHandler recipeHandler) {
|
||||
public CTClearRecipes(BasicRecipeHandler recipeHandler) {
|
||||
this.recipeHandler = recipeHandler;
|
||||
}
|
||||
|
||||
@ -18,6 +18,6 @@ public class RemoveAllProcessorRecipes implements IAction {
|
||||
|
||||
@Override
|
||||
public String describe() {
|
||||
return String.format("Removed all %s recipes", recipeHandler.getRecipeName());
|
||||
return String.format("Removed all %s recipes", recipeHandler.getName());
|
||||
}
|
||||
}
|
||||
298
src/main/java/nc/integration/crafttweaker/CTRadiation.java
Normal file
298
src/main/java/nc/integration/crafttweaker/CTRadiation.java
Normal file
@ -0,0 +1,298 @@
|
||||
package nc.integration.crafttweaker;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import crafttweaker.CraftTweakerAPI;
|
||||
import crafttweaker.annotations.ZenRegister;
|
||||
import crafttweaker.api.entity.IEntityLivingBase;
|
||||
import crafttweaker.api.item.*;
|
||||
import crafttweaker.api.item.IIngredient;
|
||||
import crafttweaker.api.liquid.ILiquidStack;
|
||||
import crafttweaker.api.minecraft.CraftTweakerMC;
|
||||
import crafttweaker.api.oredict.IOreDictEntry;
|
||||
import nc.capability.radiation.entity.IEntityRads;
|
||||
import nc.radiation.*;
|
||||
import nc.recipe.ingredient.*;
|
||||
import net.minecraft.client.util.RecipeItemHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import stanhebben.zenscript.annotations.*;
|
||||
|
||||
public class CTRadiation {
|
||||
|
||||
@ZenClass("mods.nuclearcraft.Radiation")
|
||||
@ZenRegister
|
||||
public static class RadiationMethods {
|
||||
|
||||
@ZenMethod
|
||||
public static double getRadiationLevel(IIngredient ingredient) {
|
||||
if (ingredient == null) {
|
||||
return 0D;
|
||||
}
|
||||
else if (ingredient instanceof IItemStack) {
|
||||
ItemStack stack = CTHelper.getItemStack((IItemStack) ingredient);
|
||||
return stack.isEmpty() ? 0D : RadSources.STACK_MAP.get(RecipeItemHelper.pack(stack)) * stack.getCount();
|
||||
}
|
||||
else if (ingredient instanceof IOreDictEntry) {
|
||||
IOreDictEntry ore = (IOreDictEntry) ingredient;
|
||||
return RadSources.ORE_MAP.getDouble(ore.getName()) * ore.getAmount();
|
||||
}
|
||||
else if (ingredient instanceof IngredientStack) {
|
||||
IItemIngredient i = CTHelper.buildOreIngredientArray(ingredient, true);
|
||||
if (i instanceof OreIngredient) {
|
||||
OreIngredient ore = (OreIngredient) i;
|
||||
return RadSources.ORE_MAP.getDouble(ore.oreName) * ore.stackSize;
|
||||
}
|
||||
else {
|
||||
ItemStack stack = i.getStack();
|
||||
return stack == null || stack.isEmpty() ? 0D : RadSources.STACK_MAP.get(RecipeItemHelper.pack(stack)) * stack.getCount();
|
||||
}
|
||||
}
|
||||
else if (ingredient instanceof ILiquidStack) {
|
||||
FluidStack stack = CTHelper.getFluidStack((ILiquidStack) ingredient);
|
||||
return stack == null ? 0D : RadiationHelper.getRadiationFromFluid(stack, 1D);
|
||||
}
|
||||
else {
|
||||
return 0D;
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addToRadiationBlacklist(IIngredient ingredient) {
|
||||
boolean success = false;
|
||||
if (ingredient instanceof IItemStack) {
|
||||
RadSources.RUNNABLES.add(() -> RadSources.addToStackBlacklist(CTHelper.getItemStack((IItemStack) ingredient)));
|
||||
success = true;
|
||||
}
|
||||
else if (ingredient instanceof IOreDictEntry) {
|
||||
RadSources.RUNNABLES.add(() -> RadSources.addToOreBlacklist(((IOreDictEntry) ingredient).getName()));
|
||||
success = true;
|
||||
}
|
||||
else if (ingredient instanceof IngredientStack) {
|
||||
IItemIngredient i = CTHelper.buildOreIngredientArray(ingredient, true);
|
||||
if (i instanceof OreIngredient) {
|
||||
RadSources.RUNNABLES.add(() -> RadSources.addToOreBlacklist(((OreIngredient) i).oreName));
|
||||
success = true;
|
||||
}
|
||||
else if (i.getStack() != null) {
|
||||
RadSources.RUNNABLES.add(() -> RadSources.addToStackBlacklist(i.getStack()));
|
||||
success = true;
|
||||
}
|
||||
}
|
||||
else if (ingredient instanceof ILiquidStack) {
|
||||
FluidStack stack = CTHelper.getFluidStack((ILiquidStack) ingredient);
|
||||
if (stack != null && stack.getFluid() != null) {
|
||||
RadSources.RUNNABLES.add(() -> RadSources.addToFluidBlacklist(stack.getFluid().getName()));
|
||||
success = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (success) {
|
||||
CraftTweakerAPI.logInfo("Added " + ingredient.toCommandString() + " to radiation blacklist");
|
||||
}
|
||||
else {
|
||||
if (ingredient == null) {
|
||||
CraftTweakerAPI.logError("Attempted to add null ingredient to radiation blacklist");
|
||||
}
|
||||
else {
|
||||
CraftTweakerAPI.logError("Failed to add " + ingredient.toCommandString() + " to radiation blacklist");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void setRadiationLevel(IIngredient ingredient, double radiation) {
|
||||
boolean success = false;
|
||||
if (ingredient instanceof IItemStack) {
|
||||
RadSources.RUNNABLES.add(() -> RadSources.addToStackMap(CTHelper.getItemStack((IItemStack) ingredient), radiation));
|
||||
success = true;
|
||||
}
|
||||
else if (ingredient instanceof IOreDictEntry) {
|
||||
RadSources.RUNNABLES.add(() -> RadSources.addToOreMap(((IOreDictEntry) ingredient).getName(), radiation));
|
||||
success = true;
|
||||
}
|
||||
else if (ingredient instanceof IngredientStack) {
|
||||
IItemIngredient i = CTHelper.buildOreIngredientArray(ingredient, true);
|
||||
if (i instanceof OreIngredient) {
|
||||
RadSources.RUNNABLES.add(() -> RadSources.addToOreMap(((OreIngredient) i).oreName, radiation));
|
||||
success = true;
|
||||
}
|
||||
else if (i.getStack() != null) {
|
||||
RadSources.RUNNABLES.add(() -> RadSources.addToStackMap(i.getStack(), radiation));
|
||||
success = true;
|
||||
}
|
||||
}
|
||||
else if (ingredient instanceof ILiquidStack) {
|
||||
FluidStack stack = CTHelper.getFluidStack((ILiquidStack) ingredient);
|
||||
if (stack != null && stack.getFluid() != null) {
|
||||
RadSources.RUNNABLES.add(() -> RadSources.addToFluidMap(stack.getFluid().getName(), radiation));
|
||||
success = true;
|
||||
}
|
||||
}
|
||||
|
||||
String rads = RadiationHelper.radsPrefix(radiation, true);
|
||||
if (success) {
|
||||
CraftTweakerAPI.logInfo("Set the radiation level of " + ingredient.toCommandString() + " to " + rads);
|
||||
}
|
||||
else {
|
||||
if (ingredient == null) {
|
||||
CraftTweakerAPI.logError("Attempted to set the radiation level of a null ingredient to " + rads);
|
||||
}
|
||||
else {
|
||||
CraftTweakerAPI.logError("Failed to set the radiation level of " + ingredient.toCommandString() + " to " + rads);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void setMaterialRadiationLevel(String oreSuffix, double radiation) {
|
||||
String rads = RadiationHelper.radsPrefix(radiation, true);
|
||||
if (oreSuffix == null) {
|
||||
CraftTweakerAPI.logError("Attempted to set the material radiation level for a null ore dictionary suffix to " + rads);
|
||||
}
|
||||
else {
|
||||
RadSources.RUNNABLES.add(() -> RadSources.putMaterial(radiation, oreSuffix));
|
||||
CraftTweakerAPI.logInfo("Set the material radiation level for the ore suffix \"" + oreSuffix + "\" to " + rads);
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void setFoodRadiationStats(IItemStack food, double radiation, double resistance) {
|
||||
String rads = RadiationHelper.radsPrefix(radiation, true);
|
||||
String res = RadiationHelper.resistanceSigFigs(resistance);
|
||||
if (food == null) {
|
||||
CraftTweakerAPI.logError("Attempted to set the food radiation and resistance levels of a null ingredient to " + rads + " and " + res + ", respectively");
|
||||
}
|
||||
else {
|
||||
RadSources.RUNNABLES.add(() -> RadSources.addToFoodMaps(CTHelper.getItemStack(food), radiation, resistance));
|
||||
CraftTweakerAPI.logInfo("Set the food radiation and resistance levels of " + food.toCommandString() + " to " + rads + " and " + res + ", respectively");
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void setRadiationImmunityGameStages(boolean defaultImmunity, String... stageNames) {
|
||||
nc.radiation.RadiationHandler.default_rad_immunity = defaultImmunity;
|
||||
nc.radiation.RadiationHandler.rad_immunity_stages = stageNames;
|
||||
CraftTweakerAPI.logInfo("Added radiation immunity game stages " + Lists.newArrayList(stageNames).toString() + ", with immunity " + (defaultImmunity ? "enabled" : "disabled") + " by default");
|
||||
}
|
||||
}
|
||||
|
||||
@ZenRegister
|
||||
@ZenExpansion("crafttweaker.entity.IEntityLivingBase")
|
||||
public static class EntityExpansion {
|
||||
|
||||
@ZenMethod
|
||||
public static void addRadiation(IEntityLivingBase entity, double amount, @Optional boolean useImmunity) {
|
||||
IEntityRads rads = entityRads(entity);
|
||||
if (rads != null) {
|
||||
rads.setTotalRads(rads.getTotalRads() + amount, useImmunity);
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void setRadiation(IEntityLivingBase entity, double amount, @Optional boolean useImmunity) {
|
||||
IEntityRads rads = entityRads(entity);
|
||||
if (rads != null) {
|
||||
rads.setTotalRads(amount, useImmunity);
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static double getRadiation(IEntityLivingBase entity) {
|
||||
IEntityRads rads = entityRads(entity);
|
||||
return rads == null ? 0D : rads.getTotalRads();
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addRadawayBuffer(IEntityLivingBase entity, double amount, @Optional boolean slow) {
|
||||
IEntityRads rads = entityRads(entity);
|
||||
if (rads != null) {
|
||||
rads.setRadawayBuffer(slow, rads.getRadawayBuffer(slow) + amount);
|
||||
if (!slow) {
|
||||
rads.setRecentRadawayAddition(Math.abs(amount));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void setRadawayBuffer(IEntityLivingBase entity, double amount, @Optional boolean slow) {
|
||||
IEntityRads rads = entityRads(entity);
|
||||
if (rads != null) {
|
||||
rads.setRadawayBuffer(slow, amount);
|
||||
if (!slow) {
|
||||
rads.setRecentRadawayAddition(Math.abs(amount));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static double getRadawayBuffer(IEntityLivingBase entity, @Optional boolean slow) {
|
||||
IEntityRads rads = entityRads(entity);
|
||||
return rads == null ? 0D : rads.getRadawayBuffer(slow);
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addPoisonBuffer(IEntityLivingBase entity, double amount) {
|
||||
IEntityRads rads = entityRads(entity);
|
||||
if (rads != null) {
|
||||
rads.setPoisonBuffer(rads.getPoisonBuffer() + amount);
|
||||
rads.setRecentPoisonAddition(Math.abs(amount));
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void setPoisonBuffer(IEntityLivingBase entity, double amount) {
|
||||
IEntityRads rads = entityRads(entity);
|
||||
if (rads != null) {
|
||||
rads.setPoisonBuffer(amount);
|
||||
rads.setRecentPoisonAddition(Math.abs(amount));
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static double getPoisonBuffer(IEntityLivingBase entity) {
|
||||
IEntityRads rads = entityRads(entity);
|
||||
return rads == null ? 0D : rads.getPoisonBuffer();
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addRadiationResistance(IEntityLivingBase entity, double amount) {
|
||||
IEntityRads rads = entityRads(entity);
|
||||
if (rads != null) {
|
||||
rads.setInternalRadiationResistance(rads.getInternalRadiationResistance() + amount);
|
||||
rads.setRecentRadXAddition(Math.abs(amount));
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void setRadiationResistance(IEntityLivingBase entity, double amount) {
|
||||
IEntityRads rads = entityRads(entity);
|
||||
if (rads != null) {
|
||||
rads.setInternalRadiationResistance(amount);
|
||||
rads.setRecentRadXAddition(Math.abs(amount));
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static double getRadiationResistance(IEntityLivingBase entity) {
|
||||
IEntityRads rads = entityRads(entity);
|
||||
return rads == null ? 0D : rads.getInternalRadiationResistance();
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static double getRawRadiationLevel(IEntityLivingBase entity) {
|
||||
IEntityRads rads = entityRads(entity);
|
||||
return rads == null ? 0D : rads.getRawRadiationLevel();
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static double getRadiationLevel(IEntityLivingBase entity) {
|
||||
IEntityRads rads = entityRads(entity);
|
||||
return rads == null ? 0D : rads.getRadiationLevel();
|
||||
}
|
||||
|
||||
private static IEntityRads entityRads(IEntityLivingBase entity) {
|
||||
return RadiationHelper.getEntityRadiation(CraftTweakerMC.getEntityLivingBase(entity));
|
||||
}
|
||||
}
|
||||
}
|
||||
1055
src/main/java/nc/integration/crafttweaker/CTRecipes.java
Normal file
1055
src/main/java/nc/integration/crafttweaker/CTRecipes.java
Normal file
File diff suppressed because it is too large
Load Diff
@ -336,7 +336,7 @@ public class CTRegistration {
|
||||
|
||||
@Override
|
||||
public void registerBlock() {
|
||||
NCBlocks.registerBlock(block, TextFormatting.LIGHT_PURPLE, new String[] {Lang.localise("tile." + Global.MOD_ID + ".turbine_dynamo_coil.conductivity") + " " + NCMath.decimalPlaces(100D * conductivity, 1) + "%"}, TextFormatting.AQUA, InfoHelper.NULL_ARRAY);
|
||||
NCBlocks.registerBlock(block, TextFormatting.LIGHT_PURPLE, new String[] {Lang.localise("tile." + Global.MOD_ID + ".turbine_dynamo_coil.conductivity") + " " + NCMath.pcDecimalPlaces(conductivity, 1)}, TextFormatting.AQUA, InfoHelper.NULL_ARRAY);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -358,7 +358,7 @@ public class CTRegistration {
|
||||
|
||||
@Override
|
||||
public void registerBlock() {
|
||||
NCBlocks.registerBlock(block, new TextFormatting[] {TextFormatting.LIGHT_PURPLE, TextFormatting.GRAY}, new String[] {Lang.localise(NCBlocks.fixedLine("turbine_rotor_blade_efficiency"), Math.round(100D * efficiency) + "%"), Lang.localise(NCBlocks.fixedLine("turbine_rotor_blade_expansion"), Math.round(100D * expansionCoefficient) + "%")}, TextFormatting.AQUA, InfoHelper.formattedInfo(NCBlocks.infoLine("turbine_rotor_blade"), UnitHelper.prefix(turbine_mb_per_blade, 5, "B/t", -1)));
|
||||
NCBlocks.registerBlock(block, new TextFormatting[] {TextFormatting.LIGHT_PURPLE, TextFormatting.GRAY}, new String[] {Lang.localise(NCBlocks.fixedLine("turbine_rotor_blade_efficiency"), NCMath.pcDecimalPlaces(efficiency, 1)), Lang.localise(NCBlocks.fixedLine("turbine_rotor_blade_expansion"), NCMath.pcDecimalPlaces(expansionCoefficient, 1))}, TextFormatting.AQUA, InfoHelper.formattedInfo(NCBlocks.infoLine("turbine_rotor_blade"), UnitHelper.prefix(turbine_mb_per_blade, 5, "B/t", -1)));
|
||||
}
|
||||
}
|
||||
|
||||
@ -373,7 +373,7 @@ public class CTRegistration {
|
||||
|
||||
@Override
|
||||
public void registerBlock() {
|
||||
NCBlocks.registerBlock(block, TextFormatting.GRAY, new String[] {Lang.localise(NCBlocks.fixedLine("turbine_rotor_stator_expansion"), Math.round(100D * expansionCoefficient) + "%")}, TextFormatting.AQUA, InfoHelper.formattedInfo(NCBlocks.infoLine("turbine_rotor_stator")));
|
||||
NCBlocks.registerBlock(block, TextFormatting.GRAY, new String[] {Lang.localise(NCBlocks.fixedLine("turbine_rotor_stator_expansion"), NCMath.pcDecimalPlaces(expansionCoefficient, 1))}, TextFormatting.AQUA, InfoHelper.formattedInfo(NCBlocks.infoLine("turbine_rotor_stator")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,20 +9,20 @@ import crafttweaker.api.item.IIngredient;
|
||||
import nc.recipe.*;
|
||||
import nc.recipe.ingredient.*;
|
||||
|
||||
public class RemoveProcessorRecipe implements IAction {
|
||||
public class CTRemoveRecipe implements IAction {
|
||||
|
||||
protected static boolean errored = false;
|
||||
|
||||
protected final ProcessorRecipeHandler recipeHandler;
|
||||
protected final BasicRecipeHandler recipeHandler;
|
||||
protected final IngredientSorption type;
|
||||
protected ProcessorRecipe recipe;
|
||||
protected BasicRecipe recipe;
|
||||
|
||||
protected final List<IItemIngredient> itemIngredients = new ArrayList<>();
|
||||
protected final List<IFluidIngredient> fluidIngredients = new ArrayList<>();
|
||||
|
||||
protected boolean nullIngredient, nullRecipe, wrongSize;
|
||||
|
||||
public RemoveProcessorRecipe(ProcessorRecipeHandler recipeHandler, IngredientSorption type, List<IIngredient> ctIngredients) {
|
||||
public CTRemoveRecipe(BasicRecipeHandler recipeHandler, IngredientSorption type, List<IIngredient> ctIngredients) {
|
||||
this.recipeHandler = recipeHandler;
|
||||
this.type = type;
|
||||
|
||||
@ -47,7 +47,7 @@ public class RemoveProcessorRecipe implements IAction {
|
||||
}
|
||||
|
||||
if (ctIngredients.size() != itemSize + fluidSize) {
|
||||
CraftTweakerAPI.logError("A " + recipeHandler.getRecipeName() + " recipe removal had the wrong number of " + (type == INPUT ? "inputs" : "outputs") + ": " + RecipeHelper.getAllIngredientNamesConcat(itemIngredients, fluidIngredients));
|
||||
CraftTweakerAPI.logError("A " + recipeHandler.getName() + " recipe removal had the wrong number of " + (type == INPUT ? "inputs" : "outputs") + ": " + RecipeHelper.getAllIngredientNamesConcat(itemIngredients, fluidIngredients));
|
||||
wrongSize = true;
|
||||
return;
|
||||
}
|
||||
@ -71,16 +71,16 @@ public class RemoveProcessorRecipe implements IAction {
|
||||
public String describe() {
|
||||
if (!isError()) {
|
||||
if (type == INPUT) {
|
||||
return "Removing " + recipeHandler.getRecipeName() + " recipe: " + RecipeHelper.getRecipeString(recipe);
|
||||
return "Removing " + recipeHandler.getName() + " recipe: " + RecipeHelper.getRecipeString(recipe);
|
||||
}
|
||||
else {
|
||||
return "Removing " + recipeHandler.getRecipeName() + " recipes for: " + RecipeHelper.getAllIngredientNamesConcat(itemIngredients, fluidIngredients);
|
||||
return "Removing " + recipeHandler.getName() + " recipes for: " + RecipeHelper.getAllIngredientNamesConcat(itemIngredients, fluidIngredients);
|
||||
}
|
||||
}
|
||||
else {
|
||||
callError();
|
||||
|
||||
String out = "Failed to remove " + recipeHandler.getRecipeName() + " recipe with " + RecipeHelper.getAllIngredientNamesConcat(itemIngredients, fluidIngredients) + " as the " + (type == INPUT ? "input" : "output");
|
||||
String out = "Failed to remove " + recipeHandler.getName() + " recipe with " + RecipeHelper.getAllIngredientNamesConcat(itemIngredients, fluidIngredients) + " as the " + (type == INPUT ? "input" : "output");
|
||||
|
||||
if (nullIngredient) {
|
||||
return out + " as one or more " + (type == INPUT ? "ingredients" : "products") + " had no match";
|
||||
File diff suppressed because it is too large
Load Diff
@ -21,7 +21,7 @@ public class GTCERecipeHelper {
|
||||
|
||||
// Thanks so much to Firew0lf for the original method!
|
||||
@Optional.Method(modid = "gregtech")
|
||||
public static void addGTCERecipe(String recipeName, ProcessorRecipe recipe) {
|
||||
public static void addGTCERecipe(String recipeName, BasicRecipe recipe) {
|
||||
RecipeMap<?> recipeMap = null;
|
||||
RecipeBuilder<?> builder = null;
|
||||
|
||||
@ -250,7 +250,7 @@ public class GTCERecipeHelper {
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "gregtech")
|
||||
private static RecipeBuilder<?> addStats(RecipeBuilder<?> builder, ProcessorRecipe recipe, int processPower, int processTime) {
|
||||
private static RecipeBuilder<?> addStats(RecipeBuilder<?> builder, BasicRecipe recipe, int processPower, int processTime) {
|
||||
return builder.EUt(Math.max((int) recipe.getBaseProcessPower(processPower), 1)).duration((int) recipe.getBaseProcessTime(20D * processTime));
|
||||
}
|
||||
|
||||
@ -325,12 +325,12 @@ public class GTCERecipeHelper {
|
||||
return true;
|
||||
}
|
||||
|
||||
private static boolean isPlateRecipe(ProcessorRecipe recipe) {
|
||||
private static boolean isPlateRecipe(BasicRecipe recipe) {
|
||||
ItemStack output = recipe.getItemProducts().get(0).getStack();
|
||||
return output != null && OreDictHelper.hasOrePrefix(output, "plate", "plateDense");
|
||||
}
|
||||
|
||||
private static MetaValueItem getIngotFormerMold(ProcessorRecipe recipe) {
|
||||
private static MetaValueItem getIngotFormerMold(BasicRecipe recipe) {
|
||||
ItemStack output = recipe.getItemProducts().get(0).getStack();
|
||||
if (output != null) {
|
||||
if (OreDictHelper.hasOrePrefix(output, "ingot")) {
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
package nc.integration.jei;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import nc.recipe.ProcessorRecipeHandler;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IJEIHandler {
|
||||
|
||||
public JEICategoryAbstract getCategory(IGuiHelper guiHelper);
|
||||
|
||||
public ProcessorRecipeHandler getRecipeHandler();
|
||||
|
||||
public Class<? extends JEIRecipeWrapperAbstract> getJEIRecipeWrapper();
|
||||
|
||||
public ArrayList<JEIRecipeWrapperAbstract> getJEIRecipes(IGuiHelper guiHelper);
|
||||
|
||||
public String getUUID();
|
||||
|
||||
public boolean getEnabled();
|
||||
|
||||
public List<ItemStack> getCrafters();
|
||||
|
||||
public String getTextureName();
|
||||
}
|
||||
@ -4,12 +4,13 @@ import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.recipe.*;
|
||||
import nc.Global;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
|
||||
public abstract class JEICategoryAbstract<WRAPPER extends JEIRecipeWrapperAbstract> extends BlankRecipeCategory<WRAPPER> implements IRecipeHandler<WRAPPER> {
|
||||
public abstract class JEIBasicCategory<WRAPPER extends JEIBasicRecipeWrapper> extends BlankRecipeCategory<WRAPPER> implements IRecipeHandler<WRAPPER> {
|
||||
|
||||
protected final IJEIHandler jeiHandler;
|
||||
|
||||
public JEICategoryAbstract(IJEIHandler jeiHandler) {
|
||||
public JEIBasicCategory(IJEIHandler<WRAPPER> jeiHandler) {
|
||||
this.jeiHandler = jeiHandler;
|
||||
}
|
||||
|
||||
@ -25,26 +26,26 @@ public abstract class JEICategoryAbstract<WRAPPER extends JEIRecipeWrapperAbstra
|
||||
|
||||
@Override
|
||||
public String getUid() {
|
||||
return jeiHandler.getUUID();
|
||||
return jeiHandler.getUid();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class getRecipeClass() {
|
||||
return jeiHandler.getJEIRecipeWrapper();
|
||||
return jeiHandler.getRecipeWrapperClass();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(JEIRecipeWrapperAbstract recipeWrapper) {
|
||||
public IRecipeWrapper getRecipeWrapper(WRAPPER recipeWrapper) {
|
||||
return recipeWrapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRecipeValid(JEIRecipeWrapperAbstract recipeWrapper) {
|
||||
return recipeWrapper.recipeHandler.getRecipeName().equals(getUid());
|
||||
public boolean isRecipeValid(WRAPPER recipeWrapper) {
|
||||
return getUid().equals(Global.MOD_ID + "_" + recipeWrapper.recipeHandler.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeCategoryUid(JEIRecipeWrapperAbstract recipeWrapper) {
|
||||
public String getRecipeCategoryUid(WRAPPER recipeWrapper) {
|
||||
return getUid();
|
||||
}
|
||||
}
|
||||
@ -7,43 +7,38 @@ import mezz.jei.api.gui.*;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import nc.Global;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.*;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public abstract class JEIRecipeWrapperAbstract<T extends JEIRecipeWrapperAbstract> implements IRecipeWrapper {
|
||||
public abstract class JEIBasicRecipeWrapper implements IRecipeWrapper {
|
||||
|
||||
public final ProcessorRecipeHandler recipeHandler;
|
||||
public final ProcessorRecipe recipe;
|
||||
public final BasicRecipeHandler recipeHandler;
|
||||
public final BasicRecipe recipe;
|
||||
|
||||
public final List<List<ItemStack>> itemInputs;
|
||||
public final List<List<FluidStack>> fluidInputs;
|
||||
|
||||
public List<List<ItemStack>> itemOutputs;
|
||||
public List<List<FluidStack>> fluidOutputs;
|
||||
public final List<List<ItemStack>> itemOutputs;
|
||||
public final List<List<FluidStack>> fluidOutputs;
|
||||
|
||||
public final boolean drawArrow;
|
||||
public final IDrawable arrow;
|
||||
public final int arrowDrawPosX, arrowDrawPosY;
|
||||
|
||||
public JEIRecipeWrapperAbstract(IGuiHelper guiHelper, IJEIHandler handler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe, int backX, int backY, int arrowX, int arrowY, int arrowWidth, int arrowHeight, int arrowPosX, int arrowPosY) {
|
||||
this(guiHelper, handler, recipeHandler, recipe, "", backX, backY, arrowX, arrowY, arrowWidth, arrowHeight, arrowPosX, arrowPosY);
|
||||
}
|
||||
|
||||
public JEIRecipeWrapperAbstract(IGuiHelper guiHelper, IJEIHandler handler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe, String guiExtra, int backX, int backY, int arrowX, int arrowY, int arrowWidth, int arrowHeight, int arrowPosX, int arrowPosY) {
|
||||
public JEIBasicRecipeWrapper(IGuiHelper guiHelper, IJEIHandler handler, BasicRecipeHandler recipeHandler, BasicRecipe recipe, int backX, int backY, int arrowX, int arrowY, int arrowWidth, int arrowHeight, int arrowPosX, int arrowPosY) {
|
||||
this.recipeHandler = recipeHandler;
|
||||
this.recipe = recipe;
|
||||
|
||||
itemInputs = RecipeHelper.getItemInputLists(recipe.getItemIngredients());
|
||||
fluidInputs = RecipeHelper.getFluidInputLists(recipe.getFluidIngredients());
|
||||
|
||||
itemOutputs = RecipeHelper.getItemOutputLists(recipe.getItemProducts());
|
||||
fluidOutputs = RecipeHelper.getFluidOutputLists(recipe.getFluidProducts());
|
||||
|
||||
this.drawArrow = arrowWidth > 0 && arrowHeight > 0;
|
||||
ResourceLocation location = new ResourceLocation(Global.MOD_ID + ":textures/gui/container/" + handler.getTextureName() + guiExtra + ".png");
|
||||
ResourceLocation location = new ResourceLocation(Global.MOD_ID + ":textures/gui/container/" + handler.getTextureName() + ".png");
|
||||
IDrawableStatic arrowDrawable = guiHelper.createDrawable(location, arrowX, arrowY, Math.max(arrowWidth, 1), Math.max(arrowHeight, 1));
|
||||
arrow = staticArrow() ? arrowDrawable : guiHelper.createAnimatedDrawable(arrowDrawable, getProgressArrowTime(), IDrawableAnimated.StartDirection.LEFT, false);
|
||||
arrowDrawPosX = arrowPosX - backX;
|
||||
@ -67,7 +62,7 @@ public abstract class JEIRecipeWrapperAbstract<T extends JEIRecipeWrapperAbstrac
|
||||
}
|
||||
}
|
||||
|
||||
private boolean staticArrow() {
|
||||
protected boolean staticArrow() {
|
||||
return getProgressArrowTime() < 2 /* || (factor_recipes && itemInputs.isEmpty() && itemOutputs.isEmpty() && getProgressArrowTime() < 4) */;
|
||||
}
|
||||
|
||||
@ -7,21 +7,23 @@ import it.unimi.dsi.fastutil.objects.*;
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.*;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.*;
|
||||
import nc.util.NCUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public class JEIMethods {
|
||||
public class JEIHelper {
|
||||
|
||||
public static ArrayList<JEIRecipeWrapperAbstract> getJEIRecipes(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, Class<? extends JEIRecipeWrapperAbstract> recipeWrapper) {
|
||||
ArrayList<JEIRecipeWrapperAbstract> recipes = new ArrayList();
|
||||
public static List<JEIBasicRecipeWrapper> getJEIRecipes(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, Class<? extends JEIBasicRecipeWrapper> recipeWrapper) {
|
||||
ArrayList<JEIBasicRecipeWrapper> recipes = new ArrayList<>();
|
||||
if (recipeHandler != null) {
|
||||
for (ProcessorRecipe recipe : recipeHandler.getRecipeList()) {
|
||||
for (BasicRecipe recipe : recipeHandler.getRecipeList()) {
|
||||
try {
|
||||
recipes.add(recipeWrapper.getConstructor(IGuiHelper.class, IJEIHandler.class, ProcessorRecipeHandler.class, ProcessorRecipe.class).newInstance(guiHelper, jeiHandler, recipeHandler, recipe));
|
||||
recipes.add(recipeWrapper.getConstructor(IGuiHelper.class, IJEIHandler.class, BasicRecipeHandler.class, BasicRecipe.class).newInstance(guiHelper, jeiHandler, recipeHandler, recipe));
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
NCUtil.getLogger().catching(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -102,7 +104,7 @@ public class JEIMethods {
|
||||
}
|
||||
}
|
||||
|
||||
public static class RecipeItemMapping {
|
||||
protected static class RecipeItemMapping {
|
||||
|
||||
public int slotPos, xPos, yPos;
|
||||
|
||||
@ -113,7 +115,7 @@ public class JEIMethods {
|
||||
}
|
||||
}
|
||||
|
||||
public static class RecipeFluidMapping {
|
||||
protected static class RecipeFluidMapping {
|
||||
|
||||
public int slotPos, xPos, yPos, xSize, ySize;
|
||||
|
||||
@ -4,27 +4,24 @@ import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.*;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.Global;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.ingredient.*;
|
||||
import nc.util.*;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
|
||||
public abstract class JEICategoryProcessor<WRAPPER extends JEIRecipeWrapperAbstract> extends JEICategoryAbstract<WRAPPER> {
|
||||
public abstract class JEIMachineCategory<WRAPPER extends JEIBasicRecipeWrapper> extends JEIBasicCategory<WRAPPER> {
|
||||
|
||||
private final IDrawable background;
|
||||
protected String recipeTitle;
|
||||
protected final IDrawable background;
|
||||
protected final String title;
|
||||
protected final int backPosX, backPosY;
|
||||
|
||||
public JEICategoryProcessor(IGuiHelper guiHelper, IJEIHandler handler, String title, int backX, int backY, int backWidth, int backHeight) {
|
||||
this(guiHelper, handler, title, "", backX, backY, backWidth, backHeight);
|
||||
}
|
||||
|
||||
public JEICategoryProcessor(IGuiHelper guiHelper, IJEIHandler handler, String title, String guiExtra, int backX, int backY, int backWidth, int backHeight) {
|
||||
public JEIMachineCategory(IGuiHelper guiHelper, IJEIHandler handler, String blockName, int backX, int backY, int backWidth, int backHeight) {
|
||||
super(handler);
|
||||
ResourceLocation location = new ResourceLocation(Global.MOD_ID + ":textures/gui/container/" + handler.getTextureName() + guiExtra + ".png");
|
||||
ResourceLocation location = new ResourceLocation(Global.MOD_ID + ":textures/gui/container/" + handler.getTextureName() + ".png");
|
||||
background = guiHelper.createDrawable(location, backX, backY, backWidth, backHeight);
|
||||
recipeTitle = Lang.localise("tile." + Global.MOD_ID + "." + title + ".name");
|
||||
title = Lang.localise("tile." + Global.MOD_ID + "." + blockName + ".name");
|
||||
backPosX = backX + 1;
|
||||
backPosY = backY + 1;
|
||||
}
|
||||
@ -60,6 +57,6 @@ public abstract class JEICategoryProcessor<WRAPPER extends JEIRecipeWrapperAbstr
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return recipeTitle;
|
||||
return title;
|
||||
}
|
||||
}
|
||||
@ -3,16 +3,17 @@ package nc.integration.jei;
|
||||
import java.util.*;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.radiation.RadiationHelper;
|
||||
import nc.recipe.*;
|
||||
import nc.util.*;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
|
||||
public abstract class JEIRecipeWrapperProcessor<T extends JEIRecipeWrapperProcessor> extends JEIRecipeWrapperAbstract<T> {
|
||||
public abstract class JEIMachineRecipeWrapper extends JEIBasicRecipeWrapper {
|
||||
|
||||
private final int infoX, infoY, infoWidth, infoHeight;
|
||||
|
||||
public JEIRecipeWrapperProcessor(IGuiHelper guiHelper, IJEIHandler handler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe, int backX, int backY, int arrowX, int arrowY, int arrowWidth, int arrowHeight, int arrowPosX, int arrowPosY, int infoX, int infoY, int infoWidth, int infoHeight) {
|
||||
public JEIMachineRecipeWrapper(IGuiHelper guiHelper, IJEIHandler handler, BasicRecipeHandler recipeHandler, BasicRecipe recipe, int backX, int backY, int arrowX, int arrowY, int arrowWidth, int arrowHeight, int arrowPosX, int arrowPosY, int infoX, int infoY, int infoWidth, int infoHeight) {
|
||||
super(guiHelper, handler, recipeHandler, recipe, backX, backY, arrowX, arrowY, arrowWidth, arrowHeight, arrowPosX, arrowPosY);
|
||||
this.infoX = infoX - backX;
|
||||
this.infoY = infoY - backY;
|
||||
@ -5,6 +5,7 @@ import static nc.config.NCConfig.*;
|
||||
import java.util.*;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.radiation.RadiationHelper;
|
||||
import nc.recipe.*;
|
||||
import nc.util.*;
|
||||
@ -13,9 +14,9 @@ import net.minecraft.util.text.TextFormatting;
|
||||
|
||||
public class JEIRecipeWrapper {
|
||||
|
||||
public static class Manufactory extends JEIRecipeWrapperProcessor<Manufactory> {
|
||||
public static class Manufactory extends JEIMachineRecipeWrapper {
|
||||
|
||||
public Manufactory(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public Manufactory(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 47, 30, 176, 3, 37, 16, 74, 35, 73, 34, 37, 18);
|
||||
}
|
||||
|
||||
@ -36,9 +37,9 @@ public class JEIRecipeWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
public static class Separator extends JEIRecipeWrapperProcessor<Separator> {
|
||||
public static class Separator extends JEIMachineRecipeWrapper {
|
||||
|
||||
public Separator(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public Separator(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 33, 30, 176, 3, 37, 18, 60, 34, 59, 34, 37, 18);
|
||||
}
|
||||
|
||||
@ -59,9 +60,9 @@ public class JEIRecipeWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
public static class DecayHastener extends JEIRecipeWrapperProcessor<DecayHastener> {
|
||||
public static class DecayHastener extends JEIMachineRecipeWrapper {
|
||||
|
||||
public DecayHastener(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public DecayHastener(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 47, 30, 176, 3, 37, 16, 74, 35, 73, 34, 37, 18);
|
||||
}
|
||||
|
||||
@ -82,9 +83,9 @@ public class JEIRecipeWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
public static class FuelReprocessor extends JEIRecipeWrapperProcessor<FuelReprocessor> {
|
||||
public static class FuelReprocessor extends JEIMachineRecipeWrapper {
|
||||
|
||||
public FuelReprocessor(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public FuelReprocessor(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 29, 30, 176, 3, 37, 38, 48, 30, 47, 30, 37, 38);
|
||||
}
|
||||
|
||||
@ -105,9 +106,9 @@ public class JEIRecipeWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
public static class AlloyFurnace extends JEIRecipeWrapperProcessor<AlloyFurnace> {
|
||||
public static class AlloyFurnace extends JEIMachineRecipeWrapper {
|
||||
|
||||
public AlloyFurnace(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public AlloyFurnace(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 45, 30, 176, 3, 37, 16, 84, 35, 83, 34, 37, 18);
|
||||
}
|
||||
|
||||
@ -128,9 +129,9 @@ public class JEIRecipeWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
public static class Infuser extends JEIRecipeWrapperProcessor<Infuser> {
|
||||
public static class Infuser extends JEIMachineRecipeWrapper {
|
||||
|
||||
public Infuser(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public Infuser(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 45, 30, 176, 3, 37, 16, 84, 35, 83, 34, 37, 18);
|
||||
}
|
||||
|
||||
@ -151,9 +152,9 @@ public class JEIRecipeWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
public static class Melter extends JEIRecipeWrapperProcessor<Melter> {
|
||||
public static class Melter extends JEIMachineRecipeWrapper {
|
||||
|
||||
public Melter(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public Melter(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 47, 30, 176, 3, 37, 16, 74, 35, 73, 34, 37, 18);
|
||||
}
|
||||
|
||||
@ -174,9 +175,9 @@ public class JEIRecipeWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
public static class Supercooler extends JEIRecipeWrapperProcessor<Supercooler> {
|
||||
public static class Supercooler extends JEIMachineRecipeWrapper {
|
||||
|
||||
public Supercooler(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public Supercooler(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 47, 30, 176, 3, 37, 16, 74, 35, 73, 34, 37, 18);
|
||||
}
|
||||
|
||||
@ -197,9 +198,9 @@ public class JEIRecipeWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
public static class Electrolyzer extends JEIRecipeWrapperProcessor<Electrolyzer> {
|
||||
public static class Electrolyzer extends JEIMachineRecipeWrapper {
|
||||
|
||||
public Electrolyzer(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public Electrolyzer(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 49, 30, 176, 3, 37, 38, 68, 30, 67, 30, 37, 38);
|
||||
}
|
||||
|
||||
@ -220,9 +221,9 @@ public class JEIRecipeWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
public static class Assembler extends JEIRecipeWrapperProcessor<Assembler> {
|
||||
public static class Assembler extends JEIMachineRecipeWrapper {
|
||||
|
||||
public Assembler(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public Assembler(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 45, 30, 176, 3, 37, 36, 84, 31, 83, 30, 37, 38);
|
||||
}
|
||||
|
||||
@ -243,9 +244,9 @@ public class JEIRecipeWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
public static class IngotFormer extends JEIRecipeWrapperProcessor<IngotFormer> {
|
||||
public static class IngotFormer extends JEIMachineRecipeWrapper {
|
||||
|
||||
public IngotFormer(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public IngotFormer(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 47, 30, 176, 3, 37, 16, 74, 35, 73, 34, 37, 18);
|
||||
}
|
||||
|
||||
@ -266,9 +267,9 @@ public class JEIRecipeWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
public static class Pressurizer extends JEIRecipeWrapperProcessor<Pressurizer> {
|
||||
public static class Pressurizer extends JEIMachineRecipeWrapper {
|
||||
|
||||
public Pressurizer(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public Pressurizer(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 47, 30, 176, 3, 37, 16, 74, 35, 73, 34, 37, 18);
|
||||
}
|
||||
|
||||
@ -289,9 +290,9 @@ public class JEIRecipeWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
public static class ChemicalReactor extends JEIRecipeWrapperProcessor<ChemicalReactor> {
|
||||
public static class ChemicalReactor extends JEIMachineRecipeWrapper {
|
||||
|
||||
public ChemicalReactor(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public ChemicalReactor(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 31, 30, 176, 3, 37, 18, 70, 34, 69, 34, 37, 18);
|
||||
}
|
||||
|
||||
@ -312,9 +313,9 @@ public class JEIRecipeWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
public static class SaltMixer extends JEIRecipeWrapperProcessor<SaltMixer> {
|
||||
public static class SaltMixer extends JEIMachineRecipeWrapper {
|
||||
|
||||
public SaltMixer(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public SaltMixer(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 45, 30, 176, 3, 37, 18, 84, 34, 83, 34, 37, 18);
|
||||
}
|
||||
|
||||
@ -335,9 +336,9 @@ public class JEIRecipeWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
public static class Crystallizer extends JEIRecipeWrapperProcessor<Crystallizer> {
|
||||
public static class Crystallizer extends JEIMachineRecipeWrapper {
|
||||
|
||||
public Crystallizer(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public Crystallizer(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 47, 30, 176, 3, 37, 16, 74, 35, 73, 34, 37, 18);
|
||||
}
|
||||
|
||||
@ -358,9 +359,9 @@ public class JEIRecipeWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
public static class Enricher extends JEIRecipeWrapperProcessor<Enricher> {
|
||||
public static class Enricher extends JEIMachineRecipeWrapper {
|
||||
|
||||
public Enricher(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public Enricher(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 45, 30, 176, 3, 37, 16, 84, 35, 83, 34, 37, 18);
|
||||
}
|
||||
|
||||
@ -381,9 +382,9 @@ public class JEIRecipeWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
public static class Extractor extends JEIRecipeWrapperProcessor<Extractor> {
|
||||
public static class Extractor extends JEIMachineRecipeWrapper {
|
||||
|
||||
public Extractor(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public Extractor(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 33, 30, 176, 3, 37, 18, 60, 34, 59, 34, 37, 18);
|
||||
}
|
||||
|
||||
@ -404,9 +405,9 @@ public class JEIRecipeWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
public static class Centrifuge extends JEIRecipeWrapperProcessor<Centrifuge> {
|
||||
public static class Centrifuge extends JEIMachineRecipeWrapper {
|
||||
|
||||
public Centrifuge(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public Centrifuge(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 39, 30, 176, 3, 37, 38, 58, 30, 57, 30, 37, 38);
|
||||
}
|
||||
|
||||
@ -427,9 +428,9 @@ public class JEIRecipeWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
public static class RockCrusher extends JEIRecipeWrapperProcessor<RockCrusher> {
|
||||
public static class RockCrusher extends JEIMachineRecipeWrapper {
|
||||
|
||||
public RockCrusher(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public RockCrusher(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 29, 30, 176, 3, 37, 16, 56, 35, 55, 34, 37, 18);
|
||||
}
|
||||
|
||||
@ -450,9 +451,9 @@ public class JEIRecipeWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
public static class Collector extends JEIRecipeWrapperAbstract<Collector> {
|
||||
public static class Collector extends JEIBasicRecipeWrapper {
|
||||
|
||||
public Collector(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public Collector(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 33, 30, 176, 3, 37, 18, 60, 34);
|
||||
}
|
||||
|
||||
@ -482,9 +483,9 @@ public class JEIRecipeWrapper {
|
||||
private static final String PRODUCTION_RATE = Lang.localise("jei.nuclearcraft.collector_production_rate");
|
||||
}
|
||||
|
||||
public static class DecayGenerator extends JEIRecipeWrapperAbstract<DecayGenerator> {
|
||||
public static class DecayGenerator extends JEIBasicRecipeWrapper {
|
||||
|
||||
public DecayGenerator(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public DecayGenerator(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 47, 30, 176, 3, 37, 16, 74, 35);
|
||||
}
|
||||
|
||||
@ -535,9 +536,9 @@ public class JEIRecipeWrapper {
|
||||
private static final String BLOCK_RADIATION = Lang.localise("jei.nuclearcraft.decay_gen_radiation");
|
||||
}
|
||||
|
||||
public static class FissionModerator extends JEIRecipeWrapperAbstract<FissionModerator> {
|
||||
public static class FissionModerator extends JEIBasicRecipeWrapper {
|
||||
|
||||
public FissionModerator(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public FissionModerator(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 47, 30, 176, 3, -1, -1, 74, 35);
|
||||
}
|
||||
|
||||
@ -547,9 +548,9 @@ public class JEIRecipeWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
public static class FissionReflector extends JEIRecipeWrapperAbstract<FissionReflector> {
|
||||
public static class FissionReflector extends JEIBasicRecipeWrapper {
|
||||
|
||||
public FissionReflector(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public FissionReflector(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 47, 30, 176, 3, -1, -1, 74, 35);
|
||||
}
|
||||
|
||||
@ -559,10 +560,10 @@ public class JEIRecipeWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
public static class FissionIrradiator extends JEIRecipeWrapperAbstract<FissionIrradiator> {
|
||||
public static class FissionIrradiator extends JEIBasicRecipeWrapper {
|
||||
|
||||
public FissionIrradiator(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, "_jei", 47, 30, 176, 3, 37, 16, 74, 35);
|
||||
public FissionIrradiator(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 47, 30, 176, 3, 37, 16, 74, 35);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -610,7 +611,7 @@ public class JEIRecipeWrapper {
|
||||
}
|
||||
double efficiency = getIrradiatorProcessEfficiency();
|
||||
if (efficiency > 0D) {
|
||||
tooltip.add(TextFormatting.LIGHT_PURPLE + EFFICIENCY + " " + TextFormatting.WHITE + Math.round(100D * efficiency) + "%");
|
||||
tooltip.add(TextFormatting.LIGHT_PURPLE + EFFICIENCY + " " + TextFormatting.WHITE + NCMath.pcDecimalPlaces(efficiency, 1));
|
||||
}
|
||||
double radiation = getIrradiatorBaseProcessRadiation();
|
||||
if (radiation > 0D) {
|
||||
@ -627,9 +628,9 @@ public class JEIRecipeWrapper {
|
||||
private static final String RADIATION_PER_FLUX = Lang.localise("jei.nuclearcraft.radiation_per_flux");
|
||||
}
|
||||
|
||||
public static class PebbleFission extends JEIRecipeWrapperAbstract<PebbleFission> {
|
||||
public static class PebbleFission extends JEIBasicRecipeWrapper {
|
||||
|
||||
public PebbleFission(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public PebbleFission(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 47, 30, 176, 3, 37, 16, 74, 35);
|
||||
}
|
||||
|
||||
@ -666,6 +667,13 @@ public class JEIRecipeWrapper {
|
||||
return recipe.getFissionFuelCriticality();
|
||||
}
|
||||
|
||||
protected double getFissionFuelDecayFactor() {
|
||||
if (recipe == null) {
|
||||
return 0D;
|
||||
}
|
||||
return recipe.getFissionFuelDecayFactor();
|
||||
}
|
||||
|
||||
protected boolean getFissionFuelSelfPriming() {
|
||||
if (recipe == null) {
|
||||
return false;
|
||||
@ -687,8 +695,9 @@ public class JEIRecipeWrapper {
|
||||
if (mouseX >= 73 - 47 && mouseY >= 34 - 30 && mouseX < 73 - 47 + 37 + 1 && mouseY < 34 - 30 + 18 + 1) {
|
||||
tooltip.add(TextFormatting.GREEN + FUEL_TIME + " " + TextFormatting.WHITE + UnitHelper.applyTimeUnitShort(getFissionFuelTime() * fission_fuel_time_multiplier, 3));
|
||||
tooltip.add(TextFormatting.YELLOW + FUEL_HEAT + " " + TextFormatting.WHITE + UnitHelper.prefix(getFissionFuelHeat(), 5, "H/t"));
|
||||
tooltip.add(TextFormatting.LIGHT_PURPLE + FUEL_EFFICIENCY + " " + TextFormatting.WHITE + Math.round(100D * getFissionFuelEfficiency()) + "%");
|
||||
tooltip.add(TextFormatting.LIGHT_PURPLE + FUEL_EFFICIENCY + " " + TextFormatting.WHITE + NCMath.pcDecimalPlaces(getFissionFuelEfficiency(), 1));
|
||||
tooltip.add(TextFormatting.RED + FUEL_CRITICALITY + " " + TextFormatting.WHITE + getFissionFuelCriticality() + " N/t");
|
||||
tooltip.add(TextFormatting.GRAY + FUEL_DECAY_FACTOR + " " + TextFormatting.WHITE + NCMath.pcDecimalPlaces(getFissionFuelDecayFactor(), 1));
|
||||
if (getFissionFuelSelfPriming()) {
|
||||
tooltip.add(TextFormatting.DARK_AQUA + FUEL_SELF_PRIMING);
|
||||
}
|
||||
@ -705,13 +714,14 @@ public class JEIRecipeWrapper {
|
||||
private static final String FUEL_HEAT = Lang.localise("jei.nuclearcraft.pebble_fuel_heat");
|
||||
private static final String FUEL_EFFICIENCY = Lang.localise("jei.nuclearcraft.pebble_fuel_efficiency");
|
||||
private static final String FUEL_CRITICALITY = Lang.localise("jei.nuclearcraft.pebble_fuel_criticality");
|
||||
private static final String FUEL_DECAY_FACTOR = Lang.localise("jei.nuclearcraft.pebble_fuel_decay_factor");
|
||||
private static final String FUEL_SELF_PRIMING = Lang.localise("jei.nuclearcraft.pebble_fuel_self_priming");
|
||||
private static final String FUEL_RADIATION = Lang.localise("jei.nuclearcraft.pebble_fuel_radiation");
|
||||
}
|
||||
|
||||
public static class SolidFission extends JEIRecipeWrapperAbstract<SolidFission> {
|
||||
public static class SolidFission extends JEIBasicRecipeWrapper {
|
||||
|
||||
public SolidFission(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public SolidFission(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 47, 30, 176, 3, 37, 16, 74, 35);
|
||||
}
|
||||
|
||||
@ -748,6 +758,13 @@ public class JEIRecipeWrapper {
|
||||
return recipe.getFissionFuelCriticality();
|
||||
}
|
||||
|
||||
protected double getFissionFuelDecayFactor() {
|
||||
if (recipe == null) {
|
||||
return 0D;
|
||||
}
|
||||
return recipe.getFissionFuelDecayFactor();
|
||||
}
|
||||
|
||||
protected boolean getFissionFuelSelfPriming() {
|
||||
if (recipe == null) {
|
||||
return false;
|
||||
@ -769,8 +786,9 @@ public class JEIRecipeWrapper {
|
||||
if (mouseX >= 73 - 47 && mouseY >= 34 - 30 && mouseX < 73 - 47 + 37 + 1 && mouseY < 34 - 30 + 18 + 1) {
|
||||
tooltip.add(TextFormatting.GREEN + FUEL_TIME + " " + TextFormatting.WHITE + UnitHelper.applyTimeUnitShort(getFissionFuelTime() * fission_fuel_time_multiplier, 3));
|
||||
tooltip.add(TextFormatting.YELLOW + FUEL_HEAT + " " + TextFormatting.WHITE + UnitHelper.prefix(getFissionFuelHeat(), 5, "H/t"));
|
||||
tooltip.add(TextFormatting.LIGHT_PURPLE + FUEL_EFFICIENCY + " " + TextFormatting.WHITE + Math.round(100D * getFissionFuelEfficiency()) + "%");
|
||||
tooltip.add(TextFormatting.LIGHT_PURPLE + FUEL_EFFICIENCY + " " + TextFormatting.WHITE + NCMath.pcDecimalPlaces(getFissionFuelEfficiency(), 1));
|
||||
tooltip.add(TextFormatting.RED + FUEL_CRITICALITY + " " + TextFormatting.WHITE + getFissionFuelCriticality() + " N/t");
|
||||
tooltip.add(TextFormatting.GRAY + FUEL_DECAY_FACTOR + " " + TextFormatting.WHITE + NCMath.pcDecimalPlaces(getFissionFuelDecayFactor(), 1));
|
||||
if (getFissionFuelSelfPriming()) {
|
||||
tooltip.add(TextFormatting.DARK_AQUA + FUEL_SELF_PRIMING);
|
||||
}
|
||||
@ -787,13 +805,14 @@ public class JEIRecipeWrapper {
|
||||
private static final String FUEL_HEAT = Lang.localise("jei.nuclearcraft.solid_fuel_heat");
|
||||
private static final String FUEL_EFFICIENCY = Lang.localise("jei.nuclearcraft.solid_fuel_efficiency");
|
||||
private static final String FUEL_CRITICALITY = Lang.localise("jei.nuclearcraft.solid_fuel_criticality");
|
||||
private static final String FUEL_DECAY_FACTOR = Lang.localise("jei.nuclearcraft.solid_fuel_decay_factor");
|
||||
private static final String FUEL_SELF_PRIMING = Lang.localise("jei.nuclearcraft.solid_fuel_self_priming");
|
||||
private static final String FUEL_RADIATION = Lang.localise("jei.nuclearcraft.solid_fuel_radiation");
|
||||
}
|
||||
|
||||
public static class FissionHeating extends JEIRecipeWrapperAbstract<FissionHeating> {
|
||||
public static class FissionHeating extends JEIBasicRecipeWrapper {
|
||||
|
||||
public FissionHeating(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public FissionHeating(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 47, 30, 176, 3, 37, 16, 74, 35);
|
||||
}
|
||||
|
||||
@ -823,9 +842,9 @@ public class JEIRecipeWrapper {
|
||||
private static final String HEAT_PER_MB = Lang.localise("jei.nuclearcraft.fission_heating_heat_per_mb");
|
||||
}
|
||||
|
||||
public static class SaltFission extends JEIRecipeWrapperAbstract<SaltFission> {
|
||||
public static class SaltFission extends JEIBasicRecipeWrapper {
|
||||
|
||||
public SaltFission(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public SaltFission(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 47, 30, 176, 3, 37, 16, 74, 35);
|
||||
}
|
||||
|
||||
@ -862,6 +881,13 @@ public class JEIRecipeWrapper {
|
||||
return recipe.getFissionFuelCriticality();
|
||||
}
|
||||
|
||||
protected double getFissionFuelDecayFactor() {
|
||||
if (recipe == null) {
|
||||
return 0D;
|
||||
}
|
||||
return recipe.getFissionFuelDecayFactor();
|
||||
}
|
||||
|
||||
protected boolean getFissionFuelSelfPriming() {
|
||||
if (recipe == null) {
|
||||
return false;
|
||||
@ -883,8 +909,9 @@ public class JEIRecipeWrapper {
|
||||
if (mouseX >= 73 - 47 && mouseY >= 34 - 30 && mouseX < 73 - 47 + 37 + 1 && mouseY < 34 - 30 + 18 + 1) {
|
||||
tooltip.add(TextFormatting.GREEN + FUEL_TIME + " " + TextFormatting.WHITE + UnitHelper.applyTimeUnitShort(getSaltFissionFuelTime() * fission_fuel_time_multiplier, 3));
|
||||
tooltip.add(TextFormatting.YELLOW + FUEL_HEAT + " " + TextFormatting.WHITE + UnitHelper.prefix(getFissionFuelHeat(), 5, "H/t"));
|
||||
tooltip.add(TextFormatting.LIGHT_PURPLE + FUEL_EFFICIENCY + " " + TextFormatting.WHITE + Math.round(100D * getFissionFuelEfficiency()) + "%");
|
||||
tooltip.add(TextFormatting.LIGHT_PURPLE + FUEL_EFFICIENCY + " " + TextFormatting.WHITE + NCMath.pcDecimalPlaces(getFissionFuelEfficiency(), 1));
|
||||
tooltip.add(TextFormatting.RED + FUEL_CRITICALITY + " " + TextFormatting.WHITE + getFissionFuelCriticality() + " N/t");
|
||||
tooltip.add(TextFormatting.GRAY + FUEL_DECAY_FACTOR + " " + TextFormatting.WHITE + NCMath.pcDecimalPlaces(getFissionFuelDecayFactor(), 1));
|
||||
if (getFissionFuelSelfPriming()) {
|
||||
tooltip.add(TextFormatting.DARK_AQUA + FUEL_SELF_PRIMING);
|
||||
}
|
||||
@ -901,13 +928,14 @@ public class JEIRecipeWrapper {
|
||||
private static final String FUEL_HEAT = Lang.localise("jei.nuclearcraft.salt_fuel_heat");
|
||||
private static final String FUEL_EFFICIENCY = Lang.localise("jei.nuclearcraft.salt_fuel_efficiency");
|
||||
private static final String FUEL_CRITICALITY = Lang.localise("jei.nuclearcraft.salt_fuel_criticality");
|
||||
private static final String FUEL_DECAY_FACTOR = Lang.localise("jei.nuclearcraft.salt_fuel_decay_factor");
|
||||
private static final String FUEL_SELF_PRIMING = Lang.localise("jei.nuclearcraft.salt_fuel_self_priming");
|
||||
private static final String FUEL_RADIATION = Lang.localise("jei.nuclearcraft.salt_fuel_radiation");
|
||||
}
|
||||
|
||||
public static class CoolantHeater extends JEIRecipeWrapperAbstract<CoolantHeater> {
|
||||
public static class CoolantHeater extends JEIBasicRecipeWrapper {
|
||||
|
||||
public CoolantHeater(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public CoolantHeater(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 47, 30, 176, 3, 37, 16, 74, 35);
|
||||
}
|
||||
|
||||
@ -949,9 +977,9 @@ public class JEIRecipeWrapper {
|
||||
private static final String COOLING = Lang.localise("jei.nuclearcraft.coolant_heater_rate");
|
||||
}
|
||||
|
||||
public static class FissionEmergencyCooling extends JEIRecipeWrapperAbstract<FissionEmergencyCooling> {
|
||||
public static class FissionEmergencyCooling extends JEIBasicRecipeWrapper {
|
||||
|
||||
public FissionEmergencyCooling(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public FissionEmergencyCooling(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 47, 30, 176, 3, 37, 16, 74, 35);
|
||||
}
|
||||
|
||||
@ -981,10 +1009,10 @@ public class JEIRecipeWrapper {
|
||||
private static final String COOLING_PER_MB = Lang.localise("jei.nuclearcraft.fission_emergency_cooling_per_mb");
|
||||
}
|
||||
|
||||
public static class Fusion extends JEIRecipeWrapperAbstract<Fusion> {
|
||||
public static class Fusion extends JEIBasicRecipeWrapper {
|
||||
|
||||
public Fusion(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, "_jei", 55, 30, 176, 3, 37, 16, 74, 35);
|
||||
public Fusion(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 55, 30, 176, 3, 37, 16, 74, 35);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1019,7 +1047,7 @@ public class JEIRecipeWrapper {
|
||||
|
||||
if (mouseX >= 73 - 55 && mouseY >= 34 - 30 && mouseX < 73 - 55 + 37 + 1 && mouseY < 34 - 30 + 18 + 1) {
|
||||
tooltip.add(TextFormatting.GREEN + COMBO_TIME + " " + TextFormatting.WHITE + UnitHelper.applyTimeUnitShort(getFusionComboTime() / fusion_fuel_use, 3));
|
||||
tooltip.add(TextFormatting.LIGHT_PURPLE + COMBO_POWER + " " + TextFormatting.WHITE + UnitHelper.prefix(100D * getFusionComboPower() * fusion_base_power, 5, "RF/t"));
|
||||
tooltip.add(TextFormatting.LIGHT_PURPLE + COMBO_POWER + " " + TextFormatting.WHITE + UnitHelper.prefix(getFusionComboPower() * fusion_base_power, 5, "RF/t"));
|
||||
double optimalTemp = R * getFusionComboHeatVariable();
|
||||
tooltip.add(TextFormatting.YELLOW + COMBO_TEMP + " " + (optimalTemp < 20000000D / 1000D ? TextFormatting.WHITE : TextFormatting.GOLD) + UnitHelper.prefix(optimalTemp, 5, "K", 2));
|
||||
}
|
||||
@ -1034,9 +1062,9 @@ public class JEIRecipeWrapper {
|
||||
private static final String COMBO_TEMP = Lang.localise("jei.nuclearcraft.fusion_temp");
|
||||
}
|
||||
|
||||
public static class HeatExchanger extends JEIRecipeWrapperAbstract<HeatExchanger> {
|
||||
public static class HeatExchanger extends JEIBasicRecipeWrapper {
|
||||
|
||||
public HeatExchanger(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public HeatExchanger(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 47, 30, 176, recipe != null && recipe.getHeatExchangerIsHeating() ? 3 : 19, 37, 16, 74, 35);
|
||||
}
|
||||
|
||||
@ -1074,9 +1102,9 @@ public class JEIRecipeWrapper {
|
||||
private static final String COOLING_REQUIRED = Lang.localise("jei.nuclearcraft.exchanger_cooling_required");
|
||||
}
|
||||
|
||||
public static class Condenser extends JEIRecipeWrapperAbstract<Condenser> {
|
||||
public static class Condenser extends JEIBasicRecipeWrapper {
|
||||
|
||||
public Condenser(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public Condenser(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 47, 30, 176, 3, 37, 16, 74, 35);
|
||||
}
|
||||
|
||||
@ -1105,7 +1133,7 @@ public class JEIRecipeWrapper {
|
||||
|
||||
if (mouseX >= 73 - 47 && mouseY >= 34 - 30 && mouseX < 73 - 47 + 37 + 1 && mouseY < 34 - 30 + 18 + 1) {
|
||||
tooltip.add(TextFormatting.YELLOW + CONDENSING_TEMPERATURE + TextFormatting.WHITE + " " + getCondenserCondensingTemperature() + "K");
|
||||
tooltip.add(TextFormatting.BLUE + HEAT_REMOVAL_REQUIRED + TextFormatting.WHITE + " " + NCMath.sigFigs(getCondenserProcessTime(), 3));
|
||||
tooltip.add(TextFormatting.BLUE + HEAT_REMOVAL_REQUIRED + TextFormatting.WHITE + " " + NCMath.sigFigs(getCondenserProcessTime(), 5));
|
||||
}
|
||||
|
||||
return tooltip;
|
||||
@ -1115,9 +1143,9 @@ public class JEIRecipeWrapper {
|
||||
private static final String HEAT_REMOVAL_REQUIRED = Lang.localise("jei.nuclearcraft.condenser_heat_removal_req");
|
||||
}
|
||||
|
||||
public static class Turbine extends JEIRecipeWrapperAbstract<Turbine> {
|
||||
public static class Turbine extends JEIBasicRecipeWrapper {
|
||||
|
||||
public Turbine(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public Turbine(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 47, 30, 176, 3, 37, 16, 74, 35);
|
||||
}
|
||||
|
||||
@ -1146,7 +1174,7 @@ public class JEIRecipeWrapper {
|
||||
|
||||
if (mouseX >= 73 - 47 && mouseY >= 34 - 30 && mouseX < 73 - 47 + 37 + 1 && mouseY < 34 - 30 + 18 + 1) {
|
||||
tooltip.add(TextFormatting.LIGHT_PURPLE + ENERGY_DENSITY + " " + TextFormatting.WHITE + NCMath.decimalPlaces(getTurbinePowerPerMB(), 2) + " RF/mB");
|
||||
tooltip.add(TextFormatting.GRAY + EXPANSION + " " + TextFormatting.WHITE + Math.round(100D * getTurbineExpansionLevel()) + "%");
|
||||
tooltip.add(TextFormatting.GRAY + EXPANSION + " " + TextFormatting.WHITE + NCMath.pcDecimalPlaces(getTurbineExpansionLevel(), 1));
|
||||
}
|
||||
|
||||
return tooltip;
|
||||
@ -1156,9 +1184,9 @@ public class JEIRecipeWrapper {
|
||||
private static final String EXPANSION = Lang.localise("jei.nuclearcraft.turbine_expansion");
|
||||
}
|
||||
|
||||
public static class RadiationScrubber extends JEIRecipeWrapperAbstract<RadiationScrubber> {
|
||||
public static class RadiationScrubber extends JEIBasicRecipeWrapper {
|
||||
|
||||
public RadiationScrubber(IGuiHelper guiHelper, IJEIHandler jeiHandler, ProcessorRecipeHandler recipeHandler, ProcessorRecipe recipe) {
|
||||
public RadiationScrubber(IGuiHelper guiHelper, IJEIHandler jeiHandler, BasicRecipeHandler recipeHandler, BasicRecipe recipe) {
|
||||
super(guiHelper, jeiHandler, recipeHandler, recipe, 31, 30, 176, 3, 37, 16, 70, 35);
|
||||
}
|
||||
|
||||
@ -1195,7 +1223,7 @@ public class JEIRecipeWrapper {
|
||||
if (mouseX >= 69 - 31 && mouseY >= 34 - 30 && mouseX < 69 - 31 + 37 + 1 && mouseY < 34 - 30 + 18 + 1) {
|
||||
tooltip.add(TextFormatting.GREEN + PROCESS_TIME + " " + TextFormatting.WHITE + UnitHelper.applyTimeUnitShort(getScrubberProcessTime(), 3));
|
||||
tooltip.add(TextFormatting.LIGHT_PURPLE + PROCESS_POWER + " " + TextFormatting.WHITE + UnitHelper.prefix(getScrubberProcessPower(), 5, "RF/t"));
|
||||
tooltip.add(TextFormatting.RED + PROCESS_EFFICIENCY + " " + TextFormatting.WHITE + Math.round(100D * getScrubberProcessEfficiency()) + "%");
|
||||
tooltip.add(TextFormatting.RED + PROCESS_EFFICIENCY + " " + TextFormatting.WHITE + NCMath.pcDecimalPlaces(getScrubberProcessEfficiency(), 1));
|
||||
}
|
||||
|
||||
return tooltip;
|
||||
|
||||
@ -8,7 +8,7 @@ import com.google.common.collect.Lists;
|
||||
|
||||
import mezz.jei.api.*;
|
||||
import mezz.jei.api.recipe.transfer.IRecipeTransferRegistry;
|
||||
import nc.ModCheck;
|
||||
import nc.*;
|
||||
import nc.container.processor.*;
|
||||
import nc.enumm.MetaEnums;
|
||||
import nc.gui.processor.*;
|
||||
@ -32,133 +32,132 @@ public class NCJEI implements IModPlugin {
|
||||
IJeiHelpers jeiHelpers = registry.getJeiHelpers();
|
||||
IGuiHelper guiHelper = jeiHelpers.getGuiHelper();
|
||||
|
||||
for (IJEIHandler handler : JEIHandler.values()) {
|
||||
if (!handler.getEnabled()) {
|
||||
continue;
|
||||
}
|
||||
registry.addRecipes(handler.getJEIRecipes(guiHelper));
|
||||
JEICategoryAbstract category = handler.getCategory(guiHelper);
|
||||
registry.addRecipeCategories(category);
|
||||
registry.addRecipeHandlers(category);
|
||||
if (handler.getCrafters() != null) {
|
||||
for (ItemStack crafter : handler.getCrafters()) {
|
||||
if (crafter != null) {
|
||||
registry.addRecipeCatalyst(crafter, handler.getUUID());
|
||||
for (IJEIHandler<?> handler : JEIHandler.values()) {
|
||||
if (handler.getEnabled()) {
|
||||
registry.addRecipes(handler.getJEIRecipes(guiHelper));
|
||||
JEIBasicCategory category = handler.getCategory(guiHelper);
|
||||
registry.addRecipeCategories(category);
|
||||
registry.addRecipeHandlers(category);
|
||||
if (handler.getCrafters() != null) {
|
||||
for (ItemStack crafter : handler.getCrafters()) {
|
||||
if (crafter != null) {
|
||||
registry.addRecipeCatalyst(crafter, handler.getUid());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IRecipeTransferRegistry recipeTransferRegistry = registry.getRecipeTransferRegistry();
|
||||
|
||||
if (register_processor[1]) {
|
||||
registry.addRecipeClickArea(GuiManufactory.class, 73, 34, 37, 18, JEIHandler.MANUFACTORY.getUUID());
|
||||
registry.addRecipeClickArea(GuiManufactory.SideConfig.class, 73, 34, 37, 18, JEIHandler.MANUFACTORY.getUUID());
|
||||
registry.addRecipeClickArea(GuiManufactory.class, 73, 34, 37, 18, JEIHandler.MANUFACTORY.getUid());
|
||||
registry.addRecipeClickArea(GuiManufactory.SideConfig.class, 73, 34, 37, 18, JEIHandler.MANUFACTORY.getUid());
|
||||
}
|
||||
if (register_processor[2]) {
|
||||
registry.addRecipeClickArea(GuiSeparator.class, 59, 34, 37, 18, JEIHandler.SEPARATOR.getUUID());
|
||||
registry.addRecipeClickArea(GuiSeparator.SideConfig.class, 59, 34, 37, 18, JEIHandler.SEPARATOR.getUUID());
|
||||
registry.addRecipeClickArea(GuiSeparator.class, 59, 34, 37, 18, JEIHandler.SEPARATOR.getUid());
|
||||
registry.addRecipeClickArea(GuiSeparator.SideConfig.class, 59, 34, 37, 18, JEIHandler.SEPARATOR.getUid());
|
||||
}
|
||||
if (register_processor[3]) {
|
||||
registry.addRecipeClickArea(GuiDecayHastener.class, 73, 34, 37, 18, JEIHandler.DECAY_HASTENER.getUUID());
|
||||
registry.addRecipeClickArea(GuiDecayHastener.SideConfig.class, 73, 34, 37, 18, JEIHandler.DECAY_HASTENER.getUUID());
|
||||
registry.addRecipeClickArea(GuiDecayHastener.class, 73, 34, 37, 18, JEIHandler.DECAY_HASTENER.getUid());
|
||||
registry.addRecipeClickArea(GuiDecayHastener.SideConfig.class, 73, 34, 37, 18, JEIHandler.DECAY_HASTENER.getUid());
|
||||
}
|
||||
if (register_processor[4]) {
|
||||
registry.addRecipeClickArea(GuiFuelReprocessor.class, 47, 30, 37, 38, JEIHandler.FUEL_REPROCESSOR.getUUID());
|
||||
registry.addRecipeClickArea(GuiFuelReprocessor.SideConfig.class, 47, 30, 37, 38, JEIHandler.FUEL_REPROCESSOR.getUUID());
|
||||
registry.addRecipeClickArea(GuiFuelReprocessor.class, 47, 30, 37, 38, JEIHandler.FUEL_REPROCESSOR.getUid());
|
||||
registry.addRecipeClickArea(GuiFuelReprocessor.SideConfig.class, 47, 30, 37, 38, JEIHandler.FUEL_REPROCESSOR.getUid());
|
||||
}
|
||||
if (register_processor[5]) {
|
||||
registry.addRecipeClickArea(GuiAlloyFurnace.class, 83, 34, 37, 18, JEIHandler.ALLOY_FURNACE.getUUID());
|
||||
registry.addRecipeClickArea(GuiAlloyFurnace.SideConfig.class, 83, 34, 37, 18, JEIHandler.ALLOY_FURNACE.getUUID());
|
||||
registry.addRecipeClickArea(GuiAlloyFurnace.class, 83, 34, 37, 18, JEIHandler.ALLOY_FURNACE.getUid());
|
||||
registry.addRecipeClickArea(GuiAlloyFurnace.SideConfig.class, 83, 34, 37, 18, JEIHandler.ALLOY_FURNACE.getUid());
|
||||
}
|
||||
if (register_processor[6]) {
|
||||
registry.addRecipeClickArea(GuiInfuser.class, 83, 34, 37, 18, JEIHandler.INFUSER.getUUID());
|
||||
registry.addRecipeClickArea(GuiInfuser.SideConfig.class, 83, 34, 37, 18, JEIHandler.INFUSER.getUUID());
|
||||
registry.addRecipeClickArea(GuiInfuser.class, 83, 34, 37, 18, JEIHandler.INFUSER.getUid());
|
||||
registry.addRecipeClickArea(GuiInfuser.SideConfig.class, 83, 34, 37, 18, JEIHandler.INFUSER.getUid());
|
||||
}
|
||||
if (register_processor[7]) {
|
||||
registry.addRecipeClickArea(GuiMelter.class, 73, 34, 37, 18, JEIHandler.MELTER.getUUID());
|
||||
registry.addRecipeClickArea(GuiMelter.SideConfig.class, 73, 34, 37, 18, JEIHandler.MELTER.getUUID());
|
||||
registry.addRecipeClickArea(GuiMelter.class, 73, 34, 37, 18, JEIHandler.MELTER.getUid());
|
||||
registry.addRecipeClickArea(GuiMelter.SideConfig.class, 73, 34, 37, 18, JEIHandler.MELTER.getUid());
|
||||
}
|
||||
if (register_processor[8]) {
|
||||
registry.addRecipeClickArea(GuiSupercooler.class, 73, 34, 37, 18, JEIHandler.SUPERCOOLER.getUUID());
|
||||
registry.addRecipeClickArea(GuiSupercooler.SideConfig.class, 73, 34, 37, 18, JEIHandler.SUPERCOOLER.getUUID());
|
||||
registry.addRecipeClickArea(GuiSupercooler.class, 73, 34, 37, 18, JEIHandler.SUPERCOOLER.getUid());
|
||||
registry.addRecipeClickArea(GuiSupercooler.SideConfig.class, 73, 34, 37, 18, JEIHandler.SUPERCOOLER.getUid());
|
||||
}
|
||||
if (register_processor[9]) {
|
||||
registry.addRecipeClickArea(GuiElectrolyzer.class, 67, 30, 37, 38, JEIHandler.ELECTROLYZER.getUUID());
|
||||
registry.addRecipeClickArea(GuiElectrolyzer.SideConfig.class, 67, 30, 37, 38, JEIHandler.ELECTROLYZER.getUUID());
|
||||
registry.addRecipeClickArea(GuiElectrolyzer.class, 67, 30, 37, 38, JEIHandler.ELECTROLYZER.getUid());
|
||||
registry.addRecipeClickArea(GuiElectrolyzer.SideConfig.class, 67, 30, 37, 38, JEIHandler.ELECTROLYZER.getUid());
|
||||
}
|
||||
if (register_processor[10]) {
|
||||
registry.addRecipeClickArea(GuiAssembler.class, 83, 30, 37, 38, JEIHandler.ASSEMBLER.getUUID());
|
||||
registry.addRecipeClickArea(GuiAssembler.SideConfig.class, 83, 30, 37, 38, JEIHandler.ASSEMBLER.getUUID());
|
||||
registry.addRecipeClickArea(GuiAssembler.class, 83, 30, 37, 38, JEIHandler.ASSEMBLER.getUid());
|
||||
registry.addRecipeClickArea(GuiAssembler.SideConfig.class, 83, 30, 37, 38, JEIHandler.ASSEMBLER.getUid());
|
||||
}
|
||||
if (register_processor[11]) {
|
||||
registry.addRecipeClickArea(GuiIngotFormer.class, 73, 34, 37, 18, JEIHandler.INGOT_FORMER.getUUID());
|
||||
registry.addRecipeClickArea(GuiIngotFormer.SideConfig.class, 73, 34, 37, 18, JEIHandler.INGOT_FORMER.getUUID());
|
||||
registry.addRecipeClickArea(GuiIngotFormer.class, 73, 34, 37, 18, JEIHandler.INGOT_FORMER.getUid());
|
||||
registry.addRecipeClickArea(GuiIngotFormer.SideConfig.class, 73, 34, 37, 18, JEIHandler.INGOT_FORMER.getUid());
|
||||
}
|
||||
if (register_processor[12]) {
|
||||
registry.addRecipeClickArea(GuiPressurizer.class, 73, 34, 37, 18, JEIHandler.PRESSURIZER.getUUID());
|
||||
registry.addRecipeClickArea(GuiPressurizer.SideConfig.class, 73, 34, 37, 18, JEIHandler.PRESSURIZER.getUUID());
|
||||
registry.addRecipeClickArea(GuiPressurizer.class, 73, 34, 37, 18, JEIHandler.PRESSURIZER.getUid());
|
||||
registry.addRecipeClickArea(GuiPressurizer.SideConfig.class, 73, 34, 37, 18, JEIHandler.PRESSURIZER.getUid());
|
||||
}
|
||||
if (register_processor[13]) {
|
||||
registry.addRecipeClickArea(GuiChemicalReactor.class, 69, 34, 37, 18, JEIHandler.CHEMICAL_REACTOR.getUUID());
|
||||
registry.addRecipeClickArea(GuiChemicalReactor.SideConfig.class, 69, 34, 37, 18, JEIHandler.CHEMICAL_REACTOR.getUUID());
|
||||
registry.addRecipeClickArea(GuiChemicalReactor.class, 69, 34, 37, 18, JEIHandler.CHEMICAL_REACTOR.getUid());
|
||||
registry.addRecipeClickArea(GuiChemicalReactor.SideConfig.class, 69, 34, 37, 18, JEIHandler.CHEMICAL_REACTOR.getUid());
|
||||
}
|
||||
if (register_processor[14]) {
|
||||
registry.addRecipeClickArea(GuiSaltMixer.class, 83, 34, 37, 18, JEIHandler.SALT_MIXER.getUUID());
|
||||
registry.addRecipeClickArea(GuiSaltMixer.SideConfig.class, 83, 34, 37, 18, JEIHandler.SALT_MIXER.getUUID());
|
||||
registry.addRecipeClickArea(GuiSaltMixer.class, 83, 34, 37, 18, JEIHandler.SALT_MIXER.getUid());
|
||||
registry.addRecipeClickArea(GuiSaltMixer.SideConfig.class, 83, 34, 37, 18, JEIHandler.SALT_MIXER.getUid());
|
||||
}
|
||||
if (register_processor[15]) {
|
||||
registry.addRecipeClickArea(GuiCrystallizer.class, 73, 34, 37, 18, JEIHandler.CRYSTALLIZER.getUUID());
|
||||
registry.addRecipeClickArea(GuiCrystallizer.SideConfig.class, 73, 34, 37, 18, JEIHandler.CRYSTALLIZER.getUUID());
|
||||
registry.addRecipeClickArea(GuiCrystallizer.class, 73, 34, 37, 18, JEIHandler.CRYSTALLIZER.getUid());
|
||||
registry.addRecipeClickArea(GuiCrystallizer.SideConfig.class, 73, 34, 37, 18, JEIHandler.CRYSTALLIZER.getUid());
|
||||
}
|
||||
if (register_processor[16]) {
|
||||
registry.addRecipeClickArea(GuiEnricher.class, 83, 34, 37, 18, JEIHandler.ENRICHER.getUUID());
|
||||
registry.addRecipeClickArea(GuiEnricher.SideConfig.class, 83, 34, 37, 18, JEIHandler.ENRICHER.getUUID());
|
||||
registry.addRecipeClickArea(GuiEnricher.class, 83, 34, 37, 18, JEIHandler.ENRICHER.getUid());
|
||||
registry.addRecipeClickArea(GuiEnricher.SideConfig.class, 83, 34, 37, 18, JEIHandler.ENRICHER.getUid());
|
||||
}
|
||||
if (register_processor[17]) {
|
||||
registry.addRecipeClickArea(GuiExtractor.class, 59, 34, 37, 18, JEIHandler.EXTRACTOR.getUUID());
|
||||
registry.addRecipeClickArea(GuiExtractor.SideConfig.class, 59, 34, 37, 18, JEIHandler.EXTRACTOR.getUUID());
|
||||
registry.addRecipeClickArea(GuiExtractor.class, 59, 34, 37, 18, JEIHandler.EXTRACTOR.getUid());
|
||||
registry.addRecipeClickArea(GuiExtractor.SideConfig.class, 59, 34, 37, 18, JEIHandler.EXTRACTOR.getUid());
|
||||
}
|
||||
if (register_processor[18]) {
|
||||
registry.addRecipeClickArea(GuiCentrifuge.class, 57, 30, 37, 38, JEIHandler.CENTRIFUGE.getUUID());
|
||||
registry.addRecipeClickArea(GuiCentrifuge.SideConfig.class, 57, 30, 37, 38, JEIHandler.CENTRIFUGE.getUUID());
|
||||
registry.addRecipeClickArea(GuiCentrifuge.class, 57, 30, 37, 38, JEIHandler.CENTRIFUGE.getUid());
|
||||
registry.addRecipeClickArea(GuiCentrifuge.SideConfig.class, 57, 30, 37, 38, JEIHandler.CENTRIFUGE.getUid());
|
||||
}
|
||||
if (register_processor[19]) {
|
||||
registry.addRecipeClickArea(GuiRockCrusher.class, 55, 34, 37, 18, JEIHandler.ROCK_CRUSHER.getUUID());
|
||||
registry.addRecipeClickArea(GuiRockCrusher.SideConfig.class, 55, 34, 37, 18, JEIHandler.ROCK_CRUSHER.getUUID());
|
||||
registry.addRecipeClickArea(GuiRockCrusher.class, 55, 34, 37, 18, JEIHandler.ROCK_CRUSHER.getUid());
|
||||
registry.addRecipeClickArea(GuiRockCrusher.SideConfig.class, 55, 34, 37, 18, JEIHandler.ROCK_CRUSHER.getUid());
|
||||
}
|
||||
|
||||
registry.addRecipeClickArea(GuiFissionIrradiator.class, 73, 34, 37, 18, JEIHandler.FISSION_IRRADIATOR.getUUID());
|
||||
// registry.addRecipeClickArea(GuiPebbleFissionChamber.class, 73, 34, 37, 18, JEIHandler.PEBBLE_FISSION.getUUID());
|
||||
registry.addRecipeClickArea(GuiSolidFissionCell.class, 73, 34, 37, 18, JEIHandler.SOLID_FISSION.getUUID());
|
||||
registry.addRecipeClickArea(GuiSaltFissionVessel.class, 73, 34, 37, 18, JEIHandler.SALT_FISSION.getUUID());
|
||||
registry.addRecipeClickArea(GuiSaltFissionHeater.class, 73, 34, 37, 18, JEIHandler.COOLANT_HEATER.getUUID());
|
||||
registry.addRecipeClickArea(GuiFissionIrradiator.class, 73, 34, 37, 18, JEIHandler.FISSION_IRRADIATOR.getUid());
|
||||
// registry.addRecipeClickArea(GuiPebbleFissionChamber.class, 73, 34, 37, 18, JEIHandler.PEBBLE_FISSION.getUid());
|
||||
registry.addRecipeClickArea(GuiSolidFissionCell.class, 73, 34, 37, 18, JEIHandler.SOLID_FISSION.getUid());
|
||||
registry.addRecipeClickArea(GuiSaltFissionVessel.class, 73, 34, 37, 18, JEIHandler.SALT_FISSION.getUid());
|
||||
registry.addRecipeClickArea(GuiSaltFissionHeater.class, 73, 34, 37, 18, JEIHandler.COOLANT_HEATER.getUid());
|
||||
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerManufactory.class, JEIHandler.MANUFACTORY.getUUID(), 0, 1, 4, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerSeparator.class, JEIHandler.SEPARATOR.getUUID(), 0, 1, 5, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerDecayHastener.class, JEIHandler.DECAY_HASTENER.getUUID(), 0, 1, 4, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerFuelReprocessor.class, JEIHandler.FUEL_REPROCESSOR.getUUID(), 0, 1, 9, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerAlloyFurnace.class, JEIHandler.ALLOY_FURNACE.getUUID(), 0, 2, 5, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerInfuser.class, JEIHandler.INFUSER.getUUID(), 0, 1, 4, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerMelter.class, JEIHandler.MELTER.getUUID(), 0, 1, 3, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerSupercooler.class, JEIHandler.SUPERCOOLER.getUUID(), 0, 0, 2, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerElectrolyzer.class, JEIHandler.ELECTROLYZER.getUUID(), 0, 0, 2, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerAssembler.class, JEIHandler.ASSEMBLER.getUUID(), 0, 4, 7, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerIngotFormer.class, JEIHandler.INGOT_FORMER.getUUID(), 0, 0, 3, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerPressurizer.class, JEIHandler.PRESSURIZER.getUUID(), 0, 1, 4, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerChemicalReactor.class, JEIHandler.CHEMICAL_REACTOR.getUUID(), 0, 0, 2, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerSaltMixer.class, JEIHandler.SALT_MIXER.getUUID(), 0, 0, 2, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerCrystallizer.class, JEIHandler.CRYSTALLIZER.getUUID(), 0, 0, 3, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerEnricher.class, JEIHandler.ENRICHER.getUUID(), 0, 1, 3, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerExtractor.class, JEIHandler.EXTRACTOR.getUUID(), 0, 1, 4, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerCentrifuge.class, JEIHandler.CENTRIFUGE.getUUID(), 0, 0, 2, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerRockCrusher.class, JEIHandler.ROCK_CRUSHER.getUUID(), 0, 1, 6, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerManufactory.class, JEIHandler.MANUFACTORY.getUid(), 0, 1, 4, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerSeparator.class, JEIHandler.SEPARATOR.getUid(), 0, 1, 5, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerDecayHastener.class, JEIHandler.DECAY_HASTENER.getUid(), 0, 1, 4, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerFuelReprocessor.class, JEIHandler.FUEL_REPROCESSOR.getUid(), 0, 1, 9, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerAlloyFurnace.class, JEIHandler.ALLOY_FURNACE.getUid(), 0, 2, 5, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerInfuser.class, JEIHandler.INFUSER.getUid(), 0, 1, 4, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerMelter.class, JEIHandler.MELTER.getUid(), 0, 1, 3, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerSupercooler.class, JEIHandler.SUPERCOOLER.getUid(), 0, 0, 2, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerElectrolyzer.class, JEIHandler.ELECTROLYZER.getUid(), 0, 0, 2, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerAssembler.class, JEIHandler.ASSEMBLER.getUid(), 0, 4, 7, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerIngotFormer.class, JEIHandler.INGOT_FORMER.getUid(), 0, 0, 3, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerPressurizer.class, JEIHandler.PRESSURIZER.getUid(), 0, 1, 4, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerChemicalReactor.class, JEIHandler.CHEMICAL_REACTOR.getUid(), 0, 0, 2, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerSaltMixer.class, JEIHandler.SALT_MIXER.getUid(), 0, 0, 2, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerCrystallizer.class, JEIHandler.CRYSTALLIZER.getUid(), 0, 0, 3, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerEnricher.class, JEIHandler.ENRICHER.getUid(), 0, 1, 3, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerExtractor.class, JEIHandler.EXTRACTOR.getUid(), 0, 1, 4, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerCentrifuge.class, JEIHandler.CENTRIFUGE.getUid(), 0, 0, 2, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerRockCrusher.class, JEIHandler.ROCK_CRUSHER.getUid(), 0, 1, 6, 36);
|
||||
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerFissionIrradiator.class, JEIHandler.FISSION_IRRADIATOR.getUUID(), 0, 1, 2, 36);
|
||||
// recipeTransferRegistry.addRecipeTransferHandler(ContainerPebbleFissionChamber.class,
|
||||
// JEIHandler.PEBBLE_FISSION.getUUID(), 0, 1, 2, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerSolidFissionCell.class, JEIHandler.SOLID_FISSION.getUUID(), 0, 1, 2, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerSaltFissionVessel.class, JEIHandler.SALT_FISSION.getUUID(), 0, 0, 0, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerSaltFissionHeater.class, JEIHandler.COOLANT_HEATER.getUUID(), 0, 0, 0, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerFissionIrradiator.class, JEIHandler.FISSION_IRRADIATOR.getUid(), 0, 1, 2, 36);
|
||||
// recipeTransferRegistry.addRecipeTransferHandler(ContainerPebbleFissionChamber.class, JEIHandler.PEBBLE_FISSION.getUid(), 0, 1, 2, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerSolidFissionCell.class, JEIHandler.SOLID_FISSION.getUid(), 0, 1, 2, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerSaltFissionVessel.class, JEIHandler.SALT_FISSION.getUid(), 0, 0, 0, 36);
|
||||
recipeTransferRegistry.addRecipeTransferHandler(ContainerSaltFissionHeater.class, JEIHandler.COOLANT_HEATER.getUid(), 0, 0, 0, 36);
|
||||
|
||||
for (int i = 0; i < MetaEnums.OreType.values().length; i++) {
|
||||
if (!ore_gen[i] && ore_hide_disabled) {
|
||||
@ -247,25 +246,25 @@ public class NCJEI implements IModPlugin {
|
||||
TURBINE(NCRecipes.turbine, NCBlocks.turbine_controller, "turbine", JEIRecipeWrapper.Turbine.class),
|
||||
RADIATION_SCRUBBER(NCRecipes.radiation_scrubber, NCBlocks.radiation_scrubber, "radiation_scrubber", JEIRecipeWrapper.RadiationScrubber.class);
|
||||
|
||||
private final ProcessorRecipeHandler recipeHandler;
|
||||
private final Class<? extends JEIRecipeWrapperAbstract> recipeWrapper;
|
||||
private final BasicRecipeHandler recipeHandler;
|
||||
private final Class<? extends JEIBasicRecipeWrapper> recipeWrapper;
|
||||
private final boolean enabled;
|
||||
private final List<ItemStack> crafters;
|
||||
private final String textureName;
|
||||
|
||||
JEIHandler(ProcessorRecipeHandler recipeHandler, Object crafter, String textureName, Class<? extends JEIRecipeWrapperAbstract> recipeWrapper) {
|
||||
JEIHandler(BasicRecipeHandler recipeHandler, Object crafter, String textureName, Class<? extends JEIBasicRecipeWrapper> recipeWrapper) {
|
||||
this(recipeHandler, crafter, textureName, recipeWrapper, -1);
|
||||
}
|
||||
|
||||
JEIHandler(ProcessorRecipeHandler recipeHandler, List<?> crafters, String textureName, Class<? extends JEIRecipeWrapperAbstract> recipeWrapper) {
|
||||
JEIHandler(BasicRecipeHandler recipeHandler, List<?> crafters, String textureName, Class<? extends JEIBasicRecipeWrapper> recipeWrapper) {
|
||||
this(recipeHandler, crafters, textureName, recipeWrapper, -1);
|
||||
}
|
||||
|
||||
JEIHandler(ProcessorRecipeHandler recipeHandler, Object crafter, String textureName, Class<? extends JEIRecipeWrapperAbstract> recipeWrapper, int enabled) {
|
||||
JEIHandler(BasicRecipeHandler recipeHandler, Object crafter, String textureName, Class<? extends JEIBasicRecipeWrapper> recipeWrapper, int enabled) {
|
||||
this(recipeHandler, Lists.newArrayList(crafter), textureName, recipeWrapper, enabled);
|
||||
}
|
||||
|
||||
JEIHandler(ProcessorRecipeHandler recipeHandler, List<?> crafters, String textureName, Class<? extends JEIRecipeWrapperAbstract> recipeWrapper, int enabled) {
|
||||
JEIHandler(BasicRecipeHandler recipeHandler, List<?> crafters, String textureName, Class<? extends JEIBasicRecipeWrapper> recipeWrapper, int enabled) {
|
||||
this.recipeHandler = recipeHandler;
|
||||
this.recipeWrapper = recipeWrapper;
|
||||
this.enabled = enabled < 0 ? true : register_processor[enabled];
|
||||
@ -274,7 +273,7 @@ public class NCJEI implements IModPlugin {
|
||||
}
|
||||
|
||||
@Override
|
||||
public JEICategoryAbstract getCategory(IGuiHelper guiHelper) {
|
||||
public JEIBasicCategory getCategory(IGuiHelper guiHelper) {
|
||||
switch (this) {
|
||||
case MANUFACTORY:
|
||||
return new ManufactoryCategory(guiHelper, this);
|
||||
@ -350,23 +349,23 @@ public class NCJEI implements IModPlugin {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProcessorRecipeHandler getRecipeHandler() {
|
||||
public BasicRecipeHandler getRecipeHandler() {
|
||||
return recipeHandler;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends JEIRecipeWrapperAbstract> getJEIRecipeWrapper() {
|
||||
public Class getRecipeWrapperClass() {
|
||||
return recipeWrapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<JEIRecipeWrapperAbstract> getJEIRecipes(IGuiHelper guiHelper) {
|
||||
return JEIMethods.getJEIRecipes(guiHelper, this, getRecipeHandler(), getJEIRecipeWrapper());
|
||||
public List<JEIBasicRecipeWrapper> getJEIRecipes(IGuiHelper guiHelper) {
|
||||
return JEIHelper.getJEIRecipes(guiHelper, this, getRecipeHandler(), getRecipeWrapperClass());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUUID() {
|
||||
return getRecipeHandler().getRecipeName();
|
||||
public String getUid() {
|
||||
return Global.MOD_ID + "_" + getRecipeHandler().getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -423,4 +422,23 @@ public class NCJEI implements IModPlugin {
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public static interface IJEIHandler<WRAPPER extends JEIBasicRecipeWrapper> {
|
||||
|
||||
public JEIBasicCategory getCategory(IGuiHelper guiHelper);
|
||||
|
||||
public BasicRecipeHandler getRecipeHandler();
|
||||
|
||||
public Class<WRAPPER> getRecipeWrapperClass();
|
||||
|
||||
public List<JEIBasicRecipeWrapper> getJEIRecipes(IGuiHelper guiHelper);
|
||||
|
||||
public String getUid();
|
||||
|
||||
public boolean getEnabled();
|
||||
|
||||
public List<ItemStack> getCrafters();
|
||||
|
||||
public String getTextureName();
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,10 +4,11 @@ import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.RecipeItemMapper;
|
||||
import nc.integration.jei.JEIHelper.RecipeItemMapper;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
|
||||
public class DecayGeneratorCategory extends JEICategoryProcessor<JEIRecipeWrapper.DecayGenerator> {
|
||||
public class DecayGeneratorCategory extends JEIMachineCategory<JEIRecipeWrapper.DecayGenerator> {
|
||||
|
||||
public DecayGeneratorCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "decay_generator", 47, 30, 90, 26);
|
||||
|
||||
@ -4,15 +4,15 @@ import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.RecipeFluidMapper;
|
||||
import nc.integration.jei.JEIHelper.RecipeFluidMapper;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
import nc.util.Lang;
|
||||
|
||||
public class FusionCategory extends JEICategoryProcessor<JEIRecipeWrapper.Fusion> {
|
||||
public class FusionCategory extends JEIMachineCategory<JEIRecipeWrapper.Fusion> {
|
||||
|
||||
public FusionCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "fusion_core", "_jei", 55, 30, 94, 26);
|
||||
recipeTitle = Lang.localise("gui.container.fusion_core.reactor");
|
||||
super(guiHelper, handler, "fusion_core", 55, 30, 94, 26);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -31,6 +31,6 @@ public class FusionCategory extends JEICategoryProcessor<JEIRecipeWrapper.Fusion
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return recipeTitle;
|
||||
return Lang.localise("gui.container.fusion_core.reactor");
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,15 +5,15 @@ import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.Global;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.RecipeFluidMapper;
|
||||
import nc.integration.jei.JEIHelper.RecipeFluidMapper;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
import nc.util.Lang;
|
||||
|
||||
public class CondenserCategory extends JEICategoryProcessor<JEIRecipeWrapper.Condenser> {
|
||||
public class CondenserCategory extends JEIMachineCategory<JEIRecipeWrapper.Condenser> {
|
||||
|
||||
public CondenserCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "condenser", 47, 30, 90, 26);
|
||||
recipeTitle = Lang.localise(Global.MOD_ID + ".multiblock_gui.condenser.jei_name");
|
||||
super(guiHelper, handler, "condenser_controller", 47, 30, 90, 26);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -25,4 +25,9 @@ public class CondenserCategory extends JEICategoryProcessor<JEIRecipeWrapper.Con
|
||||
fluidMapper.map(IngredientSorption.OUTPUT, 0, 1, 112 - backPosX, 31 - backPosY, 24, 24);
|
||||
fluidMapper.mapFluidsTo(recipeLayout.getFluidStacks(), ingredients);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return Lang.localise(Global.MOD_ID + ".multiblock_gui.condenser.jei_name");
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,15 +5,15 @@ import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.Global;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.RecipeFluidMapper;
|
||||
import nc.integration.jei.JEIHelper.RecipeFluidMapper;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
import nc.util.Lang;
|
||||
|
||||
public class CoolantHeaterCategory extends JEICategoryProcessor<JEIRecipeWrapper.CoolantHeater> {
|
||||
public class CoolantHeaterCategory extends JEIMachineCategory<JEIRecipeWrapper.CoolantHeater> {
|
||||
|
||||
public CoolantHeaterCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "salt_fission_heater", 47, 30, 90, 26);
|
||||
recipeTitle = Lang.localise(Global.MOD_ID + ".multiblock_gui.coolant_heater.jei_name");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -25,4 +25,9 @@ public class CoolantHeaterCategory extends JEICategoryProcessor<JEIRecipeWrapper
|
||||
fluidMapper.map(IngredientSorption.OUTPUT, 0, 1, 112 - backPosX, 31 - backPosY, 24, 24);
|
||||
fluidMapper.mapFluidsTo(recipeLayout.getFluidStacks(), ingredients);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return Lang.localise(Global.MOD_ID + ".multiblock_gui.coolant_heater.jei_name");
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,15 +5,15 @@ import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.Global;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.RecipeFluidMapper;
|
||||
import nc.integration.jei.JEIHelper.RecipeFluidMapper;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
import nc.util.Lang;
|
||||
|
||||
public class FissionEmergencyCoolingCategory extends JEICategoryProcessor<JEIRecipeWrapper.FissionEmergencyCooling> {
|
||||
public class FissionEmergencyCoolingCategory extends JEIMachineCategory<JEIRecipeWrapper.FissionEmergencyCooling> {
|
||||
|
||||
public FissionEmergencyCoolingCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "fission_emergency_cooling", 47, 30, 90, 26);
|
||||
recipeTitle = Lang.localise(Global.MOD_ID + ".fission_emergency_cooling.jei_name");
|
||||
super(guiHelper, handler, "fission_vent", 47, 30, 90, 26);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -25,4 +25,9 @@ public class FissionEmergencyCoolingCategory extends JEICategoryProcessor<JEIRec
|
||||
fluidMapper.map(IngredientSorption.OUTPUT, 0, 1, 112 - backPosX, 31 - backPosY, 24, 24);
|
||||
fluidMapper.mapFluidsTo(recipeLayout.getFluidStacks(), ingredients);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return Lang.localise(Global.MOD_ID + ".fission_emergency_cooling.jei_name");
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,15 +5,15 @@ import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.Global;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.RecipeFluidMapper;
|
||||
import nc.integration.jei.JEIHelper.RecipeFluidMapper;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
import nc.util.Lang;
|
||||
|
||||
public class FissionHeatingCategory extends JEICategoryProcessor<JEIRecipeWrapper.FissionHeating> {
|
||||
public class FissionHeatingCategory extends JEIMachineCategory<JEIRecipeWrapper.FissionHeating> {
|
||||
|
||||
public FissionHeatingCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "fission_heating", 47, 30, 90, 26);
|
||||
recipeTitle = Lang.localise(Global.MOD_ID + ".fission_heating.jei_name");
|
||||
super(guiHelper, handler, "fission_vent", 47, 30, 90, 26);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -25,4 +25,9 @@ public class FissionHeatingCategory extends JEICategoryProcessor<JEIRecipeWrappe
|
||||
fluidMapper.map(IngredientSorption.OUTPUT, 0, 1, 112 - backPosX, 31 - backPosY, 24, 24);
|
||||
fluidMapper.mapFluidsTo(recipeLayout.getFluidStacks(), ingredients);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return Lang.localise(Global.MOD_ID + ".fission_heating.jei_name");
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,15 +5,15 @@ import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.Global;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.RecipeItemMapper;
|
||||
import nc.integration.jei.JEIHelper.RecipeItemMapper;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
import nc.util.Lang;
|
||||
|
||||
public class FissionIrradiatorCategory extends JEICategoryProcessor<JEIRecipeWrapper.FissionIrradiator> {
|
||||
public class FissionIrradiatorCategory extends JEIMachineCategory<JEIRecipeWrapper.FissionIrradiator> {
|
||||
|
||||
public FissionIrradiatorCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "fission_irradiator", "_jei", 47, 30, 90, 26);
|
||||
recipeTitle = Lang.localise(Global.MOD_ID + ".multiblock_gui.fission_irradiator.jei_name");
|
||||
super(guiHelper, handler, "fission_irradiator", 47, 30, 90, 26);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -25,4 +25,9 @@ public class FissionIrradiatorCategory extends JEICategoryProcessor<JEIRecipeWra
|
||||
itemMapper.map(IngredientSorption.OUTPUT, 0, 1, 116 - backPosX, 35 - backPosY);
|
||||
itemMapper.mapItemsTo(recipeLayout.getItemStacks(), ingredients);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return Lang.localise(Global.MOD_ID + ".multiblock_gui.fission_irradiator.jei_name");
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,15 +5,15 @@ import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.Global;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.RecipeItemMapper;
|
||||
import nc.integration.jei.JEIHelper.RecipeItemMapper;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
import nc.util.Lang;
|
||||
|
||||
public class FissionModeratorCategory extends JEICategoryProcessor<JEIRecipeWrapper.FissionModerator> {
|
||||
public class FissionModeratorCategory extends JEIMachineCategory<JEIRecipeWrapper.FissionModerator> {
|
||||
|
||||
public FissionModeratorCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "fission_moderator", 47, 30, 90, 26);
|
||||
recipeTitle = Lang.localise(Global.MOD_ID + ".fission_moderator.jei_name");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -24,4 +24,9 @@ public class FissionModeratorCategory extends JEICategoryProcessor<JEIRecipeWrap
|
||||
itemMapper.map(IngredientSorption.INPUT, 0, 0, 86 - backPosX, 35 - backPosY);
|
||||
itemMapper.mapItemsTo(recipeLayout.getItemStacks(), ingredients);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return Lang.localise(Global.MOD_ID + ".fission_moderator.jei_name");
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,15 +5,15 @@ import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.Global;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.RecipeItemMapper;
|
||||
import nc.integration.jei.JEIHelper.RecipeItemMapper;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
import nc.util.Lang;
|
||||
|
||||
public class FissionReflectorCategory extends JEICategoryProcessor<JEIRecipeWrapper.FissionReflector> {
|
||||
public class FissionReflectorCategory extends JEIMachineCategory<JEIRecipeWrapper.FissionReflector> {
|
||||
|
||||
public FissionReflectorCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "fission_reflector", 47, 30, 90, 26);
|
||||
recipeTitle = Lang.localise(Global.MOD_ID + ".fission_reflector.jei_name");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -24,4 +24,9 @@ public class FissionReflectorCategory extends JEICategoryProcessor<JEIRecipeWrap
|
||||
itemMapper.map(IngredientSorption.INPUT, 0, 0, 86 - backPosX, 35 - backPosY);
|
||||
itemMapper.mapItemsTo(recipeLayout.getItemStacks(), ingredients);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return Lang.localise(Global.MOD_ID + ".fission_reflector.jei_name");
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,16 +5,16 @@ import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.Global;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.RecipeFluidMapper;
|
||||
import nc.integration.jei.JEIHelper.RecipeFluidMapper;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
import nc.util.Lang;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
|
||||
public class HeatExchangerCategory extends JEICategoryProcessor<JEIRecipeWrapper.HeatExchanger> {
|
||||
public class HeatExchangerCategory extends JEIMachineCategory<JEIRecipeWrapper.HeatExchanger> {
|
||||
|
||||
public HeatExchangerCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "heat_exchanger", 47, 30, 90, 26);
|
||||
recipeTitle = Lang.localise(Global.MOD_ID + ".multiblock_gui.heat_exchanger.jei_name");
|
||||
super(guiHelper, handler, "heat_exchanger_controller", 47, 30, 90, 26);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -39,4 +39,9 @@ public class HeatExchangerCategory extends JEICategoryProcessor<JEIRecipeWrapper
|
||||
}
|
||||
|
||||
private static final String TEMPERATURE = Lang.localise("jei.nuclearcraft.exchanger_fluid_temp");
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return Lang.localise(Global.MOD_ID + ".multiblock_gui.heat_exchanger.jei_name");
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,15 +5,15 @@ import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.Global;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.RecipeItemMapper;
|
||||
import nc.integration.jei.JEIHelper.RecipeItemMapper;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
import nc.util.Lang;
|
||||
|
||||
public class PebbleFissionCategory extends JEICategoryProcessor<JEIRecipeWrapper.PebbleFission> {
|
||||
public class PebbleFissionCategory extends JEIMachineCategory<JEIRecipeWrapper.PebbleFission> {
|
||||
|
||||
public PebbleFissionCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "pebble_fission_chamber", 47, 30, 90, 26);
|
||||
recipeTitle = Lang.localise(Global.MOD_ID + ".multiblock_gui.pebble_fission.jei_name");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -25,4 +25,9 @@ public class PebbleFissionCategory extends JEICategoryProcessor<JEIRecipeWrapper
|
||||
itemMapper.map(IngredientSorption.OUTPUT, 0, 1, 116 - backPosX, 35 - backPosY);
|
||||
itemMapper.mapItemsTo(recipeLayout.getItemStacks(), ingredients);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return Lang.localise(Global.MOD_ID + ".multiblock_gui.pebble_fission.jei_name");
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,15 +5,15 @@ import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.Global;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.RecipeFluidMapper;
|
||||
import nc.integration.jei.JEIHelper.RecipeFluidMapper;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
import nc.util.Lang;
|
||||
|
||||
public class SaltFissionCategory extends JEICategoryProcessor<JEIRecipeWrapper.SaltFission> {
|
||||
public class SaltFissionCategory extends JEIMachineCategory<JEIRecipeWrapper.SaltFission> {
|
||||
|
||||
public SaltFissionCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "salt_fission_vessel", 47, 30, 90, 26);
|
||||
recipeTitle = Lang.localise(Global.MOD_ID + ".multiblock_gui.salt_fission.jei_name");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -25,4 +25,9 @@ public class SaltFissionCategory extends JEICategoryProcessor<JEIRecipeWrapper.S
|
||||
fluidMapper.map(IngredientSorption.OUTPUT, 0, 1, 112 - backPosX, 31 - backPosY, 24, 24);
|
||||
fluidMapper.mapFluidsTo(recipeLayout.getFluidStacks(), ingredients);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return Lang.localise(Global.MOD_ID + ".multiblock_gui.salt_fission.jei_name");
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,15 +5,15 @@ import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.Global;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.RecipeItemMapper;
|
||||
import nc.integration.jei.JEIHelper.RecipeItemMapper;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
import nc.util.Lang;
|
||||
|
||||
public class SolidFissionCategory extends JEICategoryProcessor<JEIRecipeWrapper.SolidFission> {
|
||||
public class SolidFissionCategory extends JEIMachineCategory<JEIRecipeWrapper.SolidFission> {
|
||||
|
||||
public SolidFissionCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "solid_fission_cell", 47, 30, 90, 26);
|
||||
recipeTitle = Lang.localise(Global.MOD_ID + ".multiblock_gui.solid_fission.jei_name");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -25,4 +25,9 @@ public class SolidFissionCategory extends JEICategoryProcessor<JEIRecipeWrapper.
|
||||
itemMapper.map(IngredientSorption.OUTPUT, 0, 1, 116 - backPosX, 35 - backPosY);
|
||||
itemMapper.mapItemsTo(recipeLayout.getItemStacks(), ingredients);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return Lang.localise(Global.MOD_ID + ".multiblock_gui.solid_fission.jei_name");
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,15 +5,15 @@ import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.Global;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.RecipeFluidMapper;
|
||||
import nc.integration.jei.JEIHelper.RecipeFluidMapper;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
import nc.util.Lang;
|
||||
|
||||
public class TurbineCategory extends JEICategoryProcessor<JEIRecipeWrapper.Turbine> {
|
||||
public class TurbineCategory extends JEIMachineCategory<JEIRecipeWrapper.Turbine> {
|
||||
|
||||
public TurbineCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "turbine", 47, 30, 90, 26);
|
||||
recipeTitle = Lang.localise(Global.MOD_ID + ".multiblock_gui.turbine.jei_name");
|
||||
super(guiHelper, handler, "turbine_controller", 47, 30, 90, 26);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -25,4 +25,9 @@ public class TurbineCategory extends JEICategoryProcessor<JEIRecipeWrapper.Turbi
|
||||
fluidMapper.map(IngredientSorption.OUTPUT, 0, 1, 112 - backPosX, 31 - backPosY, 24, 24);
|
||||
fluidMapper.mapFluidsTo(recipeLayout.getFluidStacks(), ingredients);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return Lang.localise(Global.MOD_ID + ".multiblock_gui.turbine.jei_name");
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,15 +5,15 @@ import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.Global;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.*;
|
||||
import nc.integration.jei.JEIHelper.*;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
import nc.util.Lang;
|
||||
|
||||
public class CollectorCategory extends JEICategoryProcessor<JEIRecipeWrapper.Collector> {
|
||||
public class CollectorCategory extends JEIMachineCategory<JEIRecipeWrapper.Collector> {
|
||||
|
||||
public CollectorCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "collector", 33, 30, 118, 26);
|
||||
recipeTitle = Lang.localise(Global.MOD_ID + ".collector.jei_name");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -28,4 +28,9 @@ public class CollectorCategory extends JEICategoryProcessor<JEIRecipeWrapper.Col
|
||||
itemMapper.mapItemsTo(recipeLayout.getItemStacks(), ingredients);
|
||||
fluidMapper.mapFluidsTo(recipeLayout.getFluidStacks(), ingredients);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return Lang.localise(Global.MOD_ID + ".collector.jei_name");
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,15 +5,15 @@ import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.Global;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.*;
|
||||
import nc.integration.jei.JEIHelper.*;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
import nc.util.Lang;
|
||||
|
||||
public class RadiationScrubberCategory extends JEICategoryProcessor<JEIRecipeWrapper.RadiationScrubber> {
|
||||
public class RadiationScrubberCategory extends JEIMachineCategory<JEIRecipeWrapper.RadiationScrubber> {
|
||||
|
||||
public RadiationScrubberCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "radiation_scrubber", 31, 30, 130, 26);
|
||||
recipeTitle = Lang.localise(Global.MOD_ID + ".radiation_scrubber.jei_name");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -29,4 +29,9 @@ public class RadiationScrubberCategory extends JEICategoryProcessor<JEIRecipeWra
|
||||
itemMapper.mapItemsTo(recipeLayout.getItemStacks(), ingredients);
|
||||
fluidMapper.mapFluidsTo(recipeLayout.getFluidStacks(), ingredients);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return Lang.localise(Global.MOD_ID + ".radiation_scrubber.jei_name");
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,10 +4,11 @@ import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.RecipeItemMapper;
|
||||
import nc.integration.jei.JEIHelper.RecipeItemMapper;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
|
||||
public class AlloyFurnaceCategory extends JEICategoryProcessor<JEIRecipeWrapper.AlloyFurnace> {
|
||||
public class AlloyFurnaceCategory extends JEIMachineCategory<JEIRecipeWrapper.AlloyFurnace> {
|
||||
|
||||
public AlloyFurnaceCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "alloy_furnace", 45, 30, 102, 26);
|
||||
|
||||
@ -4,10 +4,11 @@ import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.RecipeItemMapper;
|
||||
import nc.integration.jei.JEIHelper.RecipeItemMapper;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
|
||||
public class AssemblerCategory extends JEICategoryProcessor<JEIRecipeWrapper.Assembler> {
|
||||
public class AssemblerCategory extends JEIMachineCategory<JEIRecipeWrapper.Assembler> {
|
||||
|
||||
public AssemblerCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "assembler", 45, 30, 102, 38);
|
||||
|
||||
@ -4,10 +4,11 @@ import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.RecipeFluidMapper;
|
||||
import nc.integration.jei.JEIHelper.RecipeFluidMapper;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
|
||||
public class CentrifugeCategory extends JEICategoryProcessor<JEIRecipeWrapper.Centrifuge> {
|
||||
public class CentrifugeCategory extends JEIMachineCategory<JEIRecipeWrapper.Centrifuge> {
|
||||
|
||||
public CentrifugeCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "centrifuge", 39, 30, 114, 38);
|
||||
|
||||
@ -4,10 +4,11 @@ import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.RecipeFluidMapper;
|
||||
import nc.integration.jei.JEIHelper.RecipeFluidMapper;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
|
||||
public class ChemicalReactorCategory extends JEICategoryProcessor<JEIRecipeWrapper.ChemicalReactor> {
|
||||
public class ChemicalReactorCategory extends JEIMachineCategory<JEIRecipeWrapper.ChemicalReactor> {
|
||||
|
||||
public ChemicalReactorCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "chemical_reactor", 31, 30, 130, 26);
|
||||
|
||||
@ -4,10 +4,11 @@ import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.*;
|
||||
import nc.integration.jei.JEIHelper.*;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
|
||||
public class CrystallizerCategory extends JEICategoryProcessor<JEIRecipeWrapper.Crystallizer> {
|
||||
public class CrystallizerCategory extends JEIMachineCategory<JEIRecipeWrapper.Crystallizer> {
|
||||
|
||||
public CrystallizerCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "crystallizer", 47, 30, 90, 26);
|
||||
|
||||
@ -4,10 +4,11 @@ import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.RecipeItemMapper;
|
||||
import nc.integration.jei.JEIHelper.RecipeItemMapper;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
|
||||
public class DecayHastenerCategory extends JEICategoryProcessor<JEIRecipeWrapper.DecayHastener> {
|
||||
public class DecayHastenerCategory extends JEIMachineCategory<JEIRecipeWrapper.DecayHastener> {
|
||||
|
||||
public DecayHastenerCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "decay_hastener", 47, 30, 90, 26);
|
||||
|
||||
@ -4,10 +4,11 @@ import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.RecipeFluidMapper;
|
||||
import nc.integration.jei.JEIHelper.RecipeFluidMapper;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
|
||||
public class ElectrolyzerCategory extends JEICategoryProcessor<JEIRecipeWrapper.Electrolyzer> {
|
||||
public class ElectrolyzerCategory extends JEIMachineCategory<JEIRecipeWrapper.Electrolyzer> {
|
||||
|
||||
public ElectrolyzerCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "electrolyzer", 49, 30, 94, 38);
|
||||
|
||||
@ -4,10 +4,11 @@ import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.*;
|
||||
import nc.integration.jei.JEIHelper.*;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
|
||||
public class EnricherCategory extends JEICategoryProcessor<JEIRecipeWrapper.Enricher> {
|
||||
public class EnricherCategory extends JEIMachineCategory<JEIRecipeWrapper.Enricher> {
|
||||
|
||||
public EnricherCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "enricher", 45, 30, 102, 26);
|
||||
|
||||
@ -4,10 +4,11 @@ import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.*;
|
||||
import nc.integration.jei.JEIHelper.*;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
|
||||
public class ExtractorCategory extends JEICategoryProcessor<JEIRecipeWrapper.Extractor> {
|
||||
public class ExtractorCategory extends JEIMachineCategory<JEIRecipeWrapper.Extractor> {
|
||||
|
||||
public ExtractorCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "extractor", 33, 30, 118, 26);
|
||||
|
||||
@ -4,10 +4,11 @@ import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.RecipeItemMapper;
|
||||
import nc.integration.jei.JEIHelper.RecipeItemMapper;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
|
||||
public class FuelReprocessorCategory extends JEICategoryProcessor<JEIRecipeWrapper.FuelReprocessor> {
|
||||
public class FuelReprocessorCategory extends JEIMachineCategory<JEIRecipeWrapper.FuelReprocessor> {
|
||||
|
||||
public FuelReprocessorCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "fuel_reprocessor", 29, 30, 134, 38);
|
||||
|
||||
@ -4,10 +4,11 @@ import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.*;
|
||||
import nc.integration.jei.JEIHelper.*;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
|
||||
public class InfuserCategory extends JEICategoryProcessor<JEIRecipeWrapper.Infuser> {
|
||||
public class InfuserCategory extends JEIMachineCategory<JEIRecipeWrapper.Infuser> {
|
||||
|
||||
public InfuserCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "infuser", 45, 30, 102, 26);
|
||||
|
||||
@ -4,10 +4,11 @@ import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.*;
|
||||
import nc.integration.jei.JEIHelper.*;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
|
||||
public class IngotFormerCategory extends JEICategoryProcessor<JEIRecipeWrapper.IngotFormer> {
|
||||
public class IngotFormerCategory extends JEIMachineCategory<JEIRecipeWrapper.IngotFormer> {
|
||||
|
||||
public IngotFormerCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "ingot_former", 47, 30, 90, 26);
|
||||
|
||||
@ -4,10 +4,11 @@ import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.RecipeItemMapper;
|
||||
import nc.integration.jei.JEIHelper.RecipeItemMapper;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
|
||||
public class ManufactoryCategory extends JEICategoryProcessor<JEIRecipeWrapper.Manufactory> {
|
||||
public class ManufactoryCategory extends JEIMachineCategory<JEIRecipeWrapper.Manufactory> {
|
||||
|
||||
public ManufactoryCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "manufactory", 47, 30, 90, 26);
|
||||
|
||||
@ -4,10 +4,11 @@ import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.*;
|
||||
import nc.integration.jei.JEIHelper.*;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
|
||||
public class MelterCategory extends JEICategoryProcessor<JEIRecipeWrapper.Melter> {
|
||||
public class MelterCategory extends JEIMachineCategory<JEIRecipeWrapper.Melter> {
|
||||
|
||||
public MelterCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "melter", 47, 30, 90, 26);
|
||||
|
||||
@ -4,10 +4,11 @@ import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.RecipeItemMapper;
|
||||
import nc.integration.jei.JEIHelper.RecipeItemMapper;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
|
||||
public class PressurizerCategory extends JEICategoryProcessor<JEIRecipeWrapper.Pressurizer> {
|
||||
public class PressurizerCategory extends JEIMachineCategory<JEIRecipeWrapper.Pressurizer> {
|
||||
|
||||
public PressurizerCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "pressurizer", 47, 30, 90, 26);
|
||||
|
||||
@ -4,10 +4,11 @@ import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.RecipeItemMapper;
|
||||
import nc.integration.jei.JEIHelper.RecipeItemMapper;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
|
||||
public class RockCrusherCategory extends JEICategoryProcessor<JEIRecipeWrapper.RockCrusher> {
|
||||
public class RockCrusherCategory extends JEIMachineCategory<JEIRecipeWrapper.RockCrusher> {
|
||||
|
||||
public RockCrusherCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "rock_crusher", 29, 30, 122, 26);
|
||||
|
||||
@ -4,10 +4,11 @@ import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.RecipeFluidMapper;
|
||||
import nc.integration.jei.JEIHelper.RecipeFluidMapper;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
|
||||
public class SaltMixerCategory extends JEICategoryProcessor<JEIRecipeWrapper.SaltMixer> {
|
||||
public class SaltMixerCategory extends JEIMachineCategory<JEIRecipeWrapper.SaltMixer> {
|
||||
|
||||
public SaltMixerCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "salt_mixer", 45, 30, 102, 26);
|
||||
|
||||
@ -4,10 +4,11 @@ import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.RecipeItemMapper;
|
||||
import nc.integration.jei.JEIHelper.RecipeItemMapper;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
|
||||
public class SeparatorCategory extends JEICategoryProcessor<JEIRecipeWrapper.Separator> {
|
||||
public class SeparatorCategory extends JEIMachineCategory<JEIRecipeWrapper.Separator> {
|
||||
|
||||
public SeparatorCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "separator", 33, 30, 118, 26);
|
||||
|
||||
@ -4,10 +4,11 @@ import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import nc.integration.jei.*;
|
||||
import nc.integration.jei.JEIMethods.RecipeFluidMapper;
|
||||
import nc.integration.jei.JEIHelper.RecipeFluidMapper;
|
||||
import nc.integration.jei.NCJEI.IJEIHandler;
|
||||
import nc.recipe.IngredientSorption;
|
||||
|
||||
public class SupercoolerCategory extends JEICategoryProcessor<JEIRecipeWrapper.Supercooler> {
|
||||
public class SupercoolerCategory extends JEIMachineCategory<JEIRecipeWrapper.Supercooler> {
|
||||
|
||||
public SupercoolerCategory(IGuiHelper guiHelper, IJEIHandler handler) {
|
||||
super(guiHelper, handler, "supercooler", 47, 30, 90, 26);
|
||||
|
||||
@ -93,6 +93,10 @@ public abstract class MultiblockLogic<MULTIBLOCK extends Multiblock<T, PACKET> &
|
||||
|
||||
public abstract void onMachineDisassembled();
|
||||
|
||||
public abstract void onAssimilate(Multiblock assimilated);
|
||||
|
||||
public abstract void onAssimilated(Multiblock assimilator);
|
||||
|
||||
public abstract boolean isMachineWhole(Multiblock multiblock);
|
||||
|
||||
public abstract boolean onUpdateServer();
|
||||
@ -232,6 +236,8 @@ public abstract class MultiblockLogic<MULTIBLOCK extends Multiblock<T, PACKET> &
|
||||
|
||||
public abstract void onPacket(PACKET message);
|
||||
|
||||
public abstract void clearAllMaterial();
|
||||
|
||||
// Multiblock Validators
|
||||
|
||||
public boolean isBlockGoodForInterior(World world, int x, int y, int z, Multiblock multiblock) {
|
||||
|
||||
@ -4,27 +4,21 @@ import it.unimi.dsi.fastutil.longs.*;
|
||||
import nc.multiblock.network.MultiblockUpdatePacket;
|
||||
import nc.multiblock.tile.ITileMultiblockPart;
|
||||
|
||||
public class PartBundle<TYPE extends T, MULTIBLOCK extends Multiblock<T, PACKET>, T extends ITileMultiblockPart<MULTIBLOCK>, PACKET extends MultiblockUpdatePacket> {
|
||||
public abstract class PartBunch<TYPE extends T, MULTIBLOCK extends Multiblock<T, PACKET>, T extends ITileMultiblockPart<MULTIBLOCK>, PACKET extends MultiblockUpdatePacket> {
|
||||
|
||||
protected boolean initialized = false;
|
||||
|
||||
protected final MULTIBLOCK multiblock;
|
||||
protected int id;
|
||||
|
||||
protected final Long2ObjectMap<TYPE> partMap = new Long2ObjectOpenHashMap<>();
|
||||
|
||||
public PartBundle(MULTIBLOCK multiblock, int id) {
|
||||
public PartBunch(MULTIBLOCK multiblock) {
|
||||
this.multiblock = multiblock;
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int newId) {
|
||||
id = newId;
|
||||
}
|
||||
|
||||
public Long2ObjectMap<TYPE> getPartMap() {
|
||||
return partMap;
|
||||
}
|
||||
|
||||
protected abstract void init();
|
||||
}
|
||||
@ -12,7 +12,7 @@ import it.unimi.dsi.fastutil.objects.*;
|
||||
import nc.multiblock.fission.FissionPlacement;
|
||||
import nc.multiblock.tile.ITileMultiblockPart;
|
||||
import nc.multiblock.turbine.TurbinePlacement;
|
||||
import nc.recipe.ProcessorRecipeHandler;
|
||||
import nc.recipe.BasicRecipeHandler;
|
||||
import nc.util.*;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
@ -734,7 +734,7 @@ public abstract class PlacementRule<T extends ITileMultiblockPart> {
|
||||
|
||||
// Tooltip Recipes
|
||||
|
||||
public static class TooltipRecipeHandler extends ProcessorRecipeHandler {
|
||||
public static class TooltipRecipeHandler extends BasicRecipeHandler {
|
||||
|
||||
public TooltipRecipeHandler(String type) {
|
||||
super(type + "_placement_rules", 1, 0, 0, 0);
|
||||
|
||||
12
src/main/java/nc/multiblock/fission/FissionPartBunch.java
Normal file
12
src/main/java/nc/multiblock/fission/FissionPartBunch.java
Normal file
@ -0,0 +1,12 @@
|
||||
package nc.multiblock.fission;
|
||||
|
||||
import nc.multiblock.PartBunch;
|
||||
import nc.multiblock.fission.tile.IFissionPart;
|
||||
import nc.multiblock.network.FissionUpdatePacket;
|
||||
|
||||
public abstract class FissionPartBunch<T extends IFissionPart> extends PartBunch<T, FissionReactor, IFissionPart, FissionUpdatePacket> {
|
||||
|
||||
public FissionPartBunch(FissionReactor reactor) {
|
||||
super(reactor);
|
||||
}
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
package nc.multiblock.fission;
|
||||
|
||||
import nc.multiblock.PartBundle;
|
||||
import nc.multiblock.fission.tile.IFissionPart;
|
||||
import nc.multiblock.network.FissionUpdatePacket;
|
||||
|
||||
public class FissionPartBundle<T extends IFissionPart> extends PartBundle<T, FissionReactor, IFissionPart, FissionUpdatePacket> {
|
||||
|
||||
public FissionPartBundle(FissionReactor reactor, int id) {
|
||||
super(reactor, id);
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
package nc.multiblock.fission;
|
||||
|
||||
import static nc.block.property.BlockProperties.*;
|
||||
import static nc.config.NCConfig.*;
|
||||
|
||||
import java.util.*;
|
||||
@ -24,8 +25,9 @@ import nc.tile.internal.energy.EnergyStorage;
|
||||
import nc.tile.internal.fluid.Tank;
|
||||
import nc.tile.internal.heat.HeatBuffer;
|
||||
import nc.util.NCMath;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public class FissionReactorLogic extends MultiblockLogic<FissionReactor, FissionReactorLogic, IFissionPart, FissionUpdatePacket> {
|
||||
@ -128,6 +130,7 @@ public class FissionReactorLogic extends MultiblockLogic<FissionReactor, Fission
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAssimilate(Multiblock assimilated) {
|
||||
if (assimilated instanceof FissionReactor) {
|
||||
FissionReactor assimilatedReactor = (FissionReactor) assimilated;
|
||||
@ -142,6 +145,7 @@ public class FissionReactorLogic extends MultiblockLogic<FissionReactor, Fission
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAssimilated(Multiblock assimilator) {}
|
||||
|
||||
public void refreshConnections() {
|
||||
@ -178,9 +182,9 @@ public class FissionReactorLogic extends MultiblockLogic<FissionReactor, Fission
|
||||
IFissionFuelComponent fuelComponent = (IFissionFuelComponent) component;
|
||||
fuelComponent.refreshIsProcessing(false);
|
||||
if ((fuelComponent.isFunctional() || fuelComponent.isSelfPriming()) && !primedFailCache.containsKey(fuelComponent.getTilePos().toLong())) {
|
||||
fuelComponent.tryPriming(getReactor());
|
||||
fuelComponent.tryPriming(getReactor(), false);
|
||||
if (fuelComponent.isPrimed()) {
|
||||
primedCache.add(fuelComponent);
|
||||
fuelComponent.addToPrimedCache(primedCache);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -204,9 +208,76 @@ public class FissionReactorLogic extends MultiblockLogic<FissionReactor, Fission
|
||||
while (getReactor().refreshFlag);
|
||||
}
|
||||
|
||||
public void distributeFlux(final ObjectSet<IFissionFuelComponent> primedCache, final Long2ObjectMap<IFissionFuelComponent> primedFailCache) {}
|
||||
public void distributeFlux(final ObjectSet<IFissionFuelComponent> primedCache, final Long2ObjectMap<IFissionFuelComponent> primedFailCache) {
|
||||
for (TileFissionSource source : getParts(TileFissionSource.class)) {
|
||||
IBlockState state = getWorld().getBlockState(source.getPos());
|
||||
EnumFacing facing = source.getPartPosition().getFacing();
|
||||
source.refreshIsRedstonePowered(getWorld(), source.getPos());
|
||||
getWorld().setBlockState(source.getPos(), state.withProperty(FACING_ALL, facing != null ? facing : state.getValue(FACING_ALL)).withProperty(ACTIVE, source.getIsRedstonePowered()), 3);
|
||||
|
||||
if (!source.getIsRedstonePowered()) {
|
||||
continue;
|
||||
}
|
||||
PrimingTargetInfo targetInfo = source.getPrimingTarget(false);
|
||||
if (targetInfo == null) {
|
||||
continue;
|
||||
}
|
||||
IFissionFuelComponent fuelComponent = targetInfo.fuelComponent;
|
||||
if (fuelComponent == null || primedFailCache.containsKey(fuelComponent.getTilePos().toLong())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
fuelComponent.tryPriming(getReactor(), true);
|
||||
if (fuelComponent.isPrimed()) {
|
||||
fuelComponent.addToPrimedCache(primedCache);
|
||||
}
|
||||
}
|
||||
|
||||
for (IFissionFuelComponent primedComponent : primedCache) {
|
||||
iterateFluxSearch(primedComponent);
|
||||
}
|
||||
|
||||
for (IFissionFuelComponent primedComponent : primedCache) {
|
||||
primedComponent.refreshIsProcessing(false);
|
||||
refreshFuelComponentLocal(primedComponent);
|
||||
primedComponent.unprime();
|
||||
|
||||
if (!primedComponent.isFunctional()) {
|
||||
primedFailCache.put(primedComponent.getTilePos().toLong(), primedComponent);
|
||||
getReactor().refreshFlag = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void refreshClusters() {
|
||||
refreshAllFuelComponentModerators();
|
||||
|
||||
getReactor().passiveModeratorCache.removeAll(getReactor().activeModeratorCache);
|
||||
|
||||
for (IFissionComponent component : getParts(IFissionComponent.class)) {
|
||||
if (component != null && component.isClusterRoot()) {
|
||||
iterateClusterSearch(component);
|
||||
}
|
||||
}
|
||||
|
||||
for (long posLong : getReactor().activeModeratorCache) {
|
||||
for (EnumFacing dir : EnumFacing.VALUES) {
|
||||
IFissionComponent component = getPartMap(IFissionComponent.class).get(BlockPos.fromLong(posLong).offset(dir).toLong());
|
||||
if (component != null) {
|
||||
iterateClusterSearch(component);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (long posLong : getReactor().activeReflectorCache) {
|
||||
for (EnumFacing dir : EnumFacing.VALUES) {
|
||||
IFissionComponent component = getPartMap(IFissionComponent.class).get(BlockPos.fromLong(posLong).offset(dir).toLong());
|
||||
if (component != null) {
|
||||
iterateClusterSearch(component);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (IFissionComponent component : assumedValidCache.values()) {
|
||||
if (!component.isFunctional()) {
|
||||
componentFailCache.put(component.getTilePos().toLong(), component);
|
||||
@ -230,12 +301,54 @@ public class FissionReactorLogic extends MultiblockLogic<FissionReactor, Fission
|
||||
getReactor().sortClusters();
|
||||
}
|
||||
|
||||
public void refreshAllFuelComponentModerators() {}
|
||||
|
||||
public void refreshClusterStats(FissionCluster cluster) {
|
||||
cluster.componentCount = cluster.fuelComponentCount = 0;
|
||||
cluster.cooling = cluster.rawHeating = cluster.totalHeatMult = 0L;
|
||||
cluster.effectiveHeating = cluster.meanHeatMult = cluster.totalEfficiency = cluster.meanEfficiency = cluster.overcoolingEfficiencyFactor = cluster.undercoolingLifetimeFactor = cluster.meanHeatingSpeedMultiplier = 0D;
|
||||
|
||||
cluster.heatBuffer.setHeatCapacity(FissionReactor.BASE_MAX_HEAT * cluster.getComponentMap().size());
|
||||
|
||||
incrementClusterStatsFromComponents(cluster);
|
||||
|
||||
if (getReactor().refreshFlag) {
|
||||
return;
|
||||
}
|
||||
|
||||
cluster.overcoolingEfficiencyFactor = cluster.cooling == 0L ? 1D : Math.min(1D, (double) (cluster.rawHeating + fission_cooling_efficiency_leniency) / (double) cluster.cooling);
|
||||
cluster.undercoolingLifetimeFactor = cluster.rawHeating == 0L ? 1D : Math.min(1D, (double) (cluster.cooling + fission_cooling_efficiency_leniency) / (double) cluster.rawHeating);
|
||||
cluster.effectiveHeating *= cluster.overcoolingEfficiencyFactor;
|
||||
cluster.totalEfficiency *= cluster.overcoolingEfficiencyFactor;
|
||||
cluster.meanHeatMult = cluster.fuelComponentCount == 0 ? 0D : (double) cluster.totalHeatMult / (double) cluster.fuelComponentCount;
|
||||
cluster.meanEfficiency = cluster.fuelComponentCount == 0 ? 0D : cluster.totalEfficiency / cluster.fuelComponentCount;
|
||||
|
||||
for (IFissionComponent component : cluster.getComponentMap().values()) {
|
||||
if (component instanceof IFissionFuelComponent) {
|
||||
IFissionFuelComponent fuelComponent = (IFissionFuelComponent) component;
|
||||
fuelComponent.setUndercoolingLifetimeFactor(cluster.undercoolingLifetimeFactor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void incrementClusterStatsFromComponents(FissionCluster cluster) {
|
||||
for (IFissionComponent component : cluster.getComponentMap().values()) {
|
||||
if (component.isFunctional()) {
|
||||
cluster.componentCount++;
|
||||
if (component instanceof IFissionHeatingComponent) {
|
||||
cluster.rawHeating += ((IFissionHeatingComponent) component).getRawHeating();
|
||||
cluster.effectiveHeating += ((IFissionHeatingComponent) component).getEffectiveHeating();
|
||||
if (component instanceof IFissionFuelComponent) {
|
||||
cluster.fuelComponentCount++;
|
||||
cluster.totalHeatMult += ((IFissionFuelComponent) component).getHeatMultiplier();
|
||||
cluster.totalEfficiency += ((IFissionFuelComponent) component).getEfficiency();
|
||||
}
|
||||
}
|
||||
if (component instanceof IFissionCoolingComponent) {
|
||||
cluster.cooling += ((IFissionCoolingComponent) component).getCooling();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void iterateFluxSearch(IFissionFuelComponent rootFuelComponent) {
|
||||
@ -431,5 +544,6 @@ public class FissionReactorLogic extends MultiblockLogic<FissionReactor, Fission
|
||||
heatBuffer.setHeatCapacity(message.heatCapacity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearAllMaterial() {}
|
||||
}
|
||||
|
||||
@ -1,18 +0,0 @@
|
||||
package nc.multiblock.fission.salt;
|
||||
|
||||
import nc.multiblock.fission.*;
|
||||
|
||||
public class MoltenSaltFissionCluster extends FissionCluster {
|
||||
|
||||
public long cooling = 0L, rawHeating = 0L, totalHeatMult = 0L;
|
||||
public double effectiveHeating = 0D, meanHeatMult = 0D, totalEfficiency = 0D, meanEfficiency = 0D, overcoolingEfficiencyFactor = 0D, undercoolingLifetimeFactor = 0D, totalHeatingSpeedMultiplier = 0D, meanHeatingSpeedMultiplier = 0D;
|
||||
|
||||
public MoltenSaltFissionCluster(FissionReactor reactor, int id) {
|
||||
super(reactor, id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getNetHeating() {
|
||||
return rawHeating - cooling;
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,5 @@
|
||||
package nc.multiblock.fission.salt;
|
||||
|
||||
import static nc.block.property.BlockProperties.*;
|
||||
import static nc.config.NCConfig.*;
|
||||
|
||||
import java.util.*;
|
||||
@ -12,14 +11,13 @@ import org.apache.commons.lang3.tuple.Pair;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
|
||||
import it.unimi.dsi.fastutil.objects.ObjectSet;
|
||||
import it.unimi.dsi.fastutil.objects.*;
|
||||
import nc.Global;
|
||||
import nc.multiblock.Multiblock;
|
||||
import nc.multiblock.fission.*;
|
||||
import nc.multiblock.fission.salt.tile.*;
|
||||
import nc.multiblock.fission.solid.tile.*;
|
||||
import nc.multiblock.fission.tile.*;
|
||||
import nc.multiblock.fission.tile.TileFissionSource.PrimingTargetInfo;
|
||||
import nc.multiblock.fission.tile.port.*;
|
||||
import nc.multiblock.network.*;
|
||||
import nc.multiblock.tile.TileBeefAbstract.SyncReason;
|
||||
@ -27,16 +25,17 @@ import nc.recipe.*;
|
||||
import nc.recipe.ingredient.IFluidIngredient;
|
||||
import nc.tile.internal.fluid.Tank;
|
||||
import nc.util.NCMath;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public class MoltenSaltFissionLogic extends FissionReactorLogic {
|
||||
|
||||
public List<Tank> tanks = Lists.newArrayList(new Tank(FissionReactor.BASE_TANK_CAPACITY, NCRecipes.fission_emergency_cooling_valid_fluids.get(0)), new Tank(FissionReactor.BASE_TANK_CAPACITY, null));
|
||||
public final ObjectSet<SaltFissionVesselBunch> vesselBunches = new ObjectOpenHashSet<>();
|
||||
|
||||
public RecipeInfo<ProcessorRecipe> emergencyCoolingRecipeInfo;
|
||||
public final List<Tank> tanks = Lists.newArrayList(new Tank(FissionReactor.BASE_TANK_CAPACITY, NCRecipes.fission_emergency_cooling_valid_fluids.get(0)), new Tank(FissionReactor.BASE_TANK_CAPACITY, null));
|
||||
|
||||
public RecipeInfo<BasicRecipe> emergencyCoolingRecipeInfo;
|
||||
|
||||
public int heaterCount = 0;
|
||||
public double meanHeatingSpeedMultiplier = 0D, totalHeatingSpeedMultiplier = 0D;
|
||||
@ -87,99 +86,89 @@ public class MoltenSaltFissionLogic extends FissionReactorLogic {
|
||||
super.refreshConnections();
|
||||
refreshFilteredPorts(TileFissionVesselPort.class, TileSaltFissionVessel.class);
|
||||
refreshFilteredPorts(TileFissionHeaterPort.class, TileSaltFissionHeater.class);
|
||||
formVesselBunches();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void distributeFlux(final ObjectSet<IFissionFuelComponent> primedCache, final Long2ObjectMap<IFissionFuelComponent> primedFailCache) {
|
||||
for (TileFissionSource source : getParts(TileFissionSource.class)) {
|
||||
IBlockState state = getWorld().getBlockState(source.getPos());
|
||||
EnumFacing facing = source.getPartPosition().getFacing();
|
||||
source.refreshIsRedstonePowered(getWorld(), source.getPos());
|
||||
getWorld().setBlockState(source.getPos(), state.withProperty(FACING_ALL, facing != null ? facing : state.getValue(FACING_ALL)).withProperty(ACTIVE, source.getIsRedstonePowered()), 3);
|
||||
|
||||
if (!source.getIsRedstonePowered()) {
|
||||
continue;
|
||||
}
|
||||
PrimingTargetInfo targetInfo = source.getPrimingTarget(false);
|
||||
if (targetInfo == null) {
|
||||
continue;
|
||||
}
|
||||
IFissionFuelComponent fuelComponent = targetInfo.fuelComponent;
|
||||
if (fuelComponent == null || primedFailCache.containsKey(fuelComponent.getTilePos().toLong())) {
|
||||
continue;
|
||||
public void formVesselBunches() {
|
||||
vesselBunches.clear();
|
||||
|
||||
for (TileSaltFissionVessel vessel : getParts(TileSaltFissionVessel.class)) {
|
||||
vessel.setVesselBunch(null);
|
||||
}
|
||||
|
||||
for (TileSaltFissionVessel vessel : getParts(TileSaltFissionVessel.class)) {
|
||||
boolean setBunch = false;
|
||||
SaltFissionVesselBunch bunch = null;
|
||||
for (EnumFacing dir : EnumFacing.VALUES) {
|
||||
TileSaltFissionVessel other = getPartMap(TileSaltFissionVessel.class).get(vessel.getPos().offset(dir).toLong());
|
||||
if (other != null && vessel.getFilterID() == other.getFilterID()) {
|
||||
SaltFissionVesselBunch otherBunch = other.getVesselBunch();
|
||||
if (bunch == null) {
|
||||
bunch = otherBunch;
|
||||
}
|
||||
else if (bunch != otherBunch) {
|
||||
if (otherBunch != null) {
|
||||
vesselBunches.remove(otherBunch);
|
||||
for (TileSaltFissionVessel otherBunchVessel : otherBunch.getPartMap().values()) {
|
||||
otherBunchVessel.setVesselBunch(bunch);
|
||||
}
|
||||
otherBunch.getPartMap().clear();
|
||||
}
|
||||
else {
|
||||
other.setVesselBunch(bunch);
|
||||
}
|
||||
}
|
||||
|
||||
if (!setBunch && bunch != null) {
|
||||
vessel.setVesselBunch(bunch);
|
||||
setBunch = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fuelComponent.tryPriming(getReactor());
|
||||
if (fuelComponent.isPrimed()) {
|
||||
primedCache.add(fuelComponent);
|
||||
if (bunch == null) {
|
||||
bunch = new SaltFissionVesselBunch(getReactor());
|
||||
vessel.setVesselBunch(bunch);
|
||||
vesselBunches.add(bunch);
|
||||
}
|
||||
}
|
||||
|
||||
for (IFissionFuelComponent primedComponent : primedCache) {
|
||||
iterateFluxSearch(primedComponent);
|
||||
}
|
||||
|
||||
for (IFissionFuelComponent primedComponent : primedCache) {
|
||||
primedComponent.refreshIsProcessing(false);
|
||||
refreshFuelComponentLocal(primedComponent);
|
||||
primedComponent.unprime();
|
||||
|
||||
if (!primedComponent.isFunctional()) {
|
||||
primedFailCache.put(primedComponent.getTilePos().toLong(), primedComponent);
|
||||
getReactor().refreshFlag = true;
|
||||
}
|
||||
for (SaltFissionVesselBunch bunch : vesselBunches) {
|
||||
bunch.init();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refreshClusters() {
|
||||
public void refreshAllFuelComponentModerators() {
|
||||
for (TileSaltFissionVessel vessel : getParts(TileSaltFissionVessel.class)) {
|
||||
refreshFuelComponentModerators(vessel, assumedValidCache);
|
||||
}
|
||||
|
||||
getReactor().passiveModeratorCache.removeAll(getReactor().activeModeratorCache);
|
||||
|
||||
for (IFissionComponent component : getParts(IFissionComponent.class)) {
|
||||
if (component != null && component.isClusterRoot()) {
|
||||
iterateClusterSearch(component);
|
||||
}
|
||||
}
|
||||
|
||||
for (long posLong : getReactor().activeModeratorCache) {
|
||||
for (EnumFacing dir : EnumFacing.VALUES) {
|
||||
IFissionComponent component = getPartMap(IFissionComponent.class).get(BlockPos.fromLong(posLong).offset(dir).toLong());
|
||||
if (component != null) {
|
||||
iterateClusterSearch(component);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (long posLong : getReactor().activeReflectorCache) {
|
||||
for (EnumFacing dir : EnumFacing.VALUES) {
|
||||
IFissionComponent component = getPartMap(IFissionComponent.class).get(BlockPos.fromLong(posLong).offset(dir).toLong());
|
||||
if (component != null) {
|
||||
iterateClusterSearch(component);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
super.refreshClusters();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refreshClusterStats(FissionCluster cluster) {
|
||||
super.refreshClusterStats(cluster);
|
||||
public void incrementClusterStatsFromComponents(FissionCluster cluster) {
|
||||
for (SaltFissionVesselBunch bunch : vesselBunches) {
|
||||
bunch.statsRetrieved = false;
|
||||
}
|
||||
|
||||
for (IFissionComponent component : cluster.getComponentMap().values()) {
|
||||
if (component.isFunctional()) {
|
||||
cluster.componentCount++;
|
||||
if (component instanceof IFissionHeatingComponent) {
|
||||
cluster.rawHeating += ((IFissionHeatingComponent) component).getRawHeating();
|
||||
cluster.effectiveHeating += ((IFissionHeatingComponent) component).getEffectiveHeating();
|
||||
if (component instanceof IFissionFuelComponent) {
|
||||
if (component instanceof TileSaltFissionVessel) {
|
||||
SaltFissionVesselBunch bunch = ((TileSaltFissionVessel) component).getVesselBunch();
|
||||
cluster.fuelComponentCount++;
|
||||
cluster.totalHeatMult += ((IFissionFuelComponent) component).getHeatMultiplier();
|
||||
cluster.totalEfficiency += ((IFissionFuelComponent) component).getEfficiency();
|
||||
if (!bunch.statsRetrieved) {
|
||||
bunch.statsRetrieved = true;
|
||||
cluster.rawHeating += bunch.getRawHeating();
|
||||
cluster.effectiveHeating += bunch.getEffectiveHeating();
|
||||
cluster.totalHeatMult += bunch.getHeatMultiplier();
|
||||
cluster.totalEfficiency += bunch.getEfficiency();
|
||||
}
|
||||
}
|
||||
else {
|
||||
cluster.rawHeating += ((IFissionHeatingComponent) component).getRawHeating();
|
||||
cluster.effectiveHeating += ((IFissionHeatingComponent) component).getEffectiveHeating();
|
||||
}
|
||||
}
|
||||
if (component instanceof IFissionCoolingComponent) {
|
||||
@ -187,24 +176,6 @@ public class MoltenSaltFissionLogic extends FissionReactorLogic {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (getReactor().refreshFlag) {
|
||||
return;
|
||||
}
|
||||
|
||||
cluster.overcoolingEfficiencyFactor = cluster.cooling == 0L ? 1D : Math.min(1D, (double) (cluster.rawHeating + fission_cooling_efficiency_leniency) / (double) cluster.cooling);
|
||||
cluster.undercoolingLifetimeFactor = cluster.rawHeating == 0L ? 1D : Math.min(1D, (double) (cluster.cooling + fission_cooling_efficiency_leniency) / (double) cluster.rawHeating);
|
||||
cluster.effectiveHeating *= cluster.overcoolingEfficiencyFactor;
|
||||
cluster.totalEfficiency *= cluster.overcoolingEfficiencyFactor;
|
||||
cluster.meanHeatMult = cluster.fuelComponentCount == 0 ? 0D : (double) cluster.totalHeatMult / (double) cluster.fuelComponentCount;
|
||||
cluster.meanEfficiency = cluster.fuelComponentCount == 0 ? 0D : cluster.totalEfficiency / cluster.fuelComponentCount;
|
||||
|
||||
for (IFissionComponent component : cluster.getComponentMap().values()) {
|
||||
if (component instanceof IFissionFuelComponent) {
|
||||
IFissionFuelComponent fuelComponent = (IFissionFuelComponent) component;
|
||||
fuelComponent.setUndercoolingLifetimeFactor(cluster.undercoolingLifetimeFactor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -212,7 +183,6 @@ public class MoltenSaltFissionLogic extends FissionReactorLogic {
|
||||
super.refreshReactorStats();
|
||||
|
||||
for (FissionCluster cluster : getReactor().getClusterMap().values()) {
|
||||
// if (cluster.connectedToWall) {
|
||||
getReactor().usefulPartCount += cluster.componentCount;
|
||||
getReactor().fuelComponentCount += cluster.fuelComponentCount;
|
||||
getReactor().cooling += cluster.cooling;
|
||||
@ -220,7 +190,6 @@ public class MoltenSaltFissionLogic extends FissionReactorLogic {
|
||||
// effectiveHeating += cluster.effectiveHeating;
|
||||
getReactor().totalHeatMult += cluster.totalHeatMult;
|
||||
getReactor().totalEfficiency += cluster.totalEfficiency;
|
||||
// }
|
||||
}
|
||||
|
||||
getReactor().usefulPartCount += getReactor().passiveModeratorCache.size() + getReactor().activeModeratorCache.size() + getReactor().activeReflectorCache.size();
|
||||
@ -252,8 +221,6 @@ public class MoltenSaltFissionLogic extends FissionReactorLogic {
|
||||
|
||||
@Override
|
||||
public boolean onUpdateServer() {
|
||||
// heatBuffer.changeHeatStored(Math.max(0, getNetClusterHeating()));
|
||||
|
||||
if (heatBuffer.isFull() && fission_overheat) {
|
||||
heatBuffer.setHeatStored(0);
|
||||
casingMeltdown();
|
||||
@ -312,7 +279,7 @@ public class MoltenSaltFissionLogic extends FissionReactorLogic {
|
||||
}
|
||||
|
||||
public boolean canProduceProducts() {
|
||||
ProcessorRecipe recipe = emergencyCoolingRecipeInfo.getRecipe();
|
||||
BasicRecipe recipe = emergencyCoolingRecipeInfo.getRecipe();
|
||||
IFluidIngredient fluidProduct = recipe.getFluidProducts().get(0);
|
||||
int productSize = fluidProduct.getMaxStackSize(0);
|
||||
if (productSize <= 0 || fluidProduct.getStack() == null) {
|
||||
@ -323,7 +290,7 @@ public class MoltenSaltFissionLogic extends FissionReactorLogic {
|
||||
}
|
||||
|
||||
public void produceProducts() {
|
||||
ProcessorRecipe recipe = emergencyCoolingRecipeInfo.getRecipe();
|
||||
BasicRecipe recipe = emergencyCoolingRecipeInfo.getRecipe();
|
||||
int usedInput = NCMath.toInt(Math.min(tanks.get(0).getFluidAmount() / recipe.getEmergencyCoolingHeatPerInputMB(), Math.min(heatBuffer.getHeatStored(), FissionReactor.BASE_TANK_CAPACITY * getPartCount(TileFissionVent.class))));
|
||||
|
||||
tanks.get(0).changeFluidAmount(-usedInput);
|
||||
|
||||
@ -1,41 +0,0 @@
|
||||
package nc.multiblock.fission.salt;
|
||||
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
|
||||
public enum SaltFissionHeaterSetting implements IStringSerializable {
|
||||
DEFAULT,
|
||||
DISABLED,
|
||||
HOT_COOLANT_OUT,
|
||||
COOLANT_SPREAD;
|
||||
|
||||
public SaltFissionHeaterSetting next() {
|
||||
switch (this) {
|
||||
case DISABLED:
|
||||
return DEFAULT;
|
||||
case DEFAULT:
|
||||
return HOT_COOLANT_OUT;
|
||||
case HOT_COOLANT_OUT:
|
||||
return COOLANT_SPREAD;
|
||||
case COOLANT_SPREAD:
|
||||
return DISABLED;
|
||||
default:
|
||||
return DISABLED;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
switch (this) {
|
||||
case DEFAULT:
|
||||
return "default";
|
||||
case DISABLED:
|
||||
return "disabled";
|
||||
case HOT_COOLANT_OUT:
|
||||
return "hot_coolant_out";
|
||||
case COOLANT_SPREAD:
|
||||
return "coolant_spread";
|
||||
default:
|
||||
return "disabled";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,82 @@
|
||||
package nc.multiblock.fission.salt;
|
||||
|
||||
import nc.multiblock.fission.*;
|
||||
import nc.multiblock.fission.salt.tile.TileSaltFissionVessel;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
public class SaltFissionVesselBunch extends FissionPartBunch<TileSaltFissionVessel> {
|
||||
|
||||
public long sources = 0L, flux = 0L;
|
||||
public boolean primed = false, statsRetrieved = false;
|
||||
|
||||
protected long openFaces = 0L;
|
||||
|
||||
public SaltFissionVesselBunch(FissionReactor reactor) {
|
||||
super(reactor);
|
||||
}
|
||||
|
||||
// TODO
|
||||
@Override
|
||||
protected void init() {
|
||||
if (!initialized) {
|
||||
for (TileSaltFissionVessel vessel : partMap.values()) {
|
||||
int i = 6;
|
||||
for (EnumFacing dir : EnumFacing.VALUES) {
|
||||
if (partMap.containsKey(vessel.getPos().offset(dir).toLong())) {
|
||||
i--;
|
||||
}
|
||||
}
|
||||
openFaces += i;
|
||||
}
|
||||
}
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
public long getBunchingFactor() {
|
||||
return 6L * partMap.size() / openFaces;
|
||||
}
|
||||
|
||||
public long getSurfaceFactor() {
|
||||
return openFaces / 6L;
|
||||
}
|
||||
|
||||
public long getCriticalityFactor(int baseProcessCriticality) {
|
||||
return getSurfaceFactor() * baseProcessCriticality;
|
||||
}
|
||||
|
||||
public long getRawHeating() {
|
||||
long rawHeating = 0L;
|
||||
for (TileSaltFissionVessel vessel : partMap.values()) {
|
||||
rawHeating += vessel.baseProcessHeat * vessel.heatMult;
|
||||
}
|
||||
return getBunchingFactor() * rawHeating;
|
||||
}
|
||||
|
||||
public double getEffectiveHeating() {
|
||||
double effectiveHeating = 0D;
|
||||
for (TileSaltFissionVessel vessel : partMap.values()) {
|
||||
effectiveHeating += vessel.baseProcessHeat * vessel.heatMult * vessel.baseProcessEfficiency * vessel.getSourceEfficiency() * vessel.getModeratorEfficiencyFactor() * getFluxEfficiencyFactor(vessel.baseProcessCriticality);
|
||||
}
|
||||
return getBunchingFactor() * effectiveHeating;
|
||||
}
|
||||
|
||||
public long getHeatMultiplier() {
|
||||
long rawHeatMult = 0L;
|
||||
for (TileSaltFissionVessel vessel : partMap.values()) {
|
||||
rawHeatMult += vessel.heatMult;
|
||||
}
|
||||
return getBunchingFactor() * rawHeatMult;
|
||||
}
|
||||
|
||||
public double getFluxEfficiencyFactor(int baseProcessCriticality) {
|
||||
return (1D + Math.exp(-2D * baseProcessCriticality)) / (1D + Math.exp(2D * ((double) flux / (double) getSurfaceFactor() - 2D * baseProcessCriticality)));
|
||||
}
|
||||
|
||||
public double getEfficiency() {
|
||||
double efficiency = 0D;
|
||||
for (TileSaltFissionVessel vessel : partMap.values()) {
|
||||
efficiency += vessel.heatMult * vessel.baseProcessEfficiency * vessel.getSourceEfficiency() * vessel.getModeratorEfficiencyFactor() * getFluxEfficiencyFactor(vessel.baseProcessCriticality);
|
||||
}
|
||||
return getBunchingFactor() * efficiency;
|
||||
}
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
package nc.multiblock.fission.salt;
|
||||
|
||||
import nc.multiblock.fission.*;
|
||||
import nc.multiblock.fission.salt.tile.TileSaltFissionVessel;
|
||||
|
||||
public class SaltFissionVesselBundle extends FissionPartBundle<TileSaltFissionVessel> {
|
||||
|
||||
public SaltFissionVesselBundle(FissionReactor reactor, int id) {
|
||||
super(reactor, id);
|
||||
}
|
||||
}
|
||||
@ -1,41 +0,0 @@
|
||||
package nc.multiblock.fission.salt;
|
||||
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
|
||||
public enum SaltFissionVesselSetting implements IStringSerializable {
|
||||
DEFAULT,
|
||||
DISABLED,
|
||||
DEPLETED_OUT,
|
||||
FUEL_SPREAD;
|
||||
|
||||
public SaltFissionVesselSetting next() {
|
||||
switch (this) {
|
||||
case DISABLED:
|
||||
return DEFAULT;
|
||||
case DEFAULT:
|
||||
return DEPLETED_OUT;
|
||||
case DEPLETED_OUT:
|
||||
return FUEL_SPREAD;
|
||||
case FUEL_SPREAD:
|
||||
return DISABLED;
|
||||
default:
|
||||
return DISABLED;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
switch (this) {
|
||||
case DEFAULT:
|
||||
return "default";
|
||||
case DISABLED:
|
||||
return "disabled";
|
||||
case DEPLETED_OUT:
|
||||
return "depleted_out";
|
||||
case FUEL_SPREAD:
|
||||
return "fuel_spread";
|
||||
default:
|
||||
return "disabled";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -13,7 +13,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.*;
|
||||
import net.minecraft.world.*;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public class BlockSaltFissionHeater extends BlockFissionMetaPart<MetaEnums.CoolantHeaterType> {
|
||||
@ -68,12 +68,6 @@ public class BlockSaltFissionHeater extends BlockFissionMetaPart<MetaEnums.Coola
|
||||
return new TileSaltFissionHeater.Standard();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos) {
|
||||
// return state.withProperty(DOWN, getProperty(world, pos, EnumFacing.DOWN)).withProperty(UP, getProperty(world, pos, EnumFacing.UP)).withProperty(NORTH, getProperty(world, pos, EnumFacing.NORTH)).withProperty(SOUTH, getProperty(world, pos, EnumFacing.SOUTH)).withProperty(WEST, getProperty(world, pos, EnumFacing.WEST)).withProperty(EAST, getProperty(world, pos, EnumFacing.EAST));
|
||||
return super.getActualState(state, world, pos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
|
||||
if (player == null) {
|
||||
|
||||
@ -13,7 +13,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.*;
|
||||
import net.minecraft.world.*;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public class BlockSaltFissionHeater2 extends BlockFissionMetaPart<MetaEnums.CoolantHeaterType2> {
|
||||
@ -68,11 +68,6 @@ public class BlockSaltFissionHeater2 extends BlockFissionMetaPart<MetaEnums.Cool
|
||||
return new TileSaltFissionHeater.Tin();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos) {
|
||||
return state;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
|
||||
if (player == null) {
|
||||
@ -105,5 +100,4 @@ public class BlockSaltFissionHeater2 extends BlockFissionMetaPart<MetaEnums.Cool
|
||||
}
|
||||
return rightClickOnPart(world, pos, player, hand, facing, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,24 +1,20 @@
|
||||
package nc.multiblock.fission.salt.block;
|
||||
|
||||
import nc.NuclearCraft;
|
||||
import nc.block.property.*;
|
||||
import nc.multiblock.fission.FissionReactor;
|
||||
import nc.multiblock.fission.block.BlockFissionPart;
|
||||
import nc.multiblock.fission.salt.SaltFissionVesselSetting;
|
||||
import nc.multiblock.fission.salt.tile.TileSaltFissionVessel;
|
||||
import nc.util.*;
|
||||
import net.minecraft.block.state.*;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.*;
|
||||
import net.minecraft.world.*;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public class BlockSaltFissionVessel extends BlockFissionPart implements ISidedProperty<SaltFissionVesselSetting> {
|
||||
|
||||
// private static EnumFacing placementSide = null;
|
||||
public class BlockSaltFissionVessel extends BlockFissionPart {
|
||||
|
||||
public BlockSaltFissionVessel() {
|
||||
super();
|
||||
@ -29,37 +25,6 @@ public class BlockSaltFissionVessel extends BlockFissionPart implements ISidedPr
|
||||
return new TileSaltFissionVessel();
|
||||
}
|
||||
|
||||
private static final PropertySidedEnum<SaltFissionVesselSetting> DOWN = PropertySidedEnum.create("down", SaltFissionVesselSetting.class, EnumFacing.DOWN);
|
||||
private static final PropertySidedEnum<SaltFissionVesselSetting> UP = PropertySidedEnum.create("up", SaltFissionVesselSetting.class, EnumFacing.UP);
|
||||
private static final PropertySidedEnum<SaltFissionVesselSetting> NORTH = PropertySidedEnum.create("north", SaltFissionVesselSetting.class, EnumFacing.NORTH);
|
||||
private static final PropertySidedEnum<SaltFissionVesselSetting> SOUTH = PropertySidedEnum.create("south", SaltFissionVesselSetting.class, EnumFacing.SOUTH);
|
||||
private static final PropertySidedEnum<SaltFissionVesselSetting> WEST = PropertySidedEnum.create("west", SaltFissionVesselSetting.class, EnumFacing.WEST);
|
||||
private static final PropertySidedEnum<SaltFissionVesselSetting> EAST = PropertySidedEnum.create("east", SaltFissionVesselSetting.class, EnumFacing.EAST);
|
||||
|
||||
@Override
|
||||
public SaltFissionVesselSetting getProperty(IBlockAccess world, BlockPos pos, EnumFacing facing) {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if (tile instanceof TileSaltFissionVessel) {
|
||||
return ((TileSaltFissionVessel) tile).getVesselSetting(facing);
|
||||
}
|
||||
return SaltFissionVesselSetting.DISABLED;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockStateContainer createBlockState() {
|
||||
return new BlockStateContainer(this, DOWN, UP, NORTH, SOUTH, WEST, EAST);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos) {
|
||||
return state.withProperty(DOWN, getProperty(world, pos, EnumFacing.DOWN)).withProperty(UP, getProperty(world, pos, EnumFacing.UP)).withProperty(NORTH, getProperty(world, pos, EnumFacing.NORTH)).withProperty(SOUTH, getProperty(world, pos, EnumFacing.SOUTH)).withProperty(WEST, getProperty(world, pos, EnumFacing.WEST)).withProperty(EAST, getProperty(world, pos, EnumFacing.EAST));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
|
||||
if (player == null) {
|
||||
|
||||
@ -18,7 +18,6 @@ import nc.ModCheck;
|
||||
import nc.multiblock.PlacementRule;
|
||||
import nc.multiblock.cuboidal.CuboidalPartPositionType;
|
||||
import nc.multiblock.fission.*;
|
||||
import nc.multiblock.fission.salt.SaltFissionHeaterSetting;
|
||||
import nc.multiblock.fission.tile.*;
|
||||
import nc.multiblock.fission.tile.IFissionFuelComponent.ModeratorBlockInfo;
|
||||
import nc.multiblock.fission.tile.port.*;
|
||||
@ -48,8 +47,6 @@ public class TileSaltFissionHeater extends TileFissionPart implements ITileFilte
|
||||
|
||||
protected @Nonnull GasTileWrapper gasWrapper;
|
||||
|
||||
protected @Nonnull SaltFissionHeaterSetting[] heaterSettings = new SaltFissionHeaterSetting[] {SaltFissionHeaterSetting.DISABLED, SaltFissionHeaterSetting.DISABLED, SaltFissionHeaterSetting.DISABLED, SaltFissionHeaterSetting.DISABLED, SaltFissionHeaterSetting.DISABLED, SaltFissionHeaterSetting.DISABLED};
|
||||
|
||||
protected final int fluidInputSize = 1, fluidOutputSize = 1;
|
||||
|
||||
protected int baseProcessCooling;
|
||||
@ -60,7 +57,7 @@ public class TileSaltFissionHeater extends TileFissionPart implements ITileFilte
|
||||
public double time;
|
||||
public boolean isProcessing, canProcessInputs;
|
||||
|
||||
protected RecipeInfo<ProcessorRecipe> recipeInfo;
|
||||
protected RecipeInfo<BasicRecipe> recipeInfo;
|
||||
|
||||
protected final Set<EntityPlayer> playersToUpdate;
|
||||
|
||||
@ -691,59 +688,6 @@ public class TileSaltFissionHeater extends TileFissionPart implements ITileFilte
|
||||
return !DEFAULT_NON.equals(masterPortPos) ? masterPort.getGasWrapper() : gasWrapper;
|
||||
}
|
||||
|
||||
public @Nonnull SaltFissionHeaterSetting[] getHeaterSettings() {
|
||||
return heaterSettings;
|
||||
}
|
||||
|
||||
public void setHeaterSettings(@Nonnull SaltFissionHeaterSetting[] settings) {
|
||||
heaterSettings = settings;
|
||||
}
|
||||
|
||||
public SaltFissionHeaterSetting getHeaterSetting(@Nonnull EnumFacing side) {
|
||||
return heaterSettings[side.getIndex()];
|
||||
}
|
||||
|
||||
public void setHeaterSetting(@Nonnull EnumFacing side, @Nonnull SaltFissionHeaterSetting setting) {
|
||||
heaterSettings[side.getIndex()] = setting;
|
||||
}
|
||||
|
||||
public void toggleHeaterSetting(@Nonnull EnumFacing side) {
|
||||
setHeaterSetting(side, getHeaterSetting(side).next());
|
||||
refreshFluidConnections(side);
|
||||
markDirtyAndNotify(true);
|
||||
}
|
||||
|
||||
public void refreshFluidConnections(@Nonnull EnumFacing side) {
|
||||
switch (getHeaterSetting(side)) {
|
||||
case DISABLED:
|
||||
setTankSorption(side, 0, TankSorption.NON);
|
||||
setTankSorption(side, 1, TankSorption.NON);
|
||||
break;
|
||||
case DEFAULT:
|
||||
setTankSorption(side, 0, TankSorption.IN);
|
||||
setTankSorption(side, 1, TankSorption.NON);
|
||||
break;
|
||||
case HOT_COOLANT_OUT:
|
||||
setTankSorption(side, 0, TankSorption.NON);
|
||||
setTankSorption(side, 1, TankSorption.OUT);
|
||||
break;
|
||||
case COOLANT_SPREAD:
|
||||
setTankSorption(side, 0, TankSorption.OUT);
|
||||
setTankSorption(side, 1, TankSorption.NON);
|
||||
break;
|
||||
default:
|
||||
setTankSorption(side, 0, TankSorption.NON);
|
||||
setTankSorption(side, 1, TankSorption.NON);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO
|
||||
@Override
|
||||
public void pushFluidToSide(@Nonnull EnumFacing side) {
|
||||
|
||||
}
|
||||
|
||||
public void pushCoolant(TileSaltFissionHeater other) {
|
||||
int diff = getTanks().get(0).getFluidAmount() - other.getTanks().get(0).getFluidAmount();
|
||||
if (diff > 1) {
|
||||
@ -848,65 +792,12 @@ public class TileSaltFissionHeater extends TileFissionPart implements ITileFilte
|
||||
|
||||
// NBT
|
||||
|
||||
public NBTTagCompound writeHeaterSettings(NBTTagCompound nbt) {
|
||||
NBTTagCompound settingsTag = new NBTTagCompound();
|
||||
for (EnumFacing side : EnumFacing.VALUES) {
|
||||
settingsTag.setInteger("setting" + side.getIndex(), getHeaterSetting(side).ordinal());
|
||||
}
|
||||
nbt.setTag("heaterSettings", settingsTag);
|
||||
return nbt;
|
||||
}
|
||||
|
||||
public void readHeaterSettings(NBTTagCompound nbt) {
|
||||
if (nbt.hasKey("fluidConnections0")) {
|
||||
for (EnumFacing side : EnumFacing.VALUES) {
|
||||
TankSorption sorption = TankSorption.values()[nbt.getInteger("fluidConnections" + side.getIndex())];
|
||||
switch (sorption) {
|
||||
case NON:
|
||||
setTankSorption(side, 0, TankSorption.NON);
|
||||
setTankSorption(side, 1, TankSorption.NON);
|
||||
setHeaterSetting(side, SaltFissionHeaterSetting.DISABLED);
|
||||
break;
|
||||
case BOTH:
|
||||
setTankSorption(side, 0, TankSorption.IN);
|
||||
setTankSorption(side, 1, TankSorption.NON);
|
||||
setHeaterSetting(side, SaltFissionHeaterSetting.DEFAULT);
|
||||
break;
|
||||
case IN:
|
||||
setTankSorption(side, 0, TankSorption.NON);
|
||||
setTankSorption(side, 1, TankSorption.OUT);
|
||||
setHeaterSetting(side, SaltFissionHeaterSetting.HOT_COOLANT_OUT);
|
||||
break;
|
||||
case OUT:
|
||||
setTankSorption(side, 0, TankSorption.OUT);
|
||||
setTankSorption(side, 1, TankSorption.NON);
|
||||
setHeaterSetting(side, SaltFissionHeaterSetting.COOLANT_SPREAD);
|
||||
break;
|
||||
default:
|
||||
setTankSorption(side, 0, TankSorption.NON);
|
||||
setTankSorption(side, 1, TankSorption.NON);
|
||||
setHeaterSetting(side, SaltFissionHeaterSetting.DISABLED);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
NBTTagCompound settingsTag = nbt.getCompoundTag("heaterSettings");
|
||||
for (EnumFacing side : EnumFacing.VALUES) {
|
||||
setHeaterSetting(side, SaltFissionHeaterSetting.values()[settingsTag.getInteger("setting" + side.getIndex())]);
|
||||
refreshFluidConnections(side);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeAll(NBTTagCompound nbt) {
|
||||
super.writeAll(nbt);
|
||||
nbt.setString("heaterName", heaterName);
|
||||
nbt.setString("coolantName", coolantName);
|
||||
|
||||
writeTanks(nbt);
|
||||
writeHeaterSettings(nbt);
|
||||
|
||||
nbt.setInteger("baseProcessCooling", baseProcessCooling);
|
||||
nbt.setDouble("heatingSpeedMultiplier", heatingSpeedMultiplier);
|
||||
@ -930,9 +821,7 @@ public class TileSaltFissionHeater extends TileFissionPart implements ITileFilte
|
||||
tanks.get(0).setAllowedFluids(Lists.newArrayList(coolantName));
|
||||
filterTanks.get(0).setAllowedFluids(Lists.newArrayList(coolantName));
|
||||
}
|
||||
|
||||
readTanks(nbt);
|
||||
readHeaterSettings(nbt);
|
||||
|
||||
baseProcessCooling = nbt.getInteger("baseProcessCooling");
|
||||
heatingSpeedMultiplier = nbt.getDouble("heatingSpeedMultiplier");
|
||||
|
||||
@ -17,7 +17,7 @@ import nc.ModCheck;
|
||||
import nc.capability.radiation.source.IRadiationSource;
|
||||
import nc.multiblock.cuboidal.CuboidalPartPositionType;
|
||||
import nc.multiblock.fission.*;
|
||||
import nc.multiblock.fission.salt.*;
|
||||
import nc.multiblock.fission.salt.SaltFissionVesselBunch;
|
||||
import nc.multiblock.fission.tile.*;
|
||||
import nc.multiblock.fission.tile.port.*;
|
||||
import nc.multiblock.network.SaltFissionVesselUpdatePacket;
|
||||
@ -51,20 +51,16 @@ public class TileSaltFissionVessel extends TileFissionPart implements ITileFilte
|
||||
|
||||
protected @Nonnull GasTileWrapper gasWrapper;
|
||||
|
||||
protected @Nonnull SaltFissionVesselSetting[] vesselSettings = new SaltFissionVesselSetting[] {SaltFissionVesselSetting.DISABLED, SaltFissionVesselSetting.DISABLED, SaltFissionVesselSetting.DISABLED, SaltFissionVesselSetting.DISABLED, SaltFissionVesselSetting.DISABLED, SaltFissionVesselSetting.DISABLED};
|
||||
|
||||
protected final int fluidInputSize = 1, fluidOutputSize = 1;
|
||||
|
||||
public double baseProcessTime = 1D;
|
||||
protected double baseProcessEfficiency = 0D;
|
||||
protected double baseProcessRadiation = 0D;
|
||||
protected int baseProcessHeat = 0, baseProcessCriticality = 1;
|
||||
public double baseProcessTime = 1D, baseProcessEfficiency = 0D, baseProcessRadiation = 0D;
|
||||
public int baseProcessHeat = 0, baseProcessCriticality = 1;
|
||||
protected boolean selfPriming = false;
|
||||
|
||||
public double time;
|
||||
public boolean isProcessing, hasConsumed, canProcessInputs;
|
||||
|
||||
protected RecipeInfo<ProcessorRecipe> recipeInfo;
|
||||
protected RecipeInfo<BasicRecipe> recipeInfo;
|
||||
|
||||
protected Set<EntityPlayer> playersToUpdate;
|
||||
|
||||
@ -73,8 +69,10 @@ public class TileSaltFissionVessel extends TileFissionPart implements ITileFilte
|
||||
|
||||
public long clusterHeatStored, clusterHeatCapacity;
|
||||
|
||||
protected boolean primed = false, fluxSearched = false;
|
||||
protected int flux = 0, heatMult = 0;
|
||||
protected boolean fluxSearched = false;
|
||||
protected int flux = 0;
|
||||
|
||||
public int heatMult = 0;
|
||||
protected double undercoolingLifetimeFactor = 1D;
|
||||
protected Double sourceEfficiency = null;
|
||||
protected int[] moderatorLineFluxes = new int[] {0, 0, 0, 0, 0, 0};
|
||||
@ -90,7 +88,7 @@ public class TileSaltFissionVessel extends TileFissionPart implements ITileFilte
|
||||
protected BlockPos masterPortPos = DEFAULT_NON;
|
||||
protected TileFissionVesselPort masterPort = null;
|
||||
|
||||
protected SaltFissionVesselBundle vesselBundle = null;
|
||||
protected SaltFissionVesselBunch vesselBunch = null;
|
||||
|
||||
public TileSaltFissionVessel() {
|
||||
super(CuboidalPartPositionType.INTERIOR);
|
||||
@ -113,12 +111,19 @@ public class TileSaltFissionVessel extends TileFissionPart implements ITileFilte
|
||||
|
||||
// IFissionFuelComponent
|
||||
|
||||
public @Nullable SaltFissionVesselBundle getVesselBundle() {
|
||||
return vesselBundle;
|
||||
public @Nullable SaltFissionVesselBunch getVesselBunch() {
|
||||
return vesselBunch;
|
||||
}
|
||||
|
||||
public void setVesselBundle(@Nullable SaltFissionVesselBundle vesselBundle) {
|
||||
this.vesselBundle = vesselBundle;
|
||||
public void setVesselBunch(@Nullable SaltFissionVesselBunch vesselBunch) {
|
||||
this.vesselBunch = vesselBunch;
|
||||
if (vesselBunch != null) {
|
||||
vesselBunch.getPartMap().put(pos.toLong(), this);
|
||||
}
|
||||
}
|
||||
|
||||
public int getVesselBunchSize() {
|
||||
return vesselBunch.getPartMap().size();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -143,6 +148,7 @@ public class TileSaltFissionVessel extends TileFissionPart implements ITileFilte
|
||||
|
||||
@Override
|
||||
public void resetStats() {
|
||||
vesselBunch.sources = vesselBunch.flux = 0L;
|
||||
/* primed = */ fluxSearched = false;
|
||||
flux = heatMult = 0;
|
||||
undercoolingLifetimeFactor = 1D;
|
||||
@ -179,24 +185,39 @@ public class TileSaltFissionVessel extends TileFissionPart implements ITileFilte
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tryPriming(FissionReactor sourceReactor) {
|
||||
public void tryPriming(FissionReactor sourceReactor, boolean fromSource) {
|
||||
if (getMultiblock() != sourceReactor) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (canProcessInputs) {
|
||||
primed = true;
|
||||
if (fromSource) {
|
||||
vesselBunch.sources++;
|
||||
if (vesselBunch.sources >= vesselBunch.getSurfaceFactor()) {
|
||||
vesselBunch.primed = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
vesselBunch.primed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPrimed() {
|
||||
return primed;
|
||||
return vesselBunch.primed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addToPrimedCache(final ObjectSet<IFissionFuelComponent> primedCache) {
|
||||
for (TileSaltFissionVessel vessel : vesselBunch.getPartMap().values()) {
|
||||
primedCache.add(vessel);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unprime() {
|
||||
primed = false;
|
||||
vesselBunch.primed = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -238,6 +259,7 @@ public class TileSaltFissionVessel extends TileFissionPart implements ITileFilte
|
||||
@Override
|
||||
public void addFlux(int flux) {
|
||||
this.flux += flux;
|
||||
vesselBunch.flux += flux;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -285,9 +307,10 @@ public class TileSaltFissionVessel extends TileFissionPart implements ITileFilte
|
||||
return activeReflectorCache;
|
||||
}
|
||||
|
||||
/** DON'T USE IN REACTOR LOGIC! */
|
||||
@Override
|
||||
public long getRawHeating() {
|
||||
return baseProcessHeat * heatMult;
|
||||
return baseProcessHeat * vesselBunch.getHeatMultiplier() / getVesselBunchSize();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -295,19 +318,20 @@ public class TileSaltFissionVessel extends TileFissionPart implements ITileFilte
|
||||
return baseProcessHeat * getEfficiency();
|
||||
}
|
||||
|
||||
/** DON'T USE IN REACTOR LOGIC! */
|
||||
@Override
|
||||
public long getHeatMultiplier() {
|
||||
return heatMult;
|
||||
return vesselBunch.getHeatMultiplier() / getVesselBunchSize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getFluxEfficiencyFactor() {
|
||||
return (1D + Math.exp(-2D * baseProcessCriticality)) / (1D + Math.exp(2D * (flux - 2D * baseProcessCriticality)));
|
||||
return vesselBunch.getFluxEfficiencyFactor(baseProcessCriticality);
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getEfficiency() {
|
||||
return heatMult * baseProcessEfficiency * getSourceEfficiency() * getModeratorEfficiencyFactor() * getFluxEfficiencyFactor();
|
||||
return vesselBunch.getHeatMultiplier() * baseProcessEfficiency * getSourceEfficiency() * getModeratorEfficiencyFactor() * getFluxEfficiencyFactor() / getVesselBunchSize();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -478,7 +502,7 @@ public class TileSaltFissionVessel extends TileFissionPart implements ITileFilte
|
||||
// Processing
|
||||
|
||||
public boolean isProcessing(boolean checkCluster) {
|
||||
return readyToProcess(checkCluster) && flux >= baseProcessCriticality;
|
||||
return readyToProcess(checkCluster) && vesselBunch.flux >= vesselBunch.getCriticalityFactor(baseProcessCriticality);
|
||||
}
|
||||
|
||||
public boolean readyToProcess(boolean checkCluster) {
|
||||
@ -581,7 +605,7 @@ public class TileSaltFissionVessel extends TileFissionPart implements ITileFilte
|
||||
if (getMultiblock() != null) {
|
||||
if (canProcessInputs) {
|
||||
if (oldProcessHeat != baseProcessHeat || oldProcessEfficiency != baseProcessEfficiency || oldProcessCriticality != baseProcessCriticality) {
|
||||
if (flux < baseProcessCriticality) {
|
||||
if (vesselBunch.flux < vesselBunch.getCriticalityFactor(baseProcessCriticality)) {
|
||||
getMultiblock().refreshFlag = true;
|
||||
}
|
||||
else {
|
||||
@ -679,59 +703,6 @@ public class TileSaltFissionVessel extends TileFissionPart implements ITileFilte
|
||||
return !DEFAULT_NON.equals(masterPortPos) ? masterPort.getGasWrapper() : gasWrapper;
|
||||
}
|
||||
|
||||
public @Nonnull SaltFissionVesselSetting[] getVesselSettings() {
|
||||
return vesselSettings;
|
||||
}
|
||||
|
||||
public void setVesselSettings(@Nonnull SaltFissionVesselSetting[] settings) {
|
||||
vesselSettings = settings;
|
||||
}
|
||||
|
||||
public SaltFissionVesselSetting getVesselSetting(@Nonnull EnumFacing side) {
|
||||
return vesselSettings[side.getIndex()];
|
||||
}
|
||||
|
||||
public void setVesselSetting(@Nonnull EnumFacing side, @Nonnull SaltFissionVesselSetting setting) {
|
||||
vesselSettings[side.getIndex()] = setting;
|
||||
}
|
||||
|
||||
public void toggleVesselSetting(@Nonnull EnumFacing side) {
|
||||
setVesselSetting(side, getVesselSetting(side).next());
|
||||
refreshFluidConnections(side);
|
||||
markDirtyAndNotify(true);
|
||||
}
|
||||
|
||||
public void refreshFluidConnections(@Nonnull EnumFacing side) {
|
||||
switch (getVesselSetting(side)) {
|
||||
case DISABLED:
|
||||
setTankSorption(side, 0, TankSorption.NON);
|
||||
setTankSorption(side, 1, TankSorption.NON);
|
||||
break;
|
||||
case DEFAULT:
|
||||
setTankSorption(side, 0, TankSorption.IN);
|
||||
setTankSorption(side, 1, TankSorption.NON);
|
||||
break;
|
||||
case DEPLETED_OUT:
|
||||
setTankSorption(side, 0, TankSorption.NON);
|
||||
setTankSorption(side, 1, TankSorption.OUT);
|
||||
break;
|
||||
case FUEL_SPREAD:
|
||||
setTankSorption(side, 0, TankSorption.OUT);
|
||||
setTankSorption(side, 1, TankSorption.NON);
|
||||
break;
|
||||
default:
|
||||
setTankSorption(side, 0, TankSorption.NON);
|
||||
setTankSorption(side, 1, TankSorption.NON);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO
|
||||
@Override
|
||||
public void pushFluidToSide(@Nonnull EnumFacing side) {
|
||||
|
||||
}
|
||||
|
||||
public void pushFuel(TileSaltFissionVessel other) {
|
||||
int diff = getTanks().get(0).getFluidAmount() - other.getTanks().get(0).getFluidAmount();
|
||||
if (diff > 1) {
|
||||
@ -850,62 +821,10 @@ public class TileSaltFissionVessel extends TileFissionPart implements ITileFilte
|
||||
|
||||
// NBT
|
||||
|
||||
public NBTTagCompound writeVesselSettings(NBTTagCompound nbt) {
|
||||
NBTTagCompound settingsTag = new NBTTagCompound();
|
||||
for (EnumFacing side : EnumFacing.VALUES) {
|
||||
settingsTag.setInteger("setting" + side.getIndex(), getVesselSetting(side).ordinal());
|
||||
}
|
||||
nbt.setTag("vesselSettings", settingsTag);
|
||||
return nbt;
|
||||
}
|
||||
|
||||
public void readVesselSettings(NBTTagCompound nbt) {
|
||||
if (nbt.hasKey("fluidConnections0")) {
|
||||
for (EnumFacing side : EnumFacing.VALUES) {
|
||||
TankSorption sorption = TankSorption.values()[nbt.getInteger("fluidConnections" + side.getIndex())];
|
||||
switch (sorption) {
|
||||
case NON:
|
||||
setTankSorption(side, 0, TankSorption.NON);
|
||||
setTankSorption(side, 1, TankSorption.NON);
|
||||
setVesselSetting(side, SaltFissionVesselSetting.DISABLED);
|
||||
break;
|
||||
case BOTH:
|
||||
setTankSorption(side, 0, TankSorption.IN);
|
||||
setTankSorption(side, 1, TankSorption.NON);
|
||||
setVesselSetting(side, SaltFissionVesselSetting.DEFAULT);
|
||||
break;
|
||||
case IN:
|
||||
setTankSorption(side, 0, TankSorption.NON);
|
||||
setTankSorption(side, 1, TankSorption.OUT);
|
||||
setVesselSetting(side, SaltFissionVesselSetting.DEPLETED_OUT);
|
||||
break;
|
||||
case OUT:
|
||||
setTankSorption(side, 0, TankSorption.OUT);
|
||||
setTankSorption(side, 1, TankSorption.NON);
|
||||
setVesselSetting(side, SaltFissionVesselSetting.FUEL_SPREAD);
|
||||
break;
|
||||
default:
|
||||
setTankSorption(side, 0, TankSorption.NON);
|
||||
setTankSorption(side, 1, TankSorption.NON);
|
||||
setVesselSetting(side, SaltFissionVesselSetting.DISABLED);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
NBTTagCompound settingsTag = nbt.getCompoundTag("vesselSettings");
|
||||
for (EnumFacing side : EnumFacing.VALUES) {
|
||||
setVesselSetting(side, SaltFissionVesselSetting.values()[settingsTag.getInteger("setting" + side.getIndex())]);
|
||||
refreshFluidConnections(side);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeAll(NBTTagCompound nbt) {
|
||||
super.writeAll(nbt);
|
||||
writeTanks(nbt);
|
||||
writeVesselSettings(nbt);
|
||||
|
||||
nbt.setDouble("baseProcessTime", baseProcessTime);
|
||||
nbt.setInteger("baseProcessHeat", baseProcessHeat);
|
||||
@ -927,7 +846,6 @@ public class TileSaltFissionVessel extends TileFissionPart implements ITileFilte
|
||||
public void readAll(NBTTagCompound nbt) {
|
||||
super.readAll(nbt);
|
||||
readTanks(nbt);
|
||||
readVesselSettings(nbt);
|
||||
|
||||
baseProcessTime = nbt.getDouble("baseProcessTime");
|
||||
baseProcessHeat = nbt.getInteger("baseProcessHeat");
|
||||
|
||||
@ -1,41 +0,0 @@
|
||||
package nc.multiblock.fission.solid;
|
||||
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
|
||||
public enum SolidFissionCellSetting implements IStringSerializable {
|
||||
DEFAULT,
|
||||
DISABLED,
|
||||
DEPLETED_OUT,
|
||||
FUEL_SPREAD;
|
||||
|
||||
public SolidFissionCellSetting next() {
|
||||
switch (this) {
|
||||
case DISABLED:
|
||||
return DEFAULT;
|
||||
case DEFAULT:
|
||||
return DEPLETED_OUT;
|
||||
case DEPLETED_OUT:
|
||||
return FUEL_SPREAD;
|
||||
case FUEL_SPREAD:
|
||||
return DISABLED;
|
||||
default:
|
||||
return DISABLED;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
switch (this) {
|
||||
case DEFAULT:
|
||||
return "default";
|
||||
case DISABLED:
|
||||
return "disabled";
|
||||
case DEPLETED_OUT:
|
||||
return "depleted_out";
|
||||
case FUEL_SPREAD:
|
||||
return "fuel_spread";
|
||||
default:
|
||||
return "disabled";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
package nc.multiblock.fission.solid;
|
||||
|
||||
import nc.multiblock.fission.*;
|
||||
|
||||
public class SolidFuelFissionCluster extends FissionCluster {
|
||||
|
||||
public long cooling = 0L, rawHeating = 0L, totalHeatMult = 0L;
|
||||
public double effectiveHeating = 0D, meanHeatMult = 0D, totalEfficiency = 0D, meanEfficiency = 0D, overcoolingEfficiencyFactor = 0D, undercoolingLifetimeFactor = 0D, totalHeatingSpeedMultiplier = 0D, meanHeatingSpeedMultiplier = 0D;
|
||||
|
||||
public SolidFuelFissionCluster(FissionReactor reactor, int id) {
|
||||
super(reactor, id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getNetHeating() {
|
||||
return rawHeating - cooling;
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,5 @@
|
||||
package nc.multiblock.fission.solid;
|
||||
|
||||
import static nc.block.property.BlockProperties.*;
|
||||
import static nc.config.NCConfig.*;
|
||||
|
||||
import java.util.*;
|
||||
@ -19,23 +18,20 @@ import nc.multiblock.fission.*;
|
||||
import nc.multiblock.fission.salt.tile.*;
|
||||
import nc.multiblock.fission.solid.tile.TileSolidFissionCell;
|
||||
import nc.multiblock.fission.tile.*;
|
||||
import nc.multiblock.fission.tile.TileFissionSource.PrimingTargetInfo;
|
||||
import nc.multiblock.fission.tile.port.TileFissionCellPort;
|
||||
import nc.multiblock.network.*;
|
||||
import nc.multiblock.tile.TileBeefAbstract.SyncReason;
|
||||
import nc.recipe.*;
|
||||
import nc.recipe.ingredient.IFluidIngredient;
|
||||
import nc.tile.internal.fluid.Tank;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public class SolidFuelFissionLogic extends FissionReactorLogic {
|
||||
|
||||
public List<Tank> tanks = Lists.newArrayList(new Tank(FissionReactor.BASE_TANK_CAPACITY, NCRecipes.fission_heating_valid_fluids.get(0)), new Tank(FissionReactor.BASE_TANK_CAPACITY, null));
|
||||
|
||||
public RecipeInfo<ProcessorRecipe> heatingRecipeInfo;
|
||||
public RecipeInfo<BasicRecipe> heatingRecipeInfo;
|
||||
|
||||
public int heatingOutputRate = 0;
|
||||
public double effectiveHeating = 0D, reservedEffectiveHeat = 0D, heatingRecipeRate = 0D, heatingOutputRateFP = 0D;
|
||||
@ -90,121 +86,10 @@ public class SolidFuelFissionLogic extends FissionReactorLogic {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void distributeFlux(final ObjectSet<IFissionFuelComponent> primedCache, final Long2ObjectMap<IFissionFuelComponent> primedFailCache) {
|
||||
for (TileFissionSource source : getParts(TileFissionSource.class)) {
|
||||
IBlockState state = getWorld().getBlockState(source.getPos());
|
||||
EnumFacing facing = source.getPartPosition().getFacing();
|
||||
source.refreshIsRedstonePowered(getWorld(), source.getPos());
|
||||
getWorld().setBlockState(source.getPos(), state.withProperty(FACING_ALL, facing != null ? facing : state.getValue(FACING_ALL)).withProperty(ACTIVE, source.getIsRedstonePowered()), 3);
|
||||
|
||||
if (!source.getIsRedstonePowered()) {
|
||||
continue;
|
||||
}
|
||||
PrimingTargetInfo targetInfo = source.getPrimingTarget(false);
|
||||
if (targetInfo == null) {
|
||||
continue;
|
||||
}
|
||||
IFissionFuelComponent fuelComponent = targetInfo.fuelComponent;
|
||||
if (fuelComponent == null || primedFailCache.containsKey(fuelComponent.getTilePos().toLong())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
fuelComponent.tryPriming(getReactor());
|
||||
if (fuelComponent.isPrimed()) {
|
||||
primedCache.add(fuelComponent);
|
||||
}
|
||||
}
|
||||
|
||||
for (IFissionFuelComponent primedComponent : primedCache) {
|
||||
iterateFluxSearch(primedComponent);
|
||||
}
|
||||
|
||||
for (IFissionFuelComponent primedComponent : primedCache) {
|
||||
primedComponent.refreshIsProcessing(false);
|
||||
refreshFuelComponentLocal(primedComponent);
|
||||
primedComponent.unprime();
|
||||
|
||||
if (!primedComponent.isFunctional()) {
|
||||
primedFailCache.put(primedComponent.getTilePos().toLong(), primedComponent);
|
||||
getReactor().refreshFlag = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refreshClusters() {
|
||||
public void refreshAllFuelComponentModerators() {
|
||||
for (TileSolidFissionCell cell : getParts(TileSolidFissionCell.class)) {
|
||||
refreshFuelComponentModerators(cell, assumedValidCache);
|
||||
}
|
||||
|
||||
getReactor().passiveModeratorCache.removeAll(getReactor().activeModeratorCache);
|
||||
|
||||
for (IFissionComponent component : getParts(IFissionComponent.class)) {
|
||||
if (component != null && component.isClusterRoot()) {
|
||||
iterateClusterSearch(component);
|
||||
}
|
||||
}
|
||||
|
||||
for (long posLong : getReactor().activeModeratorCache) {
|
||||
for (EnumFacing dir : EnumFacing.VALUES) {
|
||||
IFissionComponent component = getPartMap(IFissionComponent.class).get(BlockPos.fromLong(posLong).offset(dir).toLong());
|
||||
if (component != null) {
|
||||
iterateClusterSearch(component);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (long posLong : getReactor().activeReflectorCache) {
|
||||
for (EnumFacing dir : EnumFacing.VALUES) {
|
||||
IFissionComponent component = getPartMap(IFissionComponent.class).get(BlockPos.fromLong(posLong).offset(dir).toLong());
|
||||
if (component != null) {
|
||||
iterateClusterSearch(component);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
super.refreshClusters();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refreshClusterStats(FissionCluster cluster) {
|
||||
super.refreshClusterStats(cluster);
|
||||
|
||||
for (IFissionComponent component : cluster.getComponentMap().values()) {
|
||||
if (component.isFunctional()) {
|
||||
cluster.componentCount++;
|
||||
if (component instanceof IFissionHeatingComponent) {
|
||||
cluster.rawHeating += ((IFissionHeatingComponent) component).getRawHeating();
|
||||
cluster.effectiveHeating += ((IFissionHeatingComponent) component).getEffectiveHeating();
|
||||
if (component instanceof IFissionFuelComponent) {
|
||||
cluster.fuelComponentCount++;
|
||||
cluster.totalHeatMult += ((IFissionFuelComponent) component).getHeatMultiplier();
|
||||
cluster.totalEfficiency += ((IFissionFuelComponent) component).getEfficiency();
|
||||
}
|
||||
}
|
||||
if (component instanceof IFissionCoolingComponent) {
|
||||
cluster.cooling += ((IFissionCoolingComponent) component).getCooling();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (getReactor().refreshFlag) {
|
||||
return;
|
||||
}
|
||||
|
||||
cluster.overcoolingEfficiencyFactor = cluster.cooling == 0L ? 1D : Math.min(1D, (double) (cluster.rawHeating + fission_cooling_efficiency_leniency) / (double) cluster.cooling);
|
||||
cluster.undercoolingLifetimeFactor = cluster.rawHeating == 0L ? 1D : Math.min(1D, (double) (cluster.cooling + fission_cooling_efficiency_leniency) / (double) cluster.rawHeating);
|
||||
cluster.effectiveHeating *= cluster.overcoolingEfficiencyFactor;
|
||||
cluster.totalEfficiency *= cluster.overcoolingEfficiencyFactor;
|
||||
cluster.meanHeatMult = cluster.fuelComponentCount == 0 ? 0D : (double) cluster.totalHeatMult / (double) cluster.fuelComponentCount;
|
||||
cluster.meanEfficiency = cluster.fuelComponentCount == 0 ? 0D : cluster.totalEfficiency / cluster.fuelComponentCount;
|
||||
|
||||
for (IFissionComponent component : cluster.getComponentMap().values()) {
|
||||
if (component instanceof IFissionFuelComponent) {
|
||||
IFissionFuelComponent fuelComponent = (IFissionFuelComponent) component;
|
||||
fuelComponent.setUndercoolingLifetimeFactor(cluster.undercoolingLifetimeFactor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -294,7 +179,7 @@ public class SolidFuelFissionLogic extends FissionReactorLogic {
|
||||
}
|
||||
|
||||
public boolean canProduceProducts() {
|
||||
ProcessorRecipe recipe = heatingRecipeInfo.getRecipe();
|
||||
BasicRecipe recipe = heatingRecipeInfo.getRecipe();
|
||||
IFluidIngredient fluidProduct = recipe.getFluidProducts().get(0);
|
||||
int productSize = fluidProduct.getMaxStackSize(0);
|
||||
if (productSize <= 0 || fluidProduct.getStack() == null) {
|
||||
@ -316,7 +201,7 @@ public class SolidFuelFissionLogic extends FissionReactorLogic {
|
||||
}
|
||||
|
||||
public void produceProducts() {
|
||||
ProcessorRecipe recipe = heatingRecipeInfo.getRecipe();
|
||||
BasicRecipe recipe = heatingRecipeInfo.getRecipe();
|
||||
int inputSize = recipe.getFluidIngredients().get(0).getMaxStackSize(heatingRecipeInfo.getFluidIngredientNumbers().get(0));
|
||||
int heatingRecipeRateInt = (int) heatingRecipeRate;
|
||||
|
||||
|
||||
@ -1,24 +1,20 @@
|
||||
package nc.multiblock.fission.solid.block;
|
||||
|
||||
import nc.NuclearCraft;
|
||||
import nc.block.property.*;
|
||||
import nc.multiblock.fission.FissionReactor;
|
||||
import nc.multiblock.fission.block.BlockFissionPart;
|
||||
import nc.multiblock.fission.solid.SolidFissionCellSetting;
|
||||
import nc.multiblock.fission.solid.tile.TileSolidFissionCell;
|
||||
import nc.util.Lang;
|
||||
import net.minecraft.block.state.*;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.*;
|
||||
import net.minecraft.world.*;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockSolidFissionCell extends BlockFissionPart implements ISidedProperty<SolidFissionCellSetting> {
|
||||
|
||||
// private static EnumFacing placementSide = null;
|
||||
public class BlockSolidFissionCell extends BlockFissionPart {
|
||||
|
||||
public BlockSolidFissionCell() {
|
||||
super();
|
||||
@ -29,37 +25,6 @@ public class BlockSolidFissionCell extends BlockFissionPart implements ISidedPro
|
||||
return new TileSolidFissionCell();
|
||||
}
|
||||
|
||||
private static final PropertySidedEnum<SolidFissionCellSetting> DOWN = PropertySidedEnum.create("down", SolidFissionCellSetting.class, EnumFacing.DOWN);
|
||||
private static final PropertySidedEnum<SolidFissionCellSetting> UP = PropertySidedEnum.create("up", SolidFissionCellSetting.class, EnumFacing.UP);
|
||||
private static final PropertySidedEnum<SolidFissionCellSetting> NORTH = PropertySidedEnum.create("north", SolidFissionCellSetting.class, EnumFacing.NORTH);
|
||||
private static final PropertySidedEnum<SolidFissionCellSetting> SOUTH = PropertySidedEnum.create("south", SolidFissionCellSetting.class, EnumFacing.SOUTH);
|
||||
private static final PropertySidedEnum<SolidFissionCellSetting> WEST = PropertySidedEnum.create("west", SolidFissionCellSetting.class, EnumFacing.WEST);
|
||||
private static final PropertySidedEnum<SolidFissionCellSetting> EAST = PropertySidedEnum.create("east", SolidFissionCellSetting.class, EnumFacing.EAST);
|
||||
|
||||
@Override
|
||||
public SolidFissionCellSetting getProperty(IBlockAccess world, BlockPos pos, EnumFacing facing) {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if (tile instanceof TileSolidFissionCell) {
|
||||
return ((TileSolidFissionCell) tile).getCellSetting(facing);
|
||||
}
|
||||
return SolidFissionCellSetting.DISABLED;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockStateContainer createBlockState() {
|
||||
return new BlockStateContainer(this, DOWN, UP, NORTH, SOUTH, WEST, EAST);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos) {
|
||||
return state.withProperty(DOWN, getProperty(world, pos, EnumFacing.DOWN)).withProperty(UP, getProperty(world, pos, EnumFacing.UP)).withProperty(NORTH, getProperty(world, pos, EnumFacing.NORTH)).withProperty(SOUTH, getProperty(world, pos, EnumFacing.SOUTH)).withProperty(WEST, getProperty(world, pos, EnumFacing.WEST)).withProperty(EAST, getProperty(world, pos, EnumFacing.EAST));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
|
||||
if (player == null) {
|
||||
@ -100,10 +65,12 @@ public class BlockSolidFissionCell extends BlockFissionPart implements ISidedPro
|
||||
if (tile instanceof TileSolidFissionCell) {
|
||||
TileSolidFissionCell cell = (TileSolidFissionCell) tile;
|
||||
dropItems(world, pos, cell.getInventoryStacksInternal());
|
||||
// world.updateComparatorOutputLevel(pos, this);
|
||||
// FissionReactor reactor = cell.getMultiblock();
|
||||
// world.removeTileEntity(pos);
|
||||
/* if (reactor != null) { reactor.getLogic().refreshPorts(); } */
|
||||
/* world.updateComparatorOutputLevel(pos, this);
|
||||
FissionReactor reactor = cell.getMultiblock();
|
||||
world.removeTileEntity(pos);
|
||||
if (reactor != null) {
|
||||
reactor.getLogic().refreshPorts();
|
||||
}*/
|
||||
}
|
||||
}
|
||||
// super.breakBlock(world, pos, state);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user