diff --git a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/LuckOfTheSnowEnchantment.java b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/LuckOfTheSnowEnchantment.java index 06a912c..7aaeabb 100644 --- a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/LuckOfTheSnowEnchantment.java +++ b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/LuckOfTheSnowEnchantment.java @@ -25,7 +25,7 @@ import net.minecraft.world.item.enchantment.Enchantment; import net.minecraft.world.item.enchantment.EnchantmentCategory; import net.minecraft.world.item.enchantment.Enchantments; -import org.apache.commons.lang3.tuple.Pair; +import org.auioc.mcmod.arnicalib.base.tuple.IntPair; import org.auioc.mcmod.harmoniclib.enchantment.api.HLEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.IItemEnchantment; @@ -67,14 +67,14 @@ public int getMaxCost(int lvl) { } @Override - public Pair preFishingRodCast(int lvl, ItemStack fishingRod, ServerPlayer player, int speedBonus, int luckBonus) { + public IntPair preFishingRodCast(int lvl, ItemStack fishingRod, ServerPlayer player, int speedBonus, int luckBonus) { float temperature = player.level().getBiome(player.blockPosition()).value().getBaseTemperature(); if (temperature <= 0.05F) { luckBonus += lvl * 2; } else if (temperature <= 0.3F) { luckBonus += lvl; } - return Pair.of(speedBonus, luckBonus); + return new IntPair(speedBonus, luckBonus); } } diff --git a/src/main/java/org/auioc/mcmod/harmoniclib/enchantment/EnchantmentPerformer.java b/src/main/java/org/auioc/mcmod/harmoniclib/enchantment/EnchantmentPerformer.java index 1a216e9..70de9ca 100644 --- a/src/main/java/org/auioc/mcmod/harmoniclib/enchantment/EnchantmentPerformer.java +++ b/src/main/java/org/auioc/mcmod/harmoniclib/enchantment/EnchantmentPerformer.java @@ -254,8 +254,8 @@ public static Pair preFishingRodCast(ItemStack fishingRod, Ser ench, IItemEnchantment.FishingRod.class, (e) -> { var r = e.preFishingRodCast(lvl, fishingRod, player, bonus.getLeft(), bonus.getRight()); - bonus.setLeft(r.getLeft()); - bonus.setRight(r.getRight()); + bonus.setLeft(r.x()); + bonus.setRight(r.y()); } ), fishingRod diff --git a/src/main/java/org/auioc/mcmod/harmoniclib/enchantment/api/IItemEnchantment.java b/src/main/java/org/auioc/mcmod/harmoniclib/enchantment/api/IItemEnchantment.java index b7c77e1..e182f24 100644 --- a/src/main/java/org/auioc/mcmod/harmoniclib/enchantment/api/IItemEnchantment.java +++ b/src/main/java/org/auioc/mcmod/harmoniclib/enchantment/api/IItemEnchantment.java @@ -30,7 +30,7 @@ import net.minecraft.world.level.Level; import net.neoforged.api.distmarker.Dist; import net.neoforged.api.distmarker.OnlyIn; -import org.apache.commons.lang3.tuple.Pair; +import org.auioc.mcmod.arnicalib.base.tuple.IntPair; import org.jetbrains.annotations.NotNull; import javax.annotation.Nullable; @@ -58,7 +58,7 @@ public static interface Elytra { public static interface FishingRod { - Pair preFishingRodCast(int lvl, ItemStack fishingRod, ServerPlayer player, int speedBonus, int luckBonus); + IntPair preFishingRodCast(int lvl, ItemStack fishingRod, ServerPlayer player, int speedBonus, int luckBonus); }