diff --git a/build.gradle b/build.gradle index 4e513b4..78a4359 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '1.6-SNAPSHOT' + id 'fabric-loom' version '1.8-SNAPSHOT' id 'maven-publish' } diff --git a/gradle.properties b/gradle.properties index 274a9b3..585307d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,10 +2,10 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://modmuss50.me/fabric.html -minecraft_version=1.21.1 -yarn_mappings=1.21.1+build.3 -loader_version=0.16.0 +minecraft_version=1.21.3 +yarn_mappings=1.21.3+build.2 +loader_version=0.16.9 # Mod Properties -mod_version=1.1.1 +mod_version=1.1.2 maven_group=systems.brn archives_base_name=Wise_Elytra diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index b82aa23..9355b41 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/src/main/java/systems/brn/wise_elytra/mixins/FireworkUseMixin.java b/src/main/java/systems/brn/wise_elytra/mixins/FireworkUseMixin.java index be2ff8a..c1d0a3e 100644 --- a/src/main/java/systems/brn/wise_elytra/mixins/FireworkUseMixin.java +++ b/src/main/java/systems/brn/wise_elytra/mixins/FireworkUseMixin.java @@ -5,8 +5,8 @@ import net.minecraft.component.type.FireworksComponent; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.FireworkRocketItem; import net.minecraft.item.ItemStack; +import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; -import net.minecraft.util.TypedActionResult; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; @@ -17,13 +17,13 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; public class FireworkUseMixin { @Inject(method = "use", at = @At("HEAD"), cancellable = true) - private void onUse(World world, PlayerEntity user, Hand hand, CallbackInfoReturnable> cir) { + private void onUse(World world, PlayerEntity user, Hand hand, CallbackInfoReturnable cir) { ItemStack stack = user.getStackInHand(hand); // Check if the firework rocket contains a firework star and if FireworksComponent fireworksComponent = stack.get(DataComponentTypes.FIREWORKS); - if (fireworksComponent != null && (fireworksComponent.explosions().isEmpty() != user.isFallFlying())) { - cir.setReturnValue(TypedActionResult.fail(stack)); + if (fireworksComponent != null && (fireworksComponent.explosions().isEmpty() != user.isGliding())) { + cir.setReturnValue(ActionResult.FAIL); } }