fix compat issue with riptide

This commit is contained in:
2025-12-24 01:31:54 +01:00
parent 8ea3eb0261
commit 4df16e0e9d
2 changed files with 6 additions and 6 deletions

View File

@@ -2,14 +2,14 @@
org.gradle.jvmargs=-Xmx1G org.gradle.jvmargs=-Xmx1G
# Fabric Properties # Fabric Properties
# check these on https://modmuss50.me/fabric.html # check these on https://modmuss50.me/fabric.html
minecraft_version=1.21.11 minecraft_version=1.21.10
yarn_mappings=1.21.11+build.2 yarn_mappings=1.21.10+build.3
loader_version=0.18.2 loader_version=0.18.2
loom_version=1.14-SNAPSHOT loom_version=1.14-SNAPSHOT
# Mod Properties # Mod Properties
mod_version=1.4 mod_version=1.5
maven_group=com.kasetoatz maven_group=com.kasetoatz
archives_base_name=BetterTridentReturn archives_base_name=BetterTridentReturn
# Dependencies # Dependencies
# check this on https://modmuss50.me/fabric.html # check this on https://modmuss50.me/fabric.html
fabric_version=0.139.5+1.21.11 fabric_version=0.138.4+1.21.10

View File

@@ -16,10 +16,10 @@ import static com.kasetoatz.bettertridentreturn.util.Util.returnSlot;
@Mixin(TridentItem.class) @Mixin(TridentItem.class)
public class TridentItemMixin public class TridentItemMixin
{ {
@Inject(method="onStoppedUsing", at=@At(value="INVOKE", target="Lnet/minecraft/entity/player/PlayerEntity;incrementStat(Lnet/minecraft/stat/Stat;)V")) @Inject(method="onStoppedUsing", at=@At(value="INVOKE", target="Lnet/minecraft/entity/projectile/ProjectileEntity;spawnWithVelocity(Lnet/minecraft/entity/projectile/ProjectileEntity$ProjectileCreator;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/LivingEntity;FFF)Lnet/minecraft/entity/projectile/ProjectileEntity;"))
public void onStoppedUsing(ItemStack stack, World world, LivingEntity user, int remainingUseTicks, CallbackInfoReturnable<Boolean> cir) public void onStoppedUsing(ItemStack stack, World world, LivingEntity user, int remainingUseTicks, CallbackInfoReturnable<Boolean> cir)
{ {
if (user instanceof PlayerEntity player) if (user instanceof PlayerEntity player && player.isUsingRiptide())
{ {
returnSlot = (player.getOffHandStack() == stack) ? PlayerInventory.OFF_HAND_SLOT : player.getInventory().getSelectedSlot(); returnSlot = (player.getOffHandStack() == stack) ? PlayerInventory.OFF_HAND_SLOT : player.getInventory().getSelectedSlot();
} }