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

Commit 9888965

Browse files
committed
add config for laser hatch starting tier
1 parent 047b7d0 commit 9888965

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package net.htmlcsjs.htmlTech.common;
2+
3+
import net.htmlcsjs.htmlTech.api.HTValues;
4+
import net.minecraftforge.common.config.Config;
5+
6+
@Config(modid = HTValues.MODID)
7+
public class HTConfig {
8+
@Config.Comment("Config for Laser Equipment")
9+
@Config.Name("Laser Options")
10+
@Config.RequiresMcRestart
11+
public static LaserOptions lasers = new LaserOptions();
12+
13+
public static class LaserOptions {
14+
@Config.Comment({"Minimum tier of laser collectors.", "Default: 6 [IV]"})
15+
public int minLaserTier = 6;
16+
}
17+
}

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import gregtech.common.metatileentities.MetaTileEntities;
55
import net.htmlcsjs.htmlTech.HtmlTech;
66
import net.htmlcsjs.htmlTech.api.HTValues;
7+
import net.htmlcsjs.htmlTech.common.HTConfig;
78
import net.htmlcsjs.htmlTech.common.metatileentity.multiblock.MetaTileEntityLaserCollector;
89
import net.htmlcsjs.htmlTech.common.metatileentity.multiblock.MetaTileEntityLaserProjector;
910
import net.htmlcsjs.htmlTech.common.metatileentity.multiblock.multiblockpart.MetaTileEntityLaserHatch;
@@ -26,7 +27,9 @@ public static void init() {
2627

2728
LASER_PROJECTOR = MetaTileEntities.registerMetaTileEntity(9000, new MetaTileEntityLaserProjector(location("laser_projector")));
2829
LASER_OUTPUT_HATCH = MetaTileEntities.registerMetaTileEntity(9001, new MetaTileEntityLaserHatch(location("laser_output_hatch"), 7, true));
29-
for (int i = 0; i < 15; i++) {
30+
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++) {
3033
LASER_INPUT_HATCHES[i] = new MetaTileEntityLaserHatch(location("laser_input_hatch." + GTValues.VN[i].toLowerCase()), i, false);
3134
MetaTileEntities.registerMetaTileEntity(9002 + i, LASER_INPUT_HATCHES[i]);
3235
}

0 commit comments

Comments
 (0)