Skip to content
This repository has been archived by the owner on Sep 7, 2024. It is now read-only.

Commit

Permalink
Fix A bug where Space Module Miner does not output
Browse files Browse the repository at this point in the history
  • Loading branch information
wohaopa committed May 26, 2024
1 parent 1414c81 commit 0c40830
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public List<String> getMixins(Set<String> loadedMods) {
ModHelper.hasGregtech = true;
} else if (modId.equals("Thaumcraft")) {
ModHelper.hasThaumcraft = true;
} else if (modId.equals("gtnhintergalactic")) {
ModHelper.hasGtnhIntergalactic = true;
}
}

Expand All @@ -38,6 +40,9 @@ public List<String> getMixins(Set<String> loadedMods) {
if (ModHelper.hasThaumcraft) {
mixins.add("thaumcraft.TileAlchemyFurnaceMixin");
}
if (ModHelper.hasGtnhIntergalactic) {
mixins.add("gtnhintergalactic.TileEntityModuleMinerMixin");
}

return mixins;
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/github/wohaopa/GTNHModify/ModHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ public class ModHelper {

public static boolean hasGregtech;
public static boolean hasThaumcraft;
public static boolean hasGtnhIntergalactic;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.github.wohaopa.GTNHModify.mixins.late.gtnhintergalactic;

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

import com.gtnewhorizons.gtnhintergalactic.tile.multi.elevatormodules.TileEntityModuleMiner;
import com.llamalad7.mixinextras.injector.ModifyReturnValue;

@Mixin(value = TileEntityModuleMiner.class, remap = false)
public abstract class TileEntityModuleMinerMixin {

@ModifyReturnValue(method = "getRecipeTime", at = @At("RETURN"))
private int fixZeroRecipeTimeBug(int original) {
return Math.max(original, 1);
}
}

0 comments on commit 0c40830

Please sign in to comment.