-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #307 from MCTian-mi/backpack
Mixin into traveler's backpack
- Loading branch information
Showing
4 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/main/java/supersymmetry/mixins/travelersbackpack/GuiTravelersBackpackMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
] | ||
} |