-
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.
- Loading branch information
0 parents
commit 317b477
Showing
101 changed files
with
2,722 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.gradle/ | ||
**/.gradle/ | ||
build/ | ||
**/build/ | ||
**/run/ | ||
**.iml | ||
**.xml | ||
.name |
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 @@ | ||
plugins { | ||
id 'fabric-loom' version "${loom_version}" | ||
id 'legacy-looming' version "${loom_version}" | ||
} | ||
|
||
loom { | ||
setIntermediaryUrl('https://repo.legacyfabric.net/repository/legacyfabric/net/legacyfabric/intermediary/%1$s/intermediary-%1$s-v2.jar'); | ||
|
||
runConfigs.configureEach { | ||
ideConfigGenerated = true | ||
} | ||
} | ||
|
||
dependencies { | ||
minecraft "com.mojang:minecraft:1.13.2" | ||
mappings "net.legacyfabric:yarn:${project.yarn_1_13_2}:v2" | ||
modImplementation("net.fabricmc:fabric-loader:${project.loader_version}") | ||
runtimeOnly("net.fabricmc:dev-launch-injector:0.2.1+build.8") | ||
} |
20 changes: 20 additions & 0 deletions
20
1.13.2/src/main/java/dev/blucobalt/rbr/mixin/GameOptionsMixin.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 dev.blucobalt.rbr.mixin; | ||
|
||
import net.minecraft.client.option.GameOptions; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | ||
|
||
@Mixin(GameOptions.class) | ||
public class GameOptionsMixin { | ||
/** | ||
* don't let if blocks run | ||
*/ | ||
@Inject(method = "getIntVideoOptions", at = @At("RETURN"), cancellable = true) | ||
public void getIntVideoOptions(GameOptions.Option option, CallbackInfoReturnable<Boolean> cir) { | ||
if (option == GameOptions.Option.REALMS_NOTIFICATIONS) { | ||
cir.setReturnValue(false); | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
1.13.2/src/main/java/dev/blucobalt/rbr/mixin/SettingsScreenMixin.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,21 @@ | ||
package dev.blucobalt.rbr.mixin; | ||
|
||
import net.minecraft.client.gui.screen.SettingsScreen; | ||
import net.minecraft.client.gui.widget.ButtonWidget; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
|
||
import java.util.List; | ||
|
||
@Mixin(SettingsScreen.class) | ||
public class SettingsScreenMixin { | ||
/** | ||
* don't draw button/do nothing when it tries to add it | ||
*/ | ||
@Redirect(method = "init", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/SettingsScreen;addButton(Lnet/minecraft/client/gui/widget/ButtonWidget;)Lnet/minecraft/client/gui/widget/ButtonWidget;", ordinal = 4)) | ||
public ButtonWidget donothing(SettingsScreen instance, ButtonWidget buttonWidget) { | ||
// do nothing | ||
return null; | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
1.13.2/src/main/java/dev/blucobalt/rbr/mixin/TitleScreenMixin.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,30 @@ | ||
package dev.blucobalt.rbr.mixin; | ||
|
||
import net.minecraft.client.gui.screen.TitleScreen; | ||
import net.minecraft.client.gui.widget.ButtonWidget; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | ||
|
||
@Mixin(TitleScreen.class) | ||
public class TitleScreenMixin { | ||
|
||
/** | ||
* don't let if blocks run | ||
*/ | ||
@Inject(method = "areRealmsNotificationsEnabled", at = @At("RETURN"), cancellable = true) | ||
public void areRealmsNotificationsEnabled(CallbackInfoReturnable<Boolean> cir) { | ||
cir.setReturnValue(false); | ||
} | ||
|
||
/** | ||
* don't draw button/do nothing when it tries to add it | ||
*/ | ||
@Redirect(method = "initWidgetsNormal", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/TitleScreen;addButton(Lnet/minecraft/client/gui/widget/ButtonWidget;)Lnet/minecraft/client/gui/widget/ButtonWidget;", ordinal = 2)) | ||
public ButtonWidget donothing(TitleScreen instance, ButtonWidget buttonWidget) { | ||
// do nothing | ||
return null; | ||
} | ||
} |
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,24 @@ | ||
{ | ||
"schemaVersion": 1, | ||
"id": "realmfix", | ||
"version": "${version}", | ||
"name": "Realm Button Remover", | ||
"description": "Removes the realm button from the title screen.", | ||
"authors": [ | ||
"Me!" | ||
], | ||
"contact": { | ||
"homepage": "https://legacyfabric.net/", | ||
"sources": "https://github.com/Legacy-Fabric/fabric-example-mod" | ||
}, | ||
"license": "CC0-1.0", | ||
"icon": "assets/legacyrealmfix/icon.png", | ||
"environment": "client", | ||
"mixins": [ | ||
"legacyrealmfix.mixins.json" | ||
], | ||
"depends": { | ||
"fabricloader": ">=0.12.0", | ||
"minecraft": "1.13.2" | ||
} | ||
} |
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,14 @@ | ||
{ | ||
"required": true, | ||
"minVersion": "0.8", | ||
"package": "dev.blucobalt.rbr.mixin", | ||
"compatibilityLevel": "JAVA_8", | ||
"injectors": { | ||
"defaultRequire": 1 | ||
}, | ||
"client": [ | ||
"GameOptionsMixin", | ||
"SettingsScreenMixin", | ||
"TitleScreenMixin" | ||
] | ||
} |
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,16 @@ | ||
plugins { | ||
id 'fabric-loom' | ||
} | ||
|
||
loom { | ||
runConfigs.configureEach { | ||
ideConfigGenerated = true | ||
} | ||
} | ||
|
||
dependencies { | ||
minecraft "com.mojang:minecraft:1.15.2" | ||
mappings "net.fabricmc:yarn:${project.yarn_1_15_2}:v2" | ||
modImplementation("net.fabricmc:fabric-loader:${project.loader_version}") | ||
runtimeOnly("net.fabricmc:dev-launch-injector:0.2.1+build.8") | ||
} |
20 changes: 20 additions & 0 deletions
20
1.14.4/src/main/java/dev/blucobalt/rbr/mixin/SettingsScreenMixin.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 dev.blucobalt.rbr.mixin; | ||
|
||
import net.minecraft.client.gui.screen.SettingsScreen; | ||
import net.minecraft.client.gui.widget.AbstractButtonWidget; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
|
||
@Mixin(SettingsScreen.class) | ||
public class SettingsScreenMixin { | ||
/** | ||
* don't draw button/do nothing when it tries to add it | ||
*/ | ||
@Redirect(method = "init", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/SettingsScreen;addButton(Lnet/minecraft/client/gui/widget/AbstractButtonWidget;)Lnet/minecraft/client/gui/widget/AbstractButtonWidget;", ordinal = 3), | ||
expect = 0, require = 0) | ||
public AbstractButtonWidget donothing(SettingsScreen instance, AbstractButtonWidget abstractButtonWidget) { | ||
// do nothing | ||
return null; | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
1.14.4/src/main/java/dev/blucobalt/rbr/mixin/TitleScreenMixin.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,45 @@ | ||
package dev.blucobalt.rbr.mixin; | ||
|
||
import net.minecraft.client.gui.screen.TitleScreen; | ||
import net.minecraft.client.gui.widget.AbstractButtonWidget; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Pseudo; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | ||
|
||
@Pseudo | ||
@Mixin(TitleScreen.class) | ||
public class TitleScreenMixin { | ||
|
||
/** | ||
* don't let if blocks run | ||
* 1.14.4-1.15.2 | ||
*/ | ||
@Inject(method = "areRealmsNotificationsEnabled", at = @At("RETURN"), cancellable = true, | ||
expect = 0, require = 0) | ||
public void areRealmsNotificationsEnabled(CallbackInfoReturnable<Boolean> cir) { | ||
cir.setReturnValue(false); | ||
} | ||
|
||
/** | ||
* don't draw button/do nothing when it tries to add it | ||
*/ | ||
@Redirect(method = "initWidgetsNormal", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/TitleScreen;addButton(Lnet/minecraft/client/gui/widget/AbstractButtonWidget;)Lnet/minecraft/client/gui/widget/AbstractButtonWidget;", ordinal = 2), | ||
expect = 0, require = 0) | ||
public AbstractButtonWidget donothing(TitleScreen instance, AbstractButtonWidget abstractButtonWidget) { | ||
// do nothing | ||
return null; | ||
} | ||
|
||
/** | ||
* don't draw button/do nothing when it tries to add it | ||
*/ | ||
@Redirect(method = "initWidgetsNormal", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/TitleScreen;addButton(Lnet/minecraft/client/gui/widget/AbstractButtonWidget;)Lnet/minecraft/client/gui/widget/AbstractButtonWidget;", ordinal = 2), | ||
expect = 0, require = 0) | ||
public AbstractButtonWidget donothing1_15_2(TitleScreen instance, AbstractButtonWidget abstractButtonWidget) { | ||
// do nothing | ||
return null; | ||
} | ||
} |
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,24 @@ | ||
{ | ||
"schemaVersion": 1, | ||
"id": "realmfix", | ||
"version": "${version}", | ||
"name": "Realm Button Remover", | ||
"description": "Removes the realm button from the title screen.", | ||
"authors": [ | ||
"Me!" | ||
], | ||
"contact": { | ||
"homepage": "https://legacyfabric.net/", | ||
"sources": "https://github.com/Legacy-Fabric/fabric-example-mod" | ||
}, | ||
"license": "CC0-1.0", | ||
"icon": "assets/legacyrealmfix/icon.png", | ||
"environment": "client", | ||
"mixins": [ | ||
"legacyrealmfix.mixins.json" | ||
], | ||
"depends": { | ||
"fabricloader": ">=0.12.0", | ||
"minecraft": ">=1.14.4" | ||
} | ||
} |
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,13 @@ | ||
{ | ||
"required": true, | ||
"minVersion": "0.8", | ||
"package": "dev.blucobalt.rbr.mixin", | ||
"compatibilityLevel": "JAVA_8", | ||
"injectors": { | ||
"defaultRequire": 1 | ||
}, | ||
"client": [ | ||
"SettingsScreenMixin", | ||
"TitleScreenMixin" | ||
] | ||
} |
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,15 @@ | ||
plugins { | ||
id 'fabric-loom' | ||
} | ||
|
||
loom { | ||
runConfigs.configureEach { | ||
ideConfigGenerated = true | ||
} | ||
} | ||
|
||
dependencies { | ||
minecraft "com.mojang:minecraft:1.16.5" | ||
mappings "net.fabricmc:yarn:${project.yarn_1_16_5}:v2" | ||
modImplementation("net.fabricmc:fabric-loader:${project.loader_version}") | ||
} |
36 changes: 36 additions & 0 deletions
36
1.16.5/src/main/java/dev/blucobalt/rbr/mixin/OptionsScreenMixin.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,36 @@ | ||
package dev.blucobalt.rbr.mixin; | ||
|
||
import net.minecraft.client.gui.Element; | ||
import net.minecraft.client.gui.screen.option.OptionsScreen; | ||
import net.minecraft.client.gui.widget.ClickableWidget; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Pseudo; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
|
||
@Pseudo | ||
@Mixin(OptionsScreen.class) | ||
public class OptionsScreenMixin { | ||
/** | ||
* don't draw button/do nothing when it tries to add it | ||
* 1.16.5 | ||
*/ | ||
@Redirect(method = "init", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/option/OptionsScreen;addButton(Lnet/minecraft/client/gui/widget/ClickableWidget;)Lnet/minecraft/client/gui/widget/ClickableWidget;", ordinal = 3), | ||
expect = 0, require = 0) | ||
public ClickableWidget donothing(OptionsScreen instance, ClickableWidget clickableWidget) { | ||
return null; | ||
} | ||
|
||
/** | ||
* don't draw button/do nothing when it tries to add it | ||
* 1.17.1-1.18.2 | ||
*/ | ||
@Redirect(method = "init", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/option/OptionsScreen;addDrawableChild(Lnet/minecraft/client/gui/Element;)Lnet/minecraft/client/gui/Element;", ordinal = 3), | ||
expect = 0, require = 0) | ||
public Element donothing(OptionsScreen instance, Element element) { | ||
return null; | ||
} | ||
} | ||
|
||
|
||
|
50 changes: 50 additions & 0 deletions
50
1.16.5/src/main/java/dev/blucobalt/rbr/mixin/TitleScreenMixin.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,50 @@ | ||
package dev.blucobalt.rbr.mixin; | ||
|
||
import net.minecraft.client.gui.Element; | ||
import net.minecraft.client.gui.screen.TitleScreen; | ||
import net.minecraft.client.gui.widget.ButtonWidget; | ||
import net.minecraft.client.gui.widget.ClickableWidget; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Pseudo; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | ||
|
||
@Pseudo | ||
@Mixin(TitleScreen.class) | ||
public class TitleScreenMixin { | ||
|
||
/** | ||
* don't let if blocks run | ||
* 1.16.5-1.18.2 | ||
*/ | ||
@Inject(method = "areRealmsNotificationsEnabled", at = @At("RETURN"), cancellable = true, | ||
expect = 0, require = 0) | ||
public void areRealmsNotificationsEnabled(CallbackInfoReturnable<Boolean> cir) { | ||
cir.setReturnValue(false); | ||
} | ||
|
||
/** | ||
* it will npe if it's null so just set it invisible | ||
* 1.16.5- | ||
*/ | ||
@Redirect(method = "initWidgetsNormal", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/TitleScreen;addButton(Lnet/minecraft/client/gui/widget/ClickableWidget;)Lnet/minecraft/client/gui/widget/ClickableWidget;", ordinal = 2), | ||
expect = 0, require = 0) | ||
public ClickableWidget donothing(TitleScreen instance, ClickableWidget clickableWidget) { | ||
clickableWidget.visible = false; | ||
return clickableWidget; | ||
} | ||
|
||
/** | ||
* it will npe if it's null so just set it invisible | ||
* 1.17.1-1.18.2 | ||
*/ | ||
@Redirect(method = "initWidgetsNormal", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/TitleScreen;addDrawableChild(Lnet/minecraft/client/gui/Element;)Lnet/minecraft/client/gui/Element;", ordinal = 2), | ||
expect = 0, require = 0) | ||
public Element donothing(TitleScreen instance, Element element) { | ||
ButtonWidget widget = (ButtonWidget) element; | ||
widget.visible = false; | ||
return widget; | ||
} | ||
} |
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,24 @@ | ||
{ | ||
"schemaVersion": 1, | ||
"id": "realmfix", | ||
"version": "${version}", | ||
"name": "Realm Button Remover", | ||
"description": "Removes the realm button from the title screen.", | ||
"authors": [ | ||
"Me!" | ||
], | ||
"contact": { | ||
"homepage": "https://legacyfabric.net/", | ||
"sources": "https://github.com/Legacy-Fabric/fabric-example-mod" | ||
}, | ||
"license": "CC0-1.0", | ||
"icon": "assets/legacyrealmfix/icon.png", | ||
"environment": "client", | ||
"mixins": [ | ||
"legacyrealmfix.mixins.json" | ||
], | ||
"depends": { | ||
"fabricloader": ">=0.12.0", | ||
"minecraft": ">=1.16.5" | ||
} | ||
} |
Oops, something went wrong.