Skip to content

Commit

Permalink
Merge pull request #307 from MCTian-mi/backpack
Browse files Browse the repository at this point in the history
Mixin into traveler's backpack
  • Loading branch information
bruberu authored Sep 17, 2024
2 parents f82d586 + ad24013 commit 939b73c
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
1 change: 1 addition & 0 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ dependencies {
compileOnly rfg.deobf("curse.maven:redstone-flux-270789:2920436")
compileOnly rfg.deobf("curse.maven:tesla-244651:2487959")
compileOnly rfg.deobf("curse.maven:hwyla-253449:2568751")
compileOnly rfg.deobf("curse.maven:travelers-backpack-321117:3150850")

compileOnly rfg.deobf("curse.maven:barrels-drums-storage-more-319404:2708193")
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

public class SuSyLateMixinLoader implements ILateMixinLoader {

public static final List<String> modMixins = ImmutableList.of("bdsandm", "gregtech", "mcjtylib_ng", "xnet");
public static final List<String> modMixins = ImmutableList.of("bdsandm", "gregtech", "mcjtylib_ng", "xnet", "travelersbackpack");

@Override
public List<String> getMixinConfigs() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package supersymmetry.mixins.travelersbackpack;

import com.tiviacz.travelersbackpack.gui.GuiTravelersBackpack;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;

@Mixin(value = GuiTravelersBackpack.class)
public class GuiTravelersBackpackMixin {

@Redirect(method = "mouseClicked",
at = @At(value = "INVOKE",
target = "Lnet/minecraftforge/fml/common/network/simpleimpl/SimpleNetworkWrapper;sendToServer(Lnet/minecraftforge/fml/common/network/simpleimpl/IMessage;)V",
remap = false,
ordinal = 0))
protected void noBedsForYa(SimpleNetworkWrapper instance, IMessage nope) {}
}
10 changes: 10 additions & 0 deletions src/main/resources/mixins.susy.travelersbackpack.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"package": "supersymmetry.mixins.travelersbackpack",
"refmap": "mixins.susy.refmap.json",
"target": "@env(DEFAULT)",
"minVersion": "0.8",
"compatibilityLevel": "JAVA_8",
"client": [
"GuiTravelersBackpackMixin"
]
}

0 comments on commit 939b73c

Please sign in to comment.