Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

Commit

Permalink
Fix issues registering Collecting hatch recipes when HT was enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
htmlcsjs committed Mar 17, 2023
1 parent 635da9e commit 0f68c45
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 18 deletions.
2 changes: 0 additions & 2 deletions src/main/java/net/htmlcsjs/htmlTech/HtmlTech.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ public void preInit(FMLPreInitializationEvent event) {
public void init(FMLInitializationEvent event) {
proxy.init();

GTValues.HT = true;

if (Loader.isModLoaded(HTValues.MODID_TOP)) {
logger.info("TheOneProbe found. Enabling integration...");
HTTOPCompatibility.registerCompatibility();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public static void register() {
Trinium.addFlags(GENERATE_FRAME);
Titanium.addFlags(GENERATE_FOIL);
Darmstadtium.addFlags(GENERATE_FOIL);
Neutronium.addFlags(GENERATE_FOIL);
UraniumRhodiumDinaquadide.addFlags(GENERATE_SPRING);

}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package net.htmlcsjs.htmlTech.loaders.recipe;

import gregtech.api.items.metaitem.MetaItem;
import gregtech.api.recipes.ingredients.IntCircuitIngredient;
import gregtech.api.unification.material.MarkerMaterials;
import gregtech.api.unification.stack.UnificationEntry;
import gregtech.common.blocks.BlockMetalCasing;
import gregtech.loaders.recipe.CraftingComponent;
import net.htmlcsjs.htmlTech.HtmlTech;
import net.htmlcsjs.htmlTech.common.HTConfig;
import net.htmlcsjs.htmlTech.common.blocks.BlockHTCasing;
import net.minecraft.item.ItemStack;
Expand Down Expand Up @@ -51,19 +53,33 @@ public static void init() {

// Laser Collecting hatches
for (int i = HTConfig.lasers.minLaserTier; i < mteLength; i++) {
ASSEMBLY_LINE_RECIPES.recipeBuilder()
.input(HULL[i])
.input(lens, Glass)
.inputs((ItemStack) CraftingComponent.SENSOR.getIngredient(i))
.inputs((ItemStack) CraftingComponent.VOLTAGE_COIL.getIngredient(i))
.input(wireGtQuadruple, ((UnificationEntry) CraftingComponent.CABLE_QUAD.getIngredient(i)).material, 4)
.input(foil, ((UnificationEntry) CraftingComponent.PLATE.getIngredient(i)).material, 4)
.input(circuit, ((UnificationEntry) CraftingComponent.CIRCUIT.getIngredient(i)).material)
.fluidInputs(SodiumPotassium.getFluid(1000))
.output(LASER_INPUT_HATCHES[i])
.EUt(VA[i])
.duration(100)
.buildAndRegister();
ItemStack coil;
if (CraftingComponent.VOLTAGE_COIL.getIngredient(i) instanceof ItemStack) {
coil = (ItemStack) CraftingComponent.VOLTAGE_COIL.getIngredient(i);
} else if (CraftingComponent.VOLTAGE_COIL.getIngredient(i) instanceof MetaItem.MetaValueItem) {
coil = ((MetaItem<?>.MetaValueItem) CraftingComponent.VOLTAGE_COIL.getIngredient(i)).getStackForm();
} else {
HtmlTech.logger.warn(String.format("Cannot add recipe for %s hatch", VN[i]));
continue;
}
try {
Object sensor = !HT && i == UHV ? CraftingComponent.SENSOR.getIngredient(i - 1) : CraftingComponent.SENSOR.getIngredient(i);
ASSEMBLY_LINE_RECIPES.recipeBuilder()
.input(HULL[i])
.input(lens, Glass)
.inputs((ItemStack) sensor)
.inputs(coil)
.input(wireGtQuadruple, ((UnificationEntry) CraftingComponent.CABLE_QUAD.getIngredient(i)).material, 4)
.input(foil, ((UnificationEntry) CraftingComponent.PLATE.getIngredient(i)).material, 4)
.input(circuit, ((UnificationEntry) CraftingComponent.CIRCUIT.getIngredient(i)).material)
.fluidInputs(SodiumPotassium.getFluid(1000))
.output(LASER_INPUT_HATCHES[i])
.EUt(VA[i])
.duration(100)
.buildAndRegister();
} catch (NullPointerException ignored) {
HtmlTech.logger.warn(String.format("Cannot add recipe for %s hatch", VN[i]));
}
}

// Laser Emitter hatch
Expand Down Expand Up @@ -91,7 +107,7 @@ public static void init() {
.input(circuit, MarkerMaterials.Tier.ZPM)
.input(circuit, MarkerMaterials.Tier.ZPM)
.fluidInputs(SodiumPotassium.getFluid(1000))
.fluidInputs(SolderingAlloy.getFluid(L*7))
.fluidInputs(SolderingAlloy.getFluid(L * 7))
.output(LASER_PROJECTOR)
//.reserchItem(LASER_OUTPUT_HATCH)
.EUt(VA[ZPM])
Expand All @@ -110,7 +126,7 @@ public static void init() {
.input(circuit, MarkerMaterials.Tier.ZPM)
.input(circuit, MarkerMaterials.Tier.ZPM)
.fluidInputs(SodiumPotassium.getFluid(1000))
.fluidInputs(SolderingAlloy.getFluid(L*7))
.fluidInputs(SolderingAlloy.getFluid(L * 7))
.output(LASER_COLLECTOR)
//.reserchItem(LASER_INPUT_HATCHES[LuV])
.EUt(VA[ZPM])
Expand All @@ -121,7 +137,7 @@ public static void init() {
ASSEMBLER_RECIPES.recipeBuilder()
.input(GLASS_TUBE)
.input(lens, Glass)
.fluidInputs(Silver.getFluid(4*L))
.fluidInputs(Silver.getFluid(4 * L))
.output(EMPTY_LASER)
.EUt(VA[EV])
.duration(20)
Expand Down

0 comments on commit 0f68c45

Please sign in to comment.