fix compat issue with riptide
This commit is contained in:
@@ -2,14 +2,14 @@
|
||||
org.gradle.jvmargs=-Xmx1G
|
||||
# Fabric Properties
|
||||
# check these on https://modmuss50.me/fabric.html
|
||||
minecraft_version=1.21.11
|
||||
yarn_mappings=1.21.11+build.2
|
||||
minecraft_version=1.21.10
|
||||
yarn_mappings=1.21.10+build.3
|
||||
loader_version=0.18.2
|
||||
loom_version=1.14-SNAPSHOT
|
||||
# Mod Properties
|
||||
mod_version=1.4
|
||||
mod_version=1.5
|
||||
maven_group=com.kasetoatz
|
||||
archives_base_name=BetterTridentReturn
|
||||
# Dependencies
|
||||
# check this on https://modmuss50.me/fabric.html
|
||||
fabric_version=0.139.5+1.21.11
|
||||
fabric_version=0.138.4+1.21.10
|
||||
|
||||
@@ -16,10 +16,10 @@ import static com.kasetoatz.bettertridentreturn.util.Util.returnSlot;
|
||||
@Mixin(TridentItem.class)
|
||||
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)
|
||||
{
|
||||
if (user instanceof PlayerEntity player)
|
||||
if (user instanceof PlayerEntity player && player.isUsingRiptide())
|
||||
{
|
||||
returnSlot = (player.getOffHandStack() == stack) ? PlayerInventory.OFF_HAND_SLOT : player.getInventory().getSelectedSlot();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user