From c4aed126d887dcd8a13b51852816883a67c6d86b Mon Sep 17 00:00:00 2001 From: JFronny Date: Wed, 23 Oct 2024 21:37:19 +0200 Subject: [PATCH] chore: update to 1.21.3 --- build.gradle.kts | 12 ++++++------ settings.gradle.kts | 3 +-- .../jfronny/breakme/mixin/PlayerEntityMixin.java | 7 ++++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 513d9e8..1235f9f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -16,11 +16,11 @@ base.archivesName = "breakme" // https://fabricmc.net/develop/ jfMod { - minecraftVersion = "1.21" - yarn("build.1") - loaderVersion = "0.15.11" - libJfVersion = "3.16.0" - fabricApiVersion = "0.100.1+1.21" + minecraftVersion = "1.21.3" + yarn("build.2") + loaderVersion = "0.16.7" + libJfVersion = "3.18.0" + fabricApiVersion = "0.106.1+1.21.3" modrinth { projectId = "breakme" @@ -43,7 +43,7 @@ dependencies { modLocalRuntime("io.gitlab.jfronny.libjf:libjf-devutil") modLocalRuntime("io.gitlab.jfronny.libjf:libjf-config-ui-tiny") modLocalRuntime("net.fabricmc.fabric-api:fabric-api") - modLocalRuntime("com.terraformersmc:modmenu:11.0.0-beta.1") + modLocalRuntime("com.terraformersmc:modmenu:12.0.0-beta.1") } loom { diff --git a/settings.gradle.kts b/settings.gradle.kts index e4f0c78..0eb8fb2 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,7 +1,6 @@ pluginManagement { repositories { - maven("https://maven.fabricmc.net/") // FabricMC - maven("https://maven.frohnmeyer-wds.de/artifacts") // scripts + maven("https://maven.frohnmeyer-wds.de/mirrors") gradlePluginPortal() } } diff --git a/src/main/java/io/gitlab/jfronny/breakme/mixin/PlayerEntityMixin.java b/src/main/java/io/gitlab/jfronny/breakme/mixin/PlayerEntityMixin.java index a9aec5f..bf43011 100644 --- a/src/main/java/io/gitlab/jfronny/breakme/mixin/PlayerEntityMixin.java +++ b/src/main/java/io/gitlab/jfronny/breakme/mixin/PlayerEntityMixin.java @@ -4,6 +4,7 @@ import io.gitlab.jfronny.breakme.BreakMe; import io.gitlab.jfronny.breakme.BreakMeConfig; import net.minecraft.entity.damage.DamageSource; import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.server.world.ServerWorld; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; @@ -12,9 +13,9 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Mixin(PlayerEntity.class) public class PlayerEntityMixin { - @Inject(at = @At("TAIL"), method = "damage(Lnet/minecraft/entity/damage/DamageSource;F)Z") - private void onDamage(DamageSource source, float amount, CallbackInfoReturnable info) throws Exception { - if (info.getReturnValue()) { + @Inject(at = @At("TAIL"), method = "damage(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/damage/DamageSource;F)Z") + private void onDamage(ServerWorld world, DamageSource source, float amount, CallbackInfoReturnable cir) throws Exception { + if (cir.getReturnValue()) { BreakMe.tryInvokeCrash(BreakMe.resolveEvent((PlayerEntity)(Object)this)); } }