generated from calmilamsy/BIN-fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial release! Unhides the quit button.
- Loading branch information
Showing
8 changed files
with
34 additions
and
57 deletions.
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
20 changes: 20 additions & 0 deletions
20
src/main/java/me/chexo3/quitbutton/mixin/MinecraftAppletMixin.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,20 @@ | ||
package me.chexo3.quitbutton.mixin; | ||
|
||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.client.MinecraftApplet; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
|
||
@Mixin (MinecraftApplet.class) | ||
public class MinecraftAppletMixin { | ||
|
||
@Shadow private Minecraft minecraft; | ||
|
||
@Inject(method= "init()V", at=@At("TAIL"), remap = false) | ||
private void enableQuitButton(CallbackInfo ci) { | ||
minecraft.isApplet = false; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
src/main/java/net/glasslauncher/example/mixin/ExampleMixin.java
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
10 changes: 3 additions & 7 deletions
10
src/main/resources/modid.mixins.json → src/main/resources/quitbutton.mixins.json
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 |
---|---|---|
@@ -1,16 +1,12 @@ | ||
{ | ||
"required": true, | ||
"minVersion": "0.8", | ||
"package": "net.glasslauncher.example.mixin", | ||
"package": "me.chexo3.quitbutton.mixin", | ||
"compatibilityLevel": "JAVA_8", | ||
"mixins": [ | ||
"ExampleMixin" | ||
], | ||
"server": [ | ||
], | ||
"client": [ | ||
"MinecraftAppletMixin" | ||
], | ||
"injectors": { | ||
"defaultRequire": 1 | ||
} | ||
} | ||
} |