From b07c9e33ca74410ac0d365d4c09f4fc5d6967be2 Mon Sep 17 00:00:00 2001 From: Yao Chung Hu <30311066+FlashyReese@users.noreply.github.com> Date: Thu, 8 Jun 2023 00:54:38 +0800 Subject: [PATCH 1/2] change: Fix toast notifications mixins injection some how I didn't catch this and the toolchain just let me compile it and use it. --- .../mods/sodiumextra/mixin/toasts/MixinAdvancementToast.java | 4 ++-- .../mods/sodiumextra/mixin/toasts/MixinRecipeToast.java | 4 ++-- .../mods/sodiumextra/mixin/toasts/MixinSystemToast.java | 4 ++-- .../mods/sodiumextra/mixin/toasts/MixinTutorialToast.java | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/me/flashyreese/mods/sodiumextra/mixin/toasts/MixinAdvancementToast.java b/src/main/java/me/flashyreese/mods/sodiumextra/mixin/toasts/MixinAdvancementToast.java index 5e4faefe..f4503f46 100644 --- a/src/main/java/me/flashyreese/mods/sodiumextra/mixin/toasts/MixinAdvancementToast.java +++ b/src/main/java/me/flashyreese/mods/sodiumextra/mixin/toasts/MixinAdvancementToast.java @@ -1,10 +1,10 @@ package me.flashyreese.mods.sodiumextra.mixin.toasts; import me.flashyreese.mods.sodiumextra.client.SodiumExtraClientMod; +import net.minecraft.client.gui.DrawContext; import net.minecraft.client.toast.AdvancementToast; import net.minecraft.client.toast.Toast; import net.minecraft.client.toast.ToastManager; -import net.minecraft.client.util.math.MatrixStack; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; @@ -13,7 +13,7 @@ @Mixin(AdvancementToast.class) public class MixinAdvancementToast { @Inject(method = "draw", at = @At("HEAD"), cancellable = true) - public void draw(MatrixStack matrices, ToastManager manager, long startTime, CallbackInfoReturnable cir) { + public void draw(DrawContext context, ToastManager manager, long startTime, CallbackInfoReturnable cir) { if (!SodiumExtraClientMod.options().extraSettings.advancementToast) { cir.setReturnValue(Toast.Visibility.HIDE); } diff --git a/src/main/java/me/flashyreese/mods/sodiumextra/mixin/toasts/MixinRecipeToast.java b/src/main/java/me/flashyreese/mods/sodiumextra/mixin/toasts/MixinRecipeToast.java index 21046044..b025b92d 100644 --- a/src/main/java/me/flashyreese/mods/sodiumextra/mixin/toasts/MixinRecipeToast.java +++ b/src/main/java/me/flashyreese/mods/sodiumextra/mixin/toasts/MixinRecipeToast.java @@ -1,10 +1,10 @@ package me.flashyreese.mods.sodiumextra.mixin.toasts; import me.flashyreese.mods.sodiumextra.client.SodiumExtraClientMod; +import net.minecraft.client.gui.DrawContext; import net.minecraft.client.toast.RecipeToast; import net.minecraft.client.toast.Toast; import net.minecraft.client.toast.ToastManager; -import net.minecraft.client.util.math.MatrixStack; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; @@ -13,7 +13,7 @@ @Mixin(RecipeToast.class) public class MixinRecipeToast { @Inject(method = "draw", at = @At("HEAD"), cancellable = true) - public void draw(MatrixStack matrices, ToastManager manager, long startTime, CallbackInfoReturnable cir) { + public void draw(DrawContext context, ToastManager manager, long startTime, CallbackInfoReturnable cir) { if (!SodiumExtraClientMod.options().extraSettings.recipeToast) { cir.setReturnValue(Toast.Visibility.HIDE); } diff --git a/src/main/java/me/flashyreese/mods/sodiumextra/mixin/toasts/MixinSystemToast.java b/src/main/java/me/flashyreese/mods/sodiumextra/mixin/toasts/MixinSystemToast.java index f4da334a..ae3f39c5 100644 --- a/src/main/java/me/flashyreese/mods/sodiumextra/mixin/toasts/MixinSystemToast.java +++ b/src/main/java/me/flashyreese/mods/sodiumextra/mixin/toasts/MixinSystemToast.java @@ -1,10 +1,10 @@ package me.flashyreese.mods.sodiumextra.mixin.toasts; import me.flashyreese.mods.sodiumextra.client.SodiumExtraClientMod; +import net.minecraft.client.gui.DrawContext; import net.minecraft.client.toast.SystemToast; import net.minecraft.client.toast.Toast; import net.minecraft.client.toast.ToastManager; -import net.minecraft.client.util.math.MatrixStack; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; @@ -13,7 +13,7 @@ @Mixin(SystemToast.class) public class MixinSystemToast { @Inject(method = "draw", at = @At("HEAD"), cancellable = true) - public void draw(MatrixStack matrices, ToastManager manager, long startTime, CallbackInfoReturnable cir) { + public void draw(DrawContext context, ToastManager manager, long startTime, CallbackInfoReturnable cir) { if (!SodiumExtraClientMod.options().extraSettings.systemToast) { cir.setReturnValue(Toast.Visibility.HIDE); } diff --git a/src/main/java/me/flashyreese/mods/sodiumextra/mixin/toasts/MixinTutorialToast.java b/src/main/java/me/flashyreese/mods/sodiumextra/mixin/toasts/MixinTutorialToast.java index ac536d73..1b2fd4fb 100644 --- a/src/main/java/me/flashyreese/mods/sodiumextra/mixin/toasts/MixinTutorialToast.java +++ b/src/main/java/me/flashyreese/mods/sodiumextra/mixin/toasts/MixinTutorialToast.java @@ -1,10 +1,10 @@ package me.flashyreese.mods.sodiumextra.mixin.toasts; import me.flashyreese.mods.sodiumextra.client.SodiumExtraClientMod; +import net.minecraft.client.gui.DrawContext; import net.minecraft.client.toast.Toast; import net.minecraft.client.toast.ToastManager; import net.minecraft.client.toast.TutorialToast; -import net.minecraft.client.util.math.MatrixStack; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; @@ -13,7 +13,7 @@ @Mixin(TutorialToast.class) public class MixinTutorialToast { @Inject(method = "draw", at = @At("HEAD"), cancellable = true) - public void draw(MatrixStack matrices, ToastManager manager, long startTime, CallbackInfoReturnable cir) { + public void draw(DrawContext context, ToastManager manager, long startTime, CallbackInfoReturnable cir) { if (!SodiumExtraClientMod.options().extraSettings.tutorialToast) { cir.setReturnValue(Toast.Visibility.HIDE); } From 198cfe45ec905c30b2975ea5317763add8075798 Mon Sep 17 00:00:00 2001 From: Yao Chung Hu <30311066+FlashyReese@users.noreply.github.com> Date: Thu, 8 Jun 2023 00:54:56 +0800 Subject: [PATCH 2/2] change: Bump to `0.4.20` for release --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 6d3f5d60..d13ddccc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ org.gradle.jvmargs=-Xmx1G loader_version=0.14.21 # Mod Properties - mod_version=0.4.18 + mod_version=0.4.20 maven_group=me.flashyreese.mods archives_base_name=sodium-extra