Skip to content

Commit

Permalink
Collisions (#3284)
Browse files Browse the repository at this point in the history
  • Loading branch information
FourIsTheNumber authored Sep 26, 2024
1 parent 21999bb commit 05877d2
Show file tree
Hide file tree
Showing 18 changed files with 54 additions and 161 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@

package bartworks.system.material.CircuitGeneration;

import static gregtech.api.enums.ItemList.Circuit_Board_Advanced;
import static gregtech.api.enums.ItemList.Circuit_Board_Basic;
import static gregtech.api.enums.ItemList.Circuit_Board_Bio;
import static gregtech.api.enums.ItemList.Circuit_Board_Bio_Ultra;
import static gregtech.api.enums.ItemList.Circuit_Board_Coated;
import static gregtech.api.enums.ItemList.Circuit_Board_Coated_Basic;
import static gregtech.api.enums.ItemList.Circuit_Board_Elite;
import static gregtech.api.enums.ItemList.Circuit_Board_Epoxy;
import static gregtech.api.enums.ItemList.Circuit_Board_Epoxy_Advanced;
import static gregtech.api.enums.ItemList.Circuit_Board_Fiberglass;
Expand Down Expand Up @@ -149,6 +146,12 @@ public static void makeCircuitParts() {
}

for (ItemList single : CIRCUIT_PARTS) {
// Skip placeholder values and maintain the ids
if (single == null) {
CircuitImprintLoader.reverseIDs--;
continue;
}

if (!single.hasBeenSet()) continue;
ItemStack itemStack = single.get(1);
if (!GTUtility.isStackValid(itemStack)) continue;
Expand Down Expand Up @@ -194,9 +197,9 @@ public static void makeCircuitParts() {
*/
private static final List<ItemList> CIRCUIT_PARTS = Collections.unmodifiableList(
Arrays.asList(
Circuit_Board_Basic,
Circuit_Board_Advanced,
Circuit_Board_Elite,
null,
null,
null,
Circuit_Parts_Crystal_Chip_Elite,
Circuit_Parts_Crystal_Chip_Master,
Circuit_Board_Coated,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,6 @@ public static void RecipeLoad() {
.noOptimize()
.addTo(neutronActivatorRecipes);

// Fix shit
GTValues.RA.stdBuilder()
.itemInputs(lowQualityNaquadriaSolution.get(OrePrefixes.cell, 1))
.itemOutputs(Materials.Tin.getDust(2))
.duration(16 * SECONDS + 14 * TICKS)
.eut(4)
.addTo(maceratorRecipes);

// Naquadah Rework Line
GTValues.RA.stdBuilder()
.itemInputs(naquadahEarth.get(OrePrefixes.dust, 2), GTUtility.getIntegratedCircuit(1))
Expand Down
39 changes: 0 additions & 39 deletions src/main/java/goodgenerator/util/CrackRecipeAdder.java
Original file line number Diff line number Diff line change
Expand Up @@ -520,12 +520,6 @@ public static void registerWire(int ID, Werkstoff material, int aAmperage, int a
true,
false).getStackForm(1L));
}
GTValues.RA.stdBuilder()
.itemInputs(material.get(OrePrefixes.ingot, 1), GTUtility.getIntegratedCircuit(1))
.itemOutputs(material.get(OrePrefixes.wireGt01, 2))
.duration(5 * SECONDS)
.eut(4)
.addTo(wiremillRecipes);
GTValues.RA.stdBuilder()
.itemInputs(material.get(OrePrefixes.ingot, 1), GTUtility.getIntegratedCircuit(2))
.itemOutputs(material.get(OrePrefixes.wireGt02, 1))
Expand Down Expand Up @@ -556,12 +550,6 @@ public static void registerWire(int ID, Werkstoff material, int aAmperage, int a
.duration(17 * SECONDS + 10 * TICKS)
.eut(4)
.addTo(wiremillRecipes);
GTValues.RA.stdBuilder()
.itemInputs(material.get(OrePrefixes.stick, 1), GTUtility.getIntegratedCircuit(1))
.itemOutputs(material.get(OrePrefixes.wireGt01, 1))
.duration(2 * SECONDS + 10 * TICKS)
.eut(4)
.addTo(wiremillRecipes);
GTValues.RA.stdBuilder()
.itemInputs(material.get(OrePrefixes.stick, 2), GTUtility.getIntegratedCircuit(2))
.itemOutputs(material.get(OrePrefixes.wireGt02, 1))
Expand All @@ -586,38 +574,11 @@ public static void registerWire(int ID, Werkstoff material, int aAmperage, int a
.duration(12 * SECONDS + 10 * TICKS)
.eut(4)
.addTo(wiremillRecipes);
GTValues.RA.stdBuilder()
.itemInputs(material.get(OrePrefixes.stick, 16), GTUtility.getIntegratedCircuit(16))
.itemOutputs(material.get(OrePrefixes.wireGt16, 1))
.duration(15 * SECONDS)
.eut(4)
.addTo(wiremillRecipes);
GTValues.RA.stdBuilder()
.itemInputs(material.get(OrePrefixes.ingot, 1), GTUtility.getIntegratedCircuit(3))
.itemOutputs(material.get(OrePrefixes.wireFine, 8))
.duration(5 * SECONDS)
.eut(4)
.addTo(wiremillRecipes);
GTValues.RA.stdBuilder()
.itemInputs(material.get(OrePrefixes.stick, 1), GTUtility.getIntegratedCircuit(3))
.itemOutputs(material.get(OrePrefixes.wireFine, 4))
.duration(2 * SECONDS + 10 * TICKS)
.eut(4)
.addTo(wiremillRecipes);
GTValues.RA.stdBuilder()
.itemInputs(material.get(OrePrefixes.wireGt01, 1), GTUtility.getIntegratedCircuit(1))
.itemOutputs(material.get(OrePrefixes.wireFine, 4))
.duration(10 * SECONDS)
.eut(8)
.addTo(wiremillRecipes);
GTValues.RA.stdBuilder()
.itemInputs(material.get(OrePrefixes.ingot, 1), ItemList.Shape_Extruder_Wire.get(0))
.itemOutputs(material.get(OrePrefixes.wireGt01, 2))
.duration(
material.getStats()
.getMass() * 8
* TICKS)
.eut(TierEU.RECIPE_HV)
.addTo(extruderRecipes);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDic
} else if (!aMaterial.contains(SubTag.NO_WORKING)) {
if ((!OrePrefixes.block.isIgnored(aMaterial))
&& (null == GTOreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L))
&& GTOreDictUnificator.get(OrePrefixes.block, aMaterial, 1L) != null) {
&& GTOreDictUnificator.get(OrePrefixes.block, aMaterial, 1L) != null
&& (aMaterial != Materials.Clay)) {

GTValues.RA.stdBuilder()
.itemInputs(GTOreDictUnificator.get(OrePrefixes.dust, aMaterial, 9))
Expand All @@ -133,7 +134,8 @@ public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDic
&& (aMaterial != Materials.Paper)
&& (aMaterial != MaterialsUEVplus.TranscendentMetal)
&& (aMaterial != Materials.Clay)
&& (aMaterial != Materials.Wood)) {
&& (aMaterial != Materials.Wood)
&& (aMaterial != Materials.Carbon)) {
// compressor recipe
{
if (GTOreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L) != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ public ProcessingFoil() {
@Override
public void registerOre(OrePrefixes prefix, Materials material, String oreDictName, String modName,
ItemStack stack) {
// Blacklist materials which are handled by Werkstoff loader
if (material == Materials.Calcium || material == Materials.Magnesia) return;

registerBenderRecipe(material);
registerCover(stack, material);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ public ProcessingIngot() {
@Override
public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName,
ItemStack aStack) {
// Blacklist materials which are handled by Werkstoff loader
if (aMaterial == Materials.Calcium || aMaterial == Materials.Magnesia) return;

boolean aNoSmashing = aMaterial.contains(SubTag.NO_SMASHING);
boolean aStretchy = aMaterial.contains(SubTag.STRETCHY);
boolean aNoSmelting = aMaterial.contains(SubTag.NO_SMELTING);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public ProcessingNugget() {
@Override
public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName,
ItemStack aStack) {
// Blacklist materials which are handled by Werkstoff loader
if (aMaterial == Materials.Calcium || aMaterial == Materials.Magnesia) return;

if (aMaterial.contains(SubTag.SMELTING_TO_GEM)
&& GTOreDictUnificator.get(OrePrefixes.gem, aMaterial.mSmeltInto, 1L) != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ public ProcessingShaping() {
@Override
public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName,
ItemStack aStack) {
// Blacklist materials which are handled by Werkstoff loader
if (aMaterial == Materials.Calcium || aMaterial == Materials.Magnesia) return;

if (((aMaterial == Materials.Glass) || (GTOreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L) != null))
&& (!aMaterial.contains(SubTag.NO_SMELTING))) {
long aMaterialMass = aMaterial.getMass();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ public ProcessingStick() {
public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName,
ItemStack aStack) {
// Blacklist materials which are handled by Werkstoff loader
if (aMaterial == Materials.Salt || aMaterial == Materials.RockSalt || aMaterial == Materials.Spodumene) return;
if (aMaterial == Materials.Salt || aMaterial == Materials.RockSalt
|| aMaterial == Materials.Spodumene
|| aMaterial == Materials.Calcium
|| aMaterial == Materials.Magnesia) return;

if (aMaterial.getProcessingMaterialTierEU() < TierEU.IV) {
GTModHandler.addCraftingRecipe(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import static gregtech.api.util.GTRecipeBuilder.SECONDS;
import static gregtech.api.util.GTRecipeBuilder.TICKS;
import static gregtech.api.util.GTRecipeConstants.UniversalChemical;
import static gtPlusPlus.core.material.MaterialMisc.CALCIUM_CHLORIDE;
import static gtPlusPlus.core.material.MaterialMisc.SODIUM_NITRATE;
import static net.minecraftforge.fluids.FluidRegistry.getFluidStack;

Expand Down Expand Up @@ -5847,7 +5846,7 @@ public void multiblockOnly() {
GTValues.RA.stdBuilder()
.itemInputs(
GTUtility.getIntegratedCircuit(1),
CALCIUM_CHLORIDE.getDust(1),
WerkstoffLoader.CalciumChloride.get(OrePrefixes.dust, 1),
GTOreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.ParaPhenylenediamine, 9),
GTOreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.TerephthaloylChloride, 9))
.fluidInputs(MaterialsKevlar.NMethylIIPyrrolidone.getFluid(1000))
Expand All @@ -5861,7 +5860,7 @@ public void multiblockOnly() {
GTValues.RA.stdBuilder()
.itemInputs(
GTUtility.getIntegratedCircuit(9),
CALCIUM_CHLORIDE.getDust(7),
WerkstoffLoader.CalciumChloride.get(OrePrefixes.dust, 7),
GTOreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.ParaPhenylenediamine, 63),
GTOreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.TerephthaloylChloride, 63))
.fluidInputs(MaterialsKevlar.NMethylIIPyrrolidone.getFluid(7000))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,19 @@ public void distillationTowerRecipes() {
.eut(256)
.addTo(distillationTowerRecipes);

GTValues.RA.stdBuilder()
.itemInputs(GTUtility.getIntegratedCircuit(3))
.fluidInputs(Materials.WoodTar.getFluid(1000))
.fluidOutputs(
Materials.Creosote.getFluid(250),
Materials.Phenol.getFluid(100),
Materials.Benzene.getFluid(400),
Materials.Toluene.getFluid(100),
MaterialsKevlar.IVDimethylbenzene.getFluid(150))
.duration(2 * SECONDS)
.eut(256)
.addTo(distillationTowerRecipes);

GTValues.RA.stdBuilder()
.itemInputs(GTUtility.getIntegratedCircuit(3))
.itemOutputs(Materials.Charcoal.getDustSmall(1))
Expand Down Expand Up @@ -607,16 +620,6 @@ public void distillationTowerRecipes() {
}

public void universalDistillationTowerRecipes() {
addUniversalDistillationRecipewithCircuit(
Materials.WoodTar.getFluid(1000),
new ItemStack[] { GTUtility.getIntegratedCircuit(3) },
new FluidStack[] { Materials.Creosote.getFluid(250), Materials.Phenol.getFluid(100),
Materials.Benzene.getFluid(400), Materials.Toluene.getFluid(100),
MaterialsKevlar.IVDimethylbenzene.getFluid(150) },
GTValues.NI,
40,
256);

addUniversalDistillationRecipewithCircuit(
Materials.CharcoalByproducts.getGas(1000),
new ItemStack[] { GTUtility.getIntegratedCircuit(1) },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import static gregtech.api.enums.Mods.IndustrialCraft2;
import static gregtech.api.enums.Mods.NewHorizonsCoreMod;
import static gregtech.api.enums.Mods.Railcraft;
import static gregtech.api.enums.Mods.Thaumcraft;
import static gregtech.api.recipe.RecipeMaps.fluidExtractionRecipes;
import static gregtech.api.util.GTModHandler.getModItem;
import static gregtech.api.util.GTRecipeBuilder.SECONDS;
Expand Down Expand Up @@ -136,13 +135,6 @@ public void run() {
.eut(4)
.addTo(fluidExtractionRecipes);

GTValues.RA.stdBuilder()
.itemInputs(getModItem(Thaumcraft.ID, "ItemResource", 1, 3))
.fluidOutputs(Materials.Mercury.getFluid(1000L))
.duration(6 * SECONDS + 8 * TICKS)
.eut(4)
.addTo(fluidExtractionRecipes);

GTValues.RA.stdBuilder()
.itemInputs(GTOreDictUnificator.get(OrePrefixes.gem, Materials.Mercury, 1L))
.fluidOutputs(Materials.Mercury.getFluid(1000L))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import static gregtech.api.enums.Mods.IndustrialCraft2;
import static gregtech.api.enums.Mods.Railcraft;
import static gregtech.api.enums.Mods.Thaumcraft;
import static gregtech.api.recipe.RecipeMaps.fluidSolidifierRecipes;
import static gregtech.api.util.GTModHandler.getModItem;
import static gregtech.api.util.GTRecipeBuilder.INGOTS;
Expand Down Expand Up @@ -33,50 +32,17 @@ public class FluidSolidifierRecipes implements Runnable {

@Override
public void run() {
Materials[] materialArray = new Materials[] { Materials.Iron, Materials.WroughtIron, Materials.Gold,
Materials.Bronze, Materials.Copper, Materials.AnnealedCopper, Materials.Tin, Materials.Lead,
Materials.Steel };

ItemStack[] materialCasing = new ItemStack[] { ItemList.IC2_Item_Casing_Iron.get(1L),
ItemList.IC2_Item_Casing_Iron.get(1L), ItemList.IC2_Item_Casing_Gold.get(1L),
ItemList.IC2_Item_Casing_Bronze.get(1L), ItemList.IC2_Item_Casing_Copper.get(1L),
ItemList.IC2_Item_Casing_Copper.get(1L), ItemList.IC2_Item_Casing_Tin.get(1L),
ItemList.IC2_Item_Casing_Lead.get(1L), ItemList.IC2_Item_Casing_Steel.get(1L) };

for (int i = 0; i < materialArray.length; i++) {
if (materialArray[i].mStandardMoltenFluid == null) {
continue;
}

GTValues.RA.stdBuilder()
.itemInputs(ItemList.Shape_Mold_Casing.get(0L))
.itemOutputs(materialCasing[i])
.fluidInputs(materialArray[i].getMolten(72L))
.duration(16 * TICKS)
.eut(8)
.addTo(fluidSolidifierRecipes);
}

{
ItemStack flask = ItemList.VOLUMETRIC_FLASK.get(1);
NBTTagCompound nbtFlask = new NBTTagCompound();
nbtFlask.setInteger("Capacity", 1000);
flask.setTagCompound(nbtFlask);
GTValues.RA.stdBuilder()
.itemInputs(ItemList.Shape_Mold_Ball.get(0))
.itemOutputs(flask)
.fluidInputs(new FluidStack(FluidRegistry.getFluid("molten.borosilicateglass"), 144))
.duration(2 * SECONDS + 4 * TICKS)
.eut(TierEU.RECIPE_LV)
.addTo(fluidSolidifierRecipes);
}

ItemStack flask = ItemList.VOLUMETRIC_FLASK.get(1);
NBTTagCompound nbtFlask = new NBTTagCompound();
nbtFlask.setInteger("Capacity", 1000);
flask.setTagCompound(nbtFlask);
GTValues.RA.stdBuilder()
.itemInputs(ItemList.Shape_Mold_Ball.get(0L))
.itemOutputs(getModItem(Thaumcraft.ID, "ItemResource", 1, 3))
.fluidInputs(Materials.Mercury.getFluid(1000L))
.duration(6 * SECONDS + 8 * TICKS)
.eut(4)
.itemInputs(ItemList.Shape_Mold_Ball.get(0))
.itemOutputs(flask)
.fluidInputs(new FluidStack(FluidRegistry.getFluid("molten.borosilicateglass"), 144))
.duration(2 * SECONDS + 4 * TICKS)
.eut(TierEU.RECIPE_LV)
.addTo(fluidSolidifierRecipes);

GTValues.RA.stdBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ public void run() {
GTOreDictUnificator.set(OrePrefixes.block, Materials.Coal, new ItemStack(Blocks.coal_block, 1, 0));
GTOreDictUnificator.set(OrePrefixes.block, Materials.Redstone, new ItemStack(Blocks.redstone_block, 1, 0));
GTOreDictUnificator.set(OrePrefixes.block, Materials.NetherQuartz, new ItemStack(Blocks.quartz_block, 1, 0));
GTOreDictUnificator.set(OrePrefixes.block, Materials.Clay, new ItemStack(Blocks.clay, 1, 0));
if (Blocks.ender_chest != null) {
GTOreDictUnificator.registerOre(OreDictNames.enderChest, new ItemStack(Blocks.ender_chest, 1));
}
Expand Down
16 changes: 0 additions & 16 deletions src/main/java/gtPlusPlus/core/material/MaterialMisc.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public static void run() {
MaterialUtils.generateSpecialDustAndAssignToAMaterial(STRONTIUM_HYDROXIDE, false);
MaterialUtils.generateSpecialDustAndAssignToAMaterial(CYANOACETIC_ACID, false);
MaterialUtils.generateSpecialDustAndAssignToAMaterial(SODIUM_CYANIDE, false);
MaterialUtils.generateSpecialDustAndAssignToAMaterial(CALCIUM_CHLORIDE, false);
MaterialUtils.generateSpecialDustAndAssignToAMaterial(COPPER_SULFATE, false);
MaterialUtils.generateSpecialDustAndAssignToAMaterial(COPPER_SULFATE_HYDRATED, false);
WATER.registerComponentForMaterial(FluidUtils.getWater(1000));
Expand Down Expand Up @@ -447,21 +446,6 @@ public static void run() {
new MaterialStack(MaterialsElements.getInstance().CARBON, 1),
new MaterialStack(MaterialsElements.getInstance().NITROGEN, 1));

public static final Material CALCIUM_CHLORIDE = new Material(
"Calcium Chloride",
MaterialState.SOLID, // State
new short[] { 180, 190, 255 }, // Material Colour
563, // Melting Point in C
1496, // Boiling Point in C
-1, // Protons
-1,
false, // Uses Blast furnace?
"CaCl2",
0,
false,
new MaterialStack(MaterialsElements.getInstance().CALCIUM, 1),
new MaterialStack(MaterialsElements.getInstance().CHLORINE, 2));

public static final Material CYANOACETIC_ACID = new Material(
"Cyanoacetic Acid",
MaterialState.SOLID, // State
Expand Down
Loading

0 comments on commit 05877d2

Please sign in to comment.