Skip to content

Commit

Permalink
Configurable ender quarry RF storage (#446)
Browse files Browse the repository at this point in the history
Co-authored-by: Wilhelm Schuster <ws@rot13.io>
Co-authored-by: Martin Robertz <dream-master@gmx.net>
(cherry picked from commit e12c6d8)
  • Loading branch information
Midnight145 authored and Dream-Master committed Dec 10, 2024
1 parent 131ac95 commit 50c90fd
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@ public class TweaksConfig {
@Config.DefaultInt(64)
public static int ic2SeedMaxStackSize;

@Config.Comment("Ender Quarry RF Storage Override (ExU default value: 10000000) (0 to use default value)")
@Config.RangeInt(min = 0)
@Config.DefaultInt(0)
public static int extraUtilitiesEnderQuarryOverride;

// Minechem

@Config.Comment("Minechem Atropine High (Delirium) effect ID")
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/mitchej123/hodgepodge/mixins/Mixins.java
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,10 @@ public enum Mixins {
FIX_FILTER_DUPE(new Builder("Prevent hotkeying other items onto item filters while they are open")
.addMixinClasses("extrautilities.MixinContainerFilter").setPhase(Phase.LATE).setSide(Side.BOTH)
.setApplyIf(() -> FixesConfig.fixExtraUtilitiesFilterDupe).addTargetedMod(TargetedMod.EXTRA_UTILITIES)),
CONFIGURABLE_ENDERQUARRY_ENERGY(new Builder("Ender Quarry energy storage override")
.addMixinClasses("extrautilities.MixinTileEntityEnderQuarry").setPhase(Phase.LATE).setSide(Side.BOTH)
.setApplyIf(() -> TweaksConfig.extraUtilitiesEnderQuarryOverride > 0)
.addTargetedMod(TargetedMod.EXTRA_UTILITIES)),

// Gliby's Voice Chat
FIX_GLIBYS_VC_THREAD_SHUTDOWN_CLIENT(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.mitchej123.hodgepodge.mixins.late.extrautilities;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.ModifyArg;

import com.mitchej123.hodgepodge.config.TweaksConfig;
import com.rwtema.extrautils.tileentity.enderquarry.TileEntityEnderQuarry;

@Mixin(value = TileEntityEnderQuarry.class, remap = false)
public class MixinTileEntityEnderQuarry {

@ModifyArg(method = "<init>", at = @At(value = "INVOKE", target = "Lcofh/api/energy/EnergyStorage;<init>(I)V"))
private int mixinInit(int energyStored) {
return TweaksConfig.extraUtilitiesEnderQuarryOverride;
}
}

0 comments on commit 50c90fd

Please sign in to comment.