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

Commit 2c8df25

Browse files
committed
Add recipe for laser collecting hatches and reorganise materials
1 parent 9888965 commit 2c8df25

File tree

11 files changed

+42
-14
lines changed

11 files changed

+42
-14
lines changed

src/main/java/net/htmlcsjs/htmlTech/api/HTValues.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package net.htmlcsjs.htmlTech.api;
22

3+
import gregtech.api.GTValues;
4+
35
public class HTValues {
46

57
/**
@@ -19,4 +21,9 @@ public class HTValues {
1921
* SHOULD ALWAYS BE "@VERSION@" IN REPO
2022
*/
2123
public static final String VERSION = "@VERSION@";
24+
25+
/**
26+
* Length of MTE arrys depending on if GTValues.HT is set
27+
*/
28+
public static final int mteLength = GTValues.HT ? GTValues.V.length - 1 : Math.min(GTValues.V.length - 1, GTValues.UV + 1);
2229
}

src/main/java/net/htmlcsjs/htmlTech/api/materials/HTMaterials.java renamed to src/main/java/net/htmlcsjs/htmlTech/api/unification/materials/HTMaterials.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package net.htmlcsjs.htmlTech.api.materials;
1+
package net.htmlcsjs.htmlTech.api.unification.materials;
22

33
import gregtech.api.GTValues;
44
import gregtech.api.unification.material.Material;
@@ -44,6 +44,8 @@ public static void register() {
4444
Flerovium.setHidden(false);
4545
RhodiumPlatedPalladium.addFlags(GENERATE_FOIL);
4646
Trinium.addFlags(GENERATE_FRAME);
47+
Titanium.addFlags(GENERATE_FOIL);
48+
Darmstadtium.addFlags(GENERATE_FOIL);
4749
}
4850

4951
public static void init() {

src/main/java/net/htmlcsjs/htmlTech/api/materials/HTOrePrefix.java renamed to src/main/java/net/htmlcsjs/htmlTech/api/unification/materials/HTOrePrefix.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package net.htmlcsjs.htmlTech.api.materials;
1+
package net.htmlcsjs.htmlTech.api.unification.materials;
22

33
import gregtech.api.GTValues;
44
import gregtech.api.unification.material.info.MaterialIconType;
@@ -11,7 +11,7 @@
1111
import java.util.List;
1212

1313
import static gregtech.api.unification.ore.OrePrefix.Flags.ENABLE_UNIFICATION;
14-
import static net.htmlcsjs.htmlTech.api.materials.HTMaterials.LASER;
14+
import static net.htmlcsjs.htmlTech.api.unification.materials.HTMaterials.LASER;
1515

1616
public class HTOrePrefix {
1717
public static MaterialIconType laserIcon;

src/main/java/net/htmlcsjs/htmlTech/api/materials/LaserProperties.java renamed to src/main/java/net/htmlcsjs/htmlTech/api/unification/materials/LaserProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package net.htmlcsjs.htmlTech.api.materials;
1+
package net.htmlcsjs.htmlTech.api.unification.materials;
22

33
import gregtech.api.unification.material.properties.IMaterialProperty;
44
import gregtech.api.unification.material.properties.MaterialProperties;

src/main/java/net/htmlcsjs/htmlTech/common/HTConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class HTConfig {
1111
public static LaserOptions lasers = new LaserOptions();
1212

1313
public static class LaserOptions {
14-
@Config.Comment({"Minimum tier of laser collectors.", "Default: 6 [IV]"})
15-
public int minLaserTier = 6;
14+
@Config.Comment({"Minimum tier of laser collectors.", "Default: 5 [IV]"})
15+
public int minLaserTier = 5;
1616
}
1717
}

src/main/java/net/htmlcsjs/htmlTech/common/item/behaviors/LaserInspectorToolBehaviour.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
import java.awt.*;
2727

28-
import static net.htmlcsjs.htmlTech.api.materials.HTMaterials.LASER;
28+
import static net.htmlcsjs.htmlTech.api.unification.materials.HTMaterials.LASER;
2929

3030
public class LaserInspectorToolBehaviour implements IItemBehaviour, ItemUIFactory {
3131

src/main/java/net/htmlcsjs/htmlTech/common/metatileentity/HTMetaTileEntities.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ public class HTMetaTileEntities {
1717
public static final MetaTileEntityLaserHatch[] LASER_INPUT_HATCHES = new MetaTileEntityLaserHatch[GTValues.V.length];
1818
public static MetaTileEntityLaserCollector LASER_COLLECTOR;
1919

20-
2120
/**
2221
* Inits MTEs for htmlTech
2322
* avaible ids: 9000-9499
@@ -28,8 +27,7 @@ public static void init() {
2827
LASER_PROJECTOR = MetaTileEntities.registerMetaTileEntity(9000, new MetaTileEntityLaserProjector(location("laser_projector")));
2928
LASER_OUTPUT_HATCH = MetaTileEntities.registerMetaTileEntity(9001, new MetaTileEntityLaserHatch(location("laser_output_hatch"), 7, true));
3029

31-
int endPos = GTValues.HT ? LASER_INPUT_HATCHES.length - 1 : Math.min(LASER_INPUT_HATCHES.length - 1, GTValues.UHV + 1);
32-
for (int i = HTConfig.lasers.minLaserTier; i < endPos; i++) {
30+
for (int i = HTConfig.lasers.minLaserTier; i < HTValues.mteLength; i++) {
3331
LASER_INPUT_HATCHES[i] = new MetaTileEntityLaserHatch(location("laser_input_hatch." + GTValues.VN[i].toLowerCase()), i, false);
3432
MetaTileEntities.registerMetaTileEntity(9002 + i, LASER_INPUT_HATCHES[i]);
3533
}

src/main/java/net/htmlcsjs/htmlTech/common/metatileentity/multiblock/multiblockpart/MetaTileEntityLaserHatch.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import javax.annotation.Nullable;
3333
import java.util.List;
3434

35-
import static net.htmlcsjs.htmlTech.api.materials.HTMaterials.LASER;
35+
import static net.htmlcsjs.htmlTech.api.unification.materials.HTMaterials.LASER;
3636

3737
public class MetaTileEntityLaserHatch extends MetaTileEntityMultiblockPart implements IMultiblockAbilityPart<ILaserContainer> {
3838
private final ItemStackHandler laserInventory;

src/main/java/net/htmlcsjs/htmlTech/loaders/recipe/LaserEquipmentLoader.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
package net.htmlcsjs.htmlTech.loaders.recipe;
22

33
import gregtech.api.recipes.ingredients.IntCircuitIngredient;
4+
import gregtech.api.unification.stack.UnificationEntry;
5+
import gregtech.loaders.recipe.CraftingComponent;
6+
import net.htmlcsjs.htmlTech.common.HTConfig;
47
import net.htmlcsjs.htmlTech.common.blocks.BlockHTCasing;
8+
import net.minecraft.item.ItemStack;
59

610
import static gregtech.api.GTValues.*;
711
import static gregtech.api.recipes.RecipeMaps.ASSEMBLER_RECIPES;
812
import static gregtech.api.unification.material.Materials.*;
913
import static gregtech.api.unification.ore.OrePrefix.*;
14+
import static gregtech.common.metatileentities.MetaTileEntities.HULL;
15+
import static net.htmlcsjs.htmlTech.api.HTValues.mteLength;
1016
import static net.htmlcsjs.htmlTech.common.blocks.HTMetaBlocks.HT_CASING;
1117
import static net.htmlcsjs.htmlTech.common.blocks.HTMetaBlocks.LASER_PIPES;
18+
import static net.htmlcsjs.htmlTech.common.metatileentity.HTMetaTileEntities.LASER_INPUT_HATCHES;
1219

1320
public class LaserEquipmentLoader {
1421

@@ -32,5 +39,19 @@ public static void init() {
3239
.duration(50)
3340
.buildAndRegister();
3441

42+
for (int i = HTConfig.lasers.minLaserTier; i < mteLength; i++) {
43+
ASSEMBLER_RECIPES.recipeBuilder()
44+
.input(HULL[i])
45+
.input(lens, Glass)
46+
.inputs((ItemStack) CraftingComponent.SENSOR.getIngredient(i))
47+
.input(wireGtQuadruple, ((UnificationEntry) CraftingComponent.CABLE_QUAD.getIngredient(i)).material, 4)
48+
.input(foil, ((UnificationEntry) CraftingComponent.PLATE.getIngredient(i)).material, 4)
49+
.input(circuit, ((UnificationEntry) CraftingComponent.CIRCUIT.getIngredient(i)).material)
50+
.output(LASER_INPUT_HATCHES[i])
51+
.EUt((int) V[i-1]/2)
52+
.duration(100)
53+
.buildAndRegister();
54+
}
55+
3556
}
3657
}

src/main/java/net/htmlcsjs/htmlTech/loaders/recipe/MaterialLoader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import static gregtech.api.recipes.RecipeMaps.MIXER_RECIPES;
44
import static gregtech.api.unification.material.Materials.*;
55
import static gregtech.api.unification.ore.OrePrefix.dust;
6-
import static net.htmlcsjs.htmlTech.api.materials.HTMaterials.FlOPPa;
6+
import static net.htmlcsjs.htmlTech.api.unification.materials.HTMaterials.FlOPPa;
77

88
public class MaterialLoader {
99
public static void init() {

0 commit comments

Comments
 (0)