Skip to content

Commit

Permalink
fix bait animation on 1.21.3+
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiao-MoMi committed Nov 29, 2024
1 parent 9b192df commit e3200a3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package net.momirealms.customfishing.api.mechanic.fishing;

import net.momirealms.customfishing.api.BukkitCustomFishingPlugin;
import net.momirealms.customfishing.common.helper.VersionHelper;
import net.momirealms.customfishing.common.plugin.scheduler.SchedulerTask;
import net.momirealms.sparrow.heart.SparrowHeart;
import org.bukkit.entity.FishHook;
Expand Down Expand Up @@ -45,7 +46,7 @@ public BaitAnimationTask(BukkitCustomFishingPlugin plugin, Player player, FishHo
@Override
public void run() {
SparrowHeart.getInstance().sendClientSideEntityMotion(player, fishHook.getVelocity(), entityID);
SparrowHeart.getInstance().sendClientSideTeleportEntity(player, fishHook.getLocation().clone().subtract(0,0.6,0), false, entityID);
SparrowHeart.getInstance().sendClientSideTeleportEntity(player, fishHook.getLocation().clone().subtract(0,0.6,0), fishHook.getVelocity(), false, entityID);
}

public void cancel() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ public static boolean isVersionNewerThan1_20_5() {
return version >= 20.49;
}

public static boolean isVersionNewerThan1_21_3() {
return version >= 21.29;
}

public static boolean isFolia() {
return folia;
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ h2_driver_version=2.3.232
sqlite_driver_version=3.47.0.0
adventure_bundle_version=4.17.0
adventure_platform_version=4.3.4
sparrow_heart_version=0.47
sparrow_heart_version=0.48
cloud_core_version=2.0.0
cloud_services_version=2.0.0
cloud_brigadier_version=2.0.0-beta.10
Expand Down

0 comments on commit e3200a3

Please sign in to comment.