Skip to content

Commit

Permalink
Configurable Electric Singleblock miner speed (#2785)
Browse files Browse the repository at this point in the history
  • Loading branch information
eve336 authored Jan 28, 2025
1 parent 85336be commit e305c6c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,8 @@ public class GTMachines {
LV, MV, HV, EV);

public static final MachineDefinition[] MINER = registerTieredMachines("miner",
(holder, tier) -> new MinerMachine(holder, tier, 320 / (tier * 2), tier * 8, tier),
(holder, tier) -> new MinerMachine(holder, tier, ConfigHolder.INSTANCE.machines.minerSpeed / (tier * 2),
tier * 8, tier),
(tier, builder) -> builder
.rotationState(RotationState.ALL)
.langValue("%s Miner %s".formatted(VLVH[tier], VLVT[tier]))
Expand All @@ -406,7 +407,7 @@ public class GTMachines {
.tooltipBuilder((stack, tooltip) -> {
int maxArea = IMiner.getWorkingArea(tier * 8);
long energyPerTick = GTValues.V[tier - 1];
int tickSpeed = 320 / (tier * 2);
int tickSpeed = ConfigHolder.INSTANCE.machines.minerSpeed / (tier * 2);
tooltip.add(Component.translatable("gtceu.machine.miner.tooltip", maxArea, maxArea));
tooltip.add(Component.translatable("gtceu.universal.tooltip.uses_per_tick", energyPerTick)
.append(Component.literal(", ").withStyle(ChatFormatting.GRAY))
Expand Down
7 changes: 6 additions & 1 deletion src/main/java/com/gregtechceu/gtceu/config/ConfigHolder.java
Original file line number Diff line number Diff line change
Expand Up @@ -488,13 +488,18 @@ public static class MachineConfigs {
@Configurable.Comment({ "Whether the machine's circuit slot need to be inserted a real circuit." })
public boolean ghostCircuit = true;
@Configurable
@Configurable.Comment({ "Wether to add a \"Bedrock Ore Miner\" (also enables bedrock ore generation)",
@Configurable.Comment({ "Whether to add a \"Bedrock Ore Miner\" (also enables bedrock ore generation)",
"Default: false" })
public boolean doBedrockOres = false;
@Configurable
@Configurable.Comment({ "What Kind of material should the bedrock ore miner output?", "Default: \"raw\"" })
public String bedrockOreDropTagPrefix = "raw";
@Configurable
@Configurable.Range(min = 120, max = 800)
@Configurable.Comment({ "The base amount of ticks per block for electric singleblock ore miners",
"Default: 320" })
public int minerSpeed = 320;
@Configurable
@Configurable.Comment({ "Makes nearly every GCYM Multiblock require blocks which set their maximum voltages.",
"Default: false" })
public boolean enableTieredCasings = false;
Expand Down

0 comments on commit e305c6c

Please sign in to comment.