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

Commit

Permalink
Magic Spreader
Browse files Browse the repository at this point in the history
  • Loading branch information
wohaopa committed Jun 8, 2024
1 parent bc7b7f5 commit 835ce65
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ dependencies {

implementation("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev")
implementation("com.github.GTNewHorizons:Botania:1.10.12-GTNH:dev")
implementation("com.github.GTNewHorizons:GTNEIOrePlugin:1.3.0:dev")
compileOnly("com.github.GTNewHorizons:GTNH-Intergalactic:1.3.4:dev")

compileOnly("com.github.GTNewHorizons:TecTech:5.3.45:dev")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public List<String> getMixins(Set<String> loadedMods) {
mixins.add("gtnhintergalactic.TileEntityModuleMinerMixin");
}
if (Mods.Botania.isLoaded()) {
// mixins.add("botania.BotaniaMixin");
mixins.add("botania.TileSpreaderMixin");
}

return mixins;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.github.wohaopa.GTNHModify.mixins.late.botania;

import org.objectweb.asm.Opcodes;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;

import com.github.wohaopa.GTNHModify.handler.ThaumcraftHandler;

import vazkii.botania.common.block.tile.mana.TileSpreader;

@Mixin(value = TileSpreader.class, remap = false)
public abstract class TileSpreaderMixin {

@Redirect(
method = "pingback",
at = @At(
value = "FIELD",
target = "Lvazkii/botania/common/block/tile/mana/TileSpreader;pingbackTicks:I",
opcode = Opcodes.PUTFIELD))
private void injectedPingback(TileSpreader tileSpreader, int pingbackTicks) {
tileSpreader.pingbackTicks = ThaumcraftHandler.handle(tileSpreader, pingbackTicks);
}
}

0 comments on commit 835ce65

Please sign in to comment.