mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
all hail the spreadsheet
This commit is contained in:
parent
a8d5c94baf
commit
06b66e3edf
@ -62,7 +62,7 @@ public abstract class NEIUniversalHandler extends TemplateRecipeHandler {
|
||||
ItemStack[] sub = out[i];
|
||||
|
||||
boolean twos = out.length > 3;
|
||||
this.output[i] = new PositionedStack(sub, 102 + i * 18 - ((twos && i < 2) ? 0 : 36), 24 + (twos ? (i < 2 ? -9 : 9) : 0));
|
||||
this.output[i] = new PositionedStack(sub, 102 + i * 18 - ((twos && i > 1) ? 36 : 0), 24 + (twos ? (i < 2 ? -9 : 9) : 0));
|
||||
}
|
||||
|
||||
this.machinePositioned = new PositionedStack(machine, 75, 31);
|
||||
@ -109,7 +109,7 @@ public abstract class NEIUniversalHandler extends TemplateRecipeHandler {
|
||||
drawTexturedModalRect(47 + i * -18, 23, 5, 87, 18, 18);
|
||||
for(int i = 0; i < rec.output.length; i++) {
|
||||
boolean twos = rec.output.length > 3;
|
||||
drawTexturedModalRect(101 + i * 18 - ((twos && i < 2) ? 0 : 36), 23 + (twos ? (i < 2 ? -9 : 9) : 0), 5, 87, 18, 18);
|
||||
drawTexturedModalRect(101 + i * 18 - ((twos && i > 1) ? 36 : 0), 23 + (twos ? (i < 2 ? -9 : 9) : 0), 5, 87, 18, 18);
|
||||
}
|
||||
|
||||
drawTexturedModalRect(74, 14, 59, 87, 18, 38);
|
||||
|
||||
@ -194,7 +194,7 @@ public class Fluids {
|
||||
UNSATURATEDS = new FluidType("UNSATURATEDS", 0x628FAE, 1, 4, 1, EnumSymbol.NONE).addTraits(new FT_Flammable(1_000_000), GASEOUS); //acetylene burns as hot as satan's asshole
|
||||
SALIENT = new FluidType("SALIENT", 0x457F2D, 0, 0, 0, EnumSymbol.NONE).addTraits(DELICIOUS, LIQUID);
|
||||
XPJUICE = new FluidType("XPJUICE", 0xBBFF09, 0, 0, 0, EnumSymbol.NONE).addTraits(LIQUID);
|
||||
ENDERJUICE = new FluidType("ENDERJUICE", 0x127766, 0, 0, 0, EnumSymbol.NONE).addTraits(DELICIOUS, LIQUID);
|
||||
ENDERJUICE = new FluidType("ENDERJUICE", 0x127766, 0, 0, 0, EnumSymbol.NONE).addTraits(LIQUID);
|
||||
PETROIL_LEADED = new FluidType("PETROIL_LEADED", 0x44413d, 1, 3, 0, EnumSymbol.NONE).addContainers(0x2331F6, ExtContainer.CANISTER).addTraits(new FT_Flammable(125_000), new FT_Combustible(FuelGrade.MEDIUM, 450_000), LIQUID);
|
||||
GASOLINE_LEADED = new FluidType("GASOLINE_LEADED", 0x445772, 1, 2, 0, EnumSymbol.NONE).addContainers(0x2F775A, ExtContainer.CANISTER).addTraits(new FT_Flammable(400_000), new FT_Combustible(FuelGrade.HIGH, 1_500_000), LIQUID);
|
||||
COALGAS_LEADED = new FluidType("COALGAS_LEADED", 0x445772, 1, 2, 0, EnumSymbol.NONE).addContainers(0x1E155F, ExtContainer.CANISTER).addTraits(new FT_Flammable(75_000), new FT_Combustible(FuelGrade.MEDIUM, 250_000), LIQUID);
|
||||
@ -331,6 +331,97 @@ public class Fluids {
|
||||
if(idMapping.size() != metaOrder.size()) {
|
||||
throw new IllegalStateException("A severe error has occoured during NTM's fluid registering process! The MetaOrder and Mappings are inconsistent! Mapping size: " + idMapping.size()+ " / MetaOrder size: " + metaOrder.size());
|
||||
}
|
||||
|
||||
|
||||
/// EXPERIMENTAL ///
|
||||
|
||||
long baseline = 100_000L; //we do not know
|
||||
double demandVeryLow = 0.5D;
|
||||
double demandLow = 1.0D;
|
||||
double demandMedium = 1.5D;
|
||||
double demandHigh = 2.0D;
|
||||
double complexityRefinery = 1.1D;
|
||||
double complexityFraction = 1.05D;
|
||||
double complexityCracking = 1.25D;
|
||||
double complexityChemplant = 1.1D;
|
||||
double complexityLubed = 1.15D;
|
||||
double complexityLeaded = 1.5D;
|
||||
double flammabilityLow = 0.25D;
|
||||
double flammabilityNormal = 1.0D;
|
||||
double flammabilityHigh = 2.0D;
|
||||
|
||||
/// the allmighty excel spreadsheet has spoken! ///
|
||||
//OIL.addTraits(new FT_Flammable((long) (baseline / 1D * flammabilityLow * demandLow)));
|
||||
//CRACKOIL.addTraits(new FT_Flammable((long) (baseline / 1D * flammabilityLow * demandLow * complexityCracking)));
|
||||
//GAS.addTraits(new FT_Flammable((long) (baseline / 1D * flammabilityNormal * demandVeryLow)));
|
||||
//HEAVYOIL.addTraits(new FT_Flammable((long) (baseline / 0.5 * flammabilityLow * demandLow * complexityRefinery)));
|
||||
//SMEAR.addTraits(new FT_Flammable((long) (baseline / 0.35 * flammabilityLow * demandLow * complexityRefinery * complexityFraction)));
|
||||
//RECLAIMED.addTraits(new FT_Flammable((long) (baseline / 0.28 * flammabilityLow * demandLow * complexityRefinery * complexityFraction * complexityChemplant)));
|
||||
//PETROIL.addTraits(new FT_Flammable((long) (baseline / 0.28 * flammabilityLow * demandLow * complexityRefinery * complexityFraction * complexityChemplant * complexityLubed)));
|
||||
//PETROIL_LEADED.addTraits(new FT_Flammable((long) (baseline / 0.28 * flammabilityLow * demandLow * complexityRefinery * complexityFraction * complexityChemplant * complexityLubed * complexityLeaded)));
|
||||
//HEATINGOIL.addTraits(new FT_Flammable((long) (baseline / 0.31 * flammabilityNormal * demandLow * complexityRefinery * complexityFraction * complexityFraction)));
|
||||
//NAPHTHA.addTraits(new FT_Flammable((long) (baseline / 0.25 * flammabilityLow * demandLow * complexityRefinery)));
|
||||
//NAPHTHA_CRACK.addTraits(new FT_Flammable((long) (baseline / 0.40 * flammabilityLow * demandLow * complexityRefinery * complexityCracking)));
|
||||
//GASOLINE.addTraits(new FT_Flammable((long) (baseline / 0.20 * flammabilityNormal * demandLow * complexityRefinery * complexityChemplant)));
|
||||
//GASOLINE_LEADED.addTraits(new FT_Flammable((long) (baseline / 0.20 * flammabilityNormal * demandLow * complexityRefinery * complexityChemplant * complexityLeaded)));
|
||||
//DIESEL.addTraits(new FT_Flammable((long) (baseline / 0.21 * flammabilityNormal * demandLow * complexityRefinery * complexityFraction)));
|
||||
//DIESEL_CRACK.addTraits(new FT_Flammable((long) (baseline / 0.28 * flammabilityNormal * demandLow * complexityRefinery * complexityCracking * complexityFraction)));
|
||||
//LIGHTOIL.addTraits(new FT_Flammable((long) (baseline / 0.15 * flammabilityNormal * demandHigh * complexityRefinery)));
|
||||
//LIGHTOIL_CRACK.addTraits(new FT_Flammable((long) (baseline / 0.30 * flammabilityNormal * demandHigh * complexityRefinery * complexityCracking)));
|
||||
//KEROSENE.addTraits(new FT_Flammable((long) (baseline / 0.09 * flammabilityNormal * demandHigh * complexityRefinery * complexityFraction)));
|
||||
//PETROLEUM.addTraits(new FT_Flammable((long) (baseline / 0.10 * flammabilityNormal * demandMedium * complexityRefinery)));
|
||||
//AROMATICS.addTraits(new FT_Flammable((long) (baseline / 0.15 * flammabilityHigh * demandHigh * complexityRefinery * complexityCracking)));
|
||||
//UNSATURATEDS.addTraits(new FT_Flammable((long) (baseline / 0.15 * flammabilityLow * demandHigh * complexityRefinery * complexityCracking)));
|
||||
//LPG.addTraits(new FT_Flammable((long) (baseline / 0.05 * flammabilityNormal * demandMedium * complexityRefinery * complexityChemplant)));
|
||||
//BALEFIRE.addTraits(new FT_Flammable(KEROSENE.getTrait(FT_Flammable.class).getHeatEnergy() * 100L));
|
||||
|
||||
registerCalculatedFuel(OIL, (baseline / 1D * flammabilityLow * demandLow), 0, null);
|
||||
registerCalculatedFuel(CRACKOIL, (baseline / 1D * flammabilityLow * demandLow * complexityCracking), 0, null);
|
||||
registerCalculatedFuel(GAS, (baseline / 1D * flammabilityNormal * demandVeryLow), 0, null);
|
||||
registerCalculatedFuel(HEAVYOIL, (baseline / 0.5 * flammabilityLow * demandLow * complexityRefinery), 1.25D, FuelGrade.LOW);
|
||||
registerCalculatedFuel(SMEAR, (baseline / 0.35 * flammabilityLow * demandLow * complexityRefinery * complexityFraction), 1.25D, FuelGrade.LOW);
|
||||
registerCalculatedFuel(RECLAIMED, (baseline / 0.28 * flammabilityLow * demandLow * complexityRefinery * complexityFraction * complexityChemplant), 1.25D, FuelGrade.LOW);
|
||||
registerCalculatedFuel(PETROIL, (baseline / 0.28 * flammabilityLow * demandLow * complexityRefinery * complexityFraction * complexityChemplant * complexityLubed), 1.5D, FuelGrade.MEDIUM);
|
||||
registerCalculatedFuel(PETROIL_LEADED, (baseline / 0.28 * flammabilityLow * demandLow * complexityRefinery * complexityFraction * complexityChemplant * complexityLubed * complexityLeaded), 1.5D, FuelGrade.MEDIUM);
|
||||
registerCalculatedFuel(HEATINGOIL, (baseline / 0.31 * flammabilityNormal * demandLow * complexityRefinery * complexityFraction * complexityFraction), 1.0D, FuelGrade.LOW);
|
||||
registerCalculatedFuel(NAPHTHA, (baseline / 0.25 * flammabilityLow * demandLow * complexityRefinery), 1.5D, FuelGrade.MEDIUM);
|
||||
registerCalculatedFuel(NAPHTHA_CRACK, (baseline / 0.40 * flammabilityLow * demandLow * complexityRefinery * complexityCracking), 1.5D, FuelGrade.MEDIUM);
|
||||
registerCalculatedFuel(GASOLINE, (baseline / 0.20 * flammabilityNormal * demandLow * complexityRefinery * complexityChemplant), 2.5D, FuelGrade.HIGH);
|
||||
registerCalculatedFuel(GASOLINE_LEADED, (baseline / 0.20 * flammabilityNormal * demandLow * complexityRefinery * complexityChemplant * complexityLeaded), 2.5D, FuelGrade.HIGH);
|
||||
registerCalculatedFuel(DIESEL, (baseline / 0.21 * flammabilityNormal * demandLow * complexityRefinery * complexityFraction), 2.5D, FuelGrade.HIGH);
|
||||
registerCalculatedFuel(DIESEL_CRACK, (baseline / 0.28 * flammabilityNormal * demandLow * complexityRefinery * complexityCracking * complexityFraction), 2.5D, FuelGrade.HIGH);
|
||||
registerCalculatedFuel(LIGHTOIL, (baseline / 0.15 * flammabilityNormal * demandHigh * complexityRefinery), 1.5D, FuelGrade.MEDIUM);
|
||||
registerCalculatedFuel(LIGHTOIL_CRACK, (baseline / 0.30 * flammabilityNormal * demandHigh * complexityRefinery * complexityCracking), 1.5D, FuelGrade.MEDIUM);
|
||||
registerCalculatedFuel(KEROSENE, (baseline / 0.09 * flammabilityNormal * demandHigh * complexityRefinery * complexityFraction), 1.5D, FuelGrade.AERO);
|
||||
registerCalculatedFuel(PETROLEUM, (baseline / 0.10 * flammabilityNormal * demandMedium * complexityRefinery), 0, null);
|
||||
registerCalculatedFuel(AROMATICS, (baseline / 0.15 * flammabilityLow * demandHigh * complexityRefinery * complexityCracking), 0, null);
|
||||
registerCalculatedFuel(LPG, (baseline / 0.05 * flammabilityNormal * demandMedium * complexityRefinery * complexityChemplant), 2.5, FuelGrade.HIGH);
|
||||
registerCalculatedFuel(BALEFIRE, KEROSENE.getTrait(FT_Flammable.class).getHeatEnergy() * 100L, 2.5, FuelGrade.HIGH);
|
||||
}
|
||||
|
||||
private static void registerCalculatedFuel(FluidType type, double base, double combustMult, FuelGrade grade) {
|
||||
|
||||
long flammable = (long) base;
|
||||
long combustible = (long) (base * combustMult);
|
||||
|
||||
flammable = round(flammable);
|
||||
combustible = round(combustible);
|
||||
|
||||
type.addTraits(new FT_Flammable(flammable));
|
||||
|
||||
if(combustible > 0 && grade != null)
|
||||
type.addTraits(new FT_Combustible(grade, combustible));
|
||||
}
|
||||
|
||||
/** ugly but it does the thing well enough */
|
||||
private static long round(long l) {
|
||||
if(l > 10_000_000L) return l - (l % 100_000L);
|
||||
if(l > 1_000_000L) return l - (l % 10_000L);
|
||||
if(l > 100_000L) return l - (l % 1_000L);
|
||||
if(l > 10_000L) return l - (l % 100L);
|
||||
if(l > 1_000L) return l - (l % 10L);
|
||||
|
||||
return l;
|
||||
}
|
||||
|
||||
protected static int registerSelf(FluidType fluid) {
|
||||
|
||||
@ -95,7 +95,7 @@ public class SolidificationRecipes extends SerializableRecipe {
|
||||
|
||||
//works flawlessly, but the new values are so high that they literally do not fit into the solidifier. some fuels do need a buff.
|
||||
|
||||
/*registerSFAuto(SMEAR);
|
||||
registerSFAuto(SMEAR);
|
||||
registerSFAuto(HEATINGOIL);
|
||||
registerSFAuto(RECLAIMED);
|
||||
registerSFAuto(PETROIL);
|
||||
@ -123,10 +123,13 @@ public class SolidificationRecipes extends SerializableRecipe {
|
||||
}
|
||||
private static void registerSFAuto(FluidType fluid, long tuPerSF, Item fuel) {
|
||||
long tuPerBucket = fluid.getTrait(FT_Flammable.class).getHeatEnergy();
|
||||
double penalty = 1.5D;
|
||||
double penalty = 1.25D;
|
||||
|
||||
int mB = (int) (tuPerSF * 1000L * penalty / tuPerBucket);
|
||||
|
||||
|
||||
if(mB > 10_000) mB -= (mB % 1000);
|
||||
else if(mB > 1_000) mB -= (mB % 100);
|
||||
else if(mB > 100) mB -= (mB % 10);
|
||||
|
||||
registerRecipe(fluid, mB, fuel);
|
||||
}
|
||||
|
||||
@ -158,6 +158,8 @@ public class TileEntityMachineBattery extends TileEntityMachineBase implements I
|
||||
|
||||
long prevPower = this.power;
|
||||
|
||||
power = Library.chargeItemsFromTE(slots, 1, power, getMaxPower());
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
this.transmitPowerFairly();
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
@ -168,7 +170,6 @@ public class TileEntityMachineBattery extends TileEntityMachineBase implements I
|
||||
this.lastRedstone = comp;
|
||||
|
||||
power = Library.chargeTEFromItems(slots, 0, power, getMaxPower());
|
||||
power = Library.chargeItemsFromTE(slots, 1, power, getMaxPower());
|
||||
|
||||
long avg = (power + prevPower) / 2;
|
||||
this.delta = avg - this.log[0];
|
||||
@ -216,7 +217,7 @@ public class TileEntityMachineBattery extends TileEntityMachineBase implements I
|
||||
}
|
||||
}
|
||||
|
||||
//ubsubscribe from all nets
|
||||
//unsubscribe from all nets
|
||||
nets.forEach(x -> x.unsubscribe(this));
|
||||
|
||||
//send power to buffered consumers, independent of nets
|
||||
|
||||
@ -33,8 +33,8 @@ public class SchistStratum {
|
||||
double scale = 0.01D;
|
||||
int threshold = 5;
|
||||
|
||||
for(int x = cX; x < cX + 16; x++) {
|
||||
for(int z = cZ; z < cZ + 16; z++) {
|
||||
for(int x = cX + 8; x < cX + 24; x++) {
|
||||
for(int z = cZ + 8; z < cZ + 24; z++) {
|
||||
|
||||
double n = noise.func_151601_a(x * scale, z * scale);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user