Skip to content

Commit

Permalink
Add support for 1.19.4
Browse files Browse the repository at this point in the history
Fixes #14
  • Loading branch information
kb-1000 committed Mar 21, 2023
1 parent def387c commit 5f2b7b8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ sourceSets {
dependencies {
// To change the versions, see the gradle.properties file
minecraft("com.mojang:minecraft:${minecraft_version}")
mappings("net.fabricmc:yarn:$minecraft_version+build.$yarn_mappings:v2")
mappings("net.fabricmc:yarn:$yarn_mappings:v2")
modImplementation("net.fabricmc:fabric-loader:${loader_version}")
compileOnly("net.minecraftforge:javafmllanguage:${forge_version}") {
isTransitive = false
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/versions.html
minecraft_version=23w04a
yarn_mappings=4
loader_version=0.14.13
minecraft_version=1.19.4
yarn_mappings=1.19.4+build.1
loader_version=0.14.17

# Forge
forge_version=1.19.3-44.1.8
forge_version=1.19.4-45.0.18

# Mod Properties
mod_version=1.6.0
mod_version=1.7.0
maven_group=de.kb1000
archives_base_name=no-telemetry
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,20 @@

@Mixin(targets = "net.minecraft.client.gui.screen.option.OptionsScreen")
public class OptionsScreenMixin {
@Group(name = "removeTelemetryButton", min = 1)
@Group(name = "removeTelemetryButton", min = 1, max = 1)
@Redirect(method = "init", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/widget/GridWidget$Adder;add(Lnet/minecraft/client/gui/widget/Widget;)Lnet/minecraft/client/gui/widget/Widget;", ordinal = 0), slice = @Slice(from = @At(value = "FIELD", target = "Lnet/minecraft/client/gui/screen/option/OptionsScreen;TELEMETRY_TEXT:Lnet/minecraft/text/Text;")))
private @Coerce Object removeTelemetryButton(@Coerce Object adder, @Coerce Object widget) {
return widget;
}

@Group(name = "removeTelemetryButton", min = 1, max = 1)
@Redirect(method = "init", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/layouts/GridLayout$RowHelper;m_264139_(Lnet/minecraft/client/gui/layouts/LayoutElement;)Lnet/minecraft/client/gui/layouts/LayoutElement;", ordinal = 0), slice = @Slice(from = @At(value = "FIELD", target = "Lnet/minecraft/client/gui/screen/option/OptionsScreen;TELEMETRY_TEXT:Lnet/minecraft/text/Text;")))
private @Coerce Object removeTelemetryButtonForge(@Coerce Object adder, @Coerce Object widget) {
return widget;
}

@Redirect(method = "init", at = @At(value = "INVOKE", target = "Lnet/minecraft/class_7845$class_7939;method_47612(Lnet/minecraft/class_339;)Lnet/minecraft/class_339;", ordinal = 0), slice = @Slice(from = @At(value = "FIELD", target = "Lnet/minecraft/client/gui/screen/option/OptionsScreen;TELEMETRY_TEXT:Lnet/minecraft/text/Text;")))
@Group(name = "removeTelemetryButton", min = 1)
@Group(name = "removeTelemetryButton", min = 1, max = 1)
private @Coerce Object removeTelemetryButtonOld(@Coerce Object adder, @Coerce Object widget) {
return widget;
}
Expand Down

0 comments on commit 5f2b7b8

Please sign in to comment.