From fa538ec5285d9ef171e7aa22c21132aec9a27cca Mon Sep 17 00:00:00 2001 From: WakelessSloth56 Date: Tue, 20 Feb 2024 17:25:45 +0800 Subject: [PATCH] refactor(ench): rename HLEnchantment --- .../enchantment/impl/AimEnchantment.java | 4 ++-- .../impl/BaneOfChampionsEnchantment.java | 4 ++-- .../enchantment/impl/BlessingEnchantment.java | 4 ++-- .../enchantment/impl/BluntEnchantment.java | 4 ++-- .../impl/CurseOfRebellingEnchantment.java | 4 ++-- .../impl/CurseOfSacrificingEnchantment.java | 4 ++-- .../enchantment/impl/DeepStudyEnchantment.java | 4 ++-- .../enchantment/impl/DiningEnchantment.java | 4 ++-- .../enchantment/impl/EfficacyEnchantment.java | 4 ++-- .../impl/ElectrificationEnchantment.java | 4 ++-- .../enchantment/impl/ForgingEnchantment.java | 4 ++-- .../enchantment/impl/FreeRidingEnchantment.java | 4 ++-- .../enchantment/impl/HandinessEnchantment.java | 4 ++-- .../enchantment/impl/IceAspectEnchantment.java | 4 ++-- .../enchantment/impl/LongEnchantment.java | 4 ++-- .../impl/LuckOfTheSnowEnchantment.java | 4 ++-- .../enchantment/impl/MobAffinityEnchantment.java | 4 ++-- .../enchantment/impl/ProficiencyEnchantment.java | 4 ++-- .../enchantment/impl/RapierEnchantment.java | 4 ++-- .../impl/SafeTeleportingEnchantment.java | 4 ++-- .../enchantment/impl/SiphoningEnchantment.java | 4 ++-- .../enchantment/impl/SnipingEnchantment.java | 4 ++-- .../enchantment/impl/SunAffinityEnchantment.java | 4 ++-- .../enchantment/api/HEEnchantmentManager.java | 2 ++ ...ractHEEnchantment.java => HLEnchantment.java} | 16 ++++++++-------- 25 files changed, 56 insertions(+), 54 deletions(-) rename src/main/java/org/auioc/mcmod/harmoniclib/enchantment/api/{AbstractHEEnchantment.java => HLEnchantment.java} (75%) diff --git a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/AimEnchantment.java b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/AimEnchantment.java index c2301da..f17e198 100644 --- a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/AimEnchantment.java +++ b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/AimEnchantment.java @@ -46,14 +46,14 @@ import org.auioc.mcmod.harmoniclib.advancement.HLCriteriaTriggers; import org.auioc.mcmod.harmoniclib.advancement.predicate.HEPerformancePredicateType; import org.auioc.mcmod.harmoniclib.advancement.predicate.IHEPerformancePredicate; -import org.auioc.mcmod.harmoniclib.enchantment.api.AbstractHEEnchantment; +import org.auioc.mcmod.harmoniclib.enchantment.api.HLEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.ILivingEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.IPlayerEnchantment; import java.util.Optional; -public class AimEnchantment extends AbstractHEEnchantment implements ILivingEnchantment.Hurt, IPlayerEnchantment.Tick { +public class AimEnchantment extends HLEnchantment implements ILivingEnchantment.Hurt, IPlayerEnchantment.Tick { public AimEnchantment() { super( diff --git a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/BaneOfChampionsEnchantment.java b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/BaneOfChampionsEnchantment.java index 3ded983..418a249 100644 --- a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/BaneOfChampionsEnchantment.java +++ b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/BaneOfChampionsEnchantment.java @@ -27,10 +27,10 @@ import net.minecraft.world.item.enchantment.DamageEnchantment; import net.minecraft.world.item.enchantment.Enchantment; import net.minecraft.world.item.enchantment.EnchantmentCategory; -import org.auioc.mcmod.harmoniclib.enchantment.api.AbstractHEEnchantment; +import org.auioc.mcmod.harmoniclib.enchantment.api.HLEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.ILivingEnchantment; -public class BaneOfChampionsEnchantment extends AbstractHEEnchantment implements ILivingEnchantment.Hurt { +public class BaneOfChampionsEnchantment extends HLEnchantment implements ILivingEnchantment.Hurt { public BaneOfChampionsEnchantment() { super( diff --git a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/BlessingEnchantment.java b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/BlessingEnchantment.java index d492358..a9e1ffb 100644 --- a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/BlessingEnchantment.java +++ b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/BlessingEnchantment.java @@ -31,10 +31,10 @@ import net.minecraft.world.item.enchantment.Enchantments; import org.auioc.mcmod.arnicalib.base.math.MathUtil; import org.auioc.mcmod.harmonicench.enchantment.HEEnchantments; -import org.auioc.mcmod.harmoniclib.enchantment.api.AbstractHEEnchantment; +import org.auioc.mcmod.harmoniclib.enchantment.api.HLEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.IItemEnchantment; -public class BlessingEnchantment extends AbstractHEEnchantment implements IItemEnchantment.Protection { +public class BlessingEnchantment extends HLEnchantment implements IItemEnchantment.Protection { private static final EnchantmentCategory BLESSABLE_ARMOR = EnchantmentCategory.create( "BLESSABLE_ARMOR", diff --git a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/BluntEnchantment.java b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/BluntEnchantment.java index c46f9e5..80d2516 100644 --- a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/BluntEnchantment.java +++ b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/BluntEnchantment.java @@ -35,14 +35,14 @@ import org.auioc.mcmod.arnicalib.game.tag.HItemTags; import org.auioc.mcmod.harmonicench.effect.HEMobEffects; import org.auioc.mcmod.harmonicench.enchantment.HEEnchantments; -import org.auioc.mcmod.harmoniclib.enchantment.api.AbstractHEEnchantment; +import org.auioc.mcmod.harmoniclib.enchantment.api.HLEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.IAttributeModifierEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.IPlayerEnchantment; import java.util.Map; import java.util.UUID; -public class BluntEnchantment extends AbstractHEEnchantment implements IAttributeModifierEnchantment, IPlayerEnchantment.CriticalHit { +public class BluntEnchantment extends HLEnchantment implements IAttributeModifierEnchantment, IPlayerEnchantment.CriticalHit { private static final UUID ATTACK_SPEED_UUID = UUID.fromString("F839F42C-4B26-6F66-7025-1EF3294EED97"); diff --git a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/CurseOfRebellingEnchantment.java b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/CurseOfRebellingEnchantment.java index 5eb6b1a..aa49c65 100644 --- a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/CurseOfRebellingEnchantment.java +++ b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/CurseOfRebellingEnchantment.java @@ -39,12 +39,12 @@ import org.auioc.mcmod.harmoniclib.advancement.HLCriteriaTriggers; import org.auioc.mcmod.harmoniclib.advancement.predicate.HEPerformancePredicateType; import org.auioc.mcmod.harmoniclib.advancement.predicate.IHEPerformancePredicate; -import org.auioc.mcmod.harmoniclib.enchantment.api.AbstractHEEnchantment; +import org.auioc.mcmod.harmoniclib.enchantment.api.HLEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.IItemEnchantment; import java.util.Optional; -public class CurseOfRebellingEnchantment extends AbstractHEEnchantment implements IItemEnchantment.Hurt { +public class CurseOfRebellingEnchantment extends HLEnchantment implements IItemEnchantment.Hurt { public CurseOfRebellingEnchantment() { super( diff --git a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/CurseOfSacrificingEnchantment.java b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/CurseOfSacrificingEnchantment.java index 6ee7b89..e989ee6 100644 --- a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/CurseOfSacrificingEnchantment.java +++ b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/CurseOfSacrificingEnchantment.java @@ -36,7 +36,7 @@ import net.neoforged.api.distmarker.Dist; import net.neoforged.api.distmarker.OnlyIn; import org.auioc.mcmod.arnicalib.game.enchantment.EnchantmentTagUtils; -import org.auioc.mcmod.harmoniclib.enchantment.api.AbstractHEEnchantment; +import org.auioc.mcmod.harmoniclib.enchantment.api.HLEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.IItemEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.ILivingEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.EnchantmentHelper; @@ -45,7 +45,7 @@ import javax.annotation.Nullable; import java.util.List; -public class CurseOfSacrificingEnchantment extends AbstractHEEnchantment implements IItemEnchantment.Tick.Inventory, ILivingEnchantment.Death, IItemEnchantment.Tooltip { +public class CurseOfSacrificingEnchantment extends HLEnchantment implements IItemEnchantment.Tick.Inventory, ILivingEnchantment.Death, IItemEnchantment.Tooltip { private static final String NBT_TIME = "SacrificingProcess"; private static final int MAX_TIME = 20 * 60; diff --git a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/DeepStudyEnchantment.java b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/DeepStudyEnchantment.java index 1596acf..c916a31 100644 --- a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/DeepStudyEnchantment.java +++ b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/DeepStudyEnchantment.java @@ -27,11 +27,11 @@ import net.minecraft.world.level.storage.loot.parameters.LootContextParams; import net.neoforged.neoforge.common.Tags; import org.auioc.mcmod.arnicalib.game.enchantment.HEnchantmentCategory; -import org.auioc.mcmod.harmoniclib.enchantment.api.AbstractHEEnchantment; +import org.auioc.mcmod.harmoniclib.enchantment.api.HLEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.ILootBonusEnchantment; -public class DeepStudyEnchantment extends AbstractHEEnchantment implements ILootBonusEnchantment.ApplyBonusCountFunction { +public class DeepStudyEnchantment extends HLEnchantment implements ILootBonusEnchantment.ApplyBonusCountFunction { public DeepStudyEnchantment() { super( diff --git a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/DiningEnchantment.java b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/DiningEnchantment.java index 79fadd1..452c344 100644 --- a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/DiningEnchantment.java +++ b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/DiningEnchantment.java @@ -27,10 +27,10 @@ import net.minecraft.world.item.enchantment.Enchantments; import org.apache.commons.lang3.tuple.Pair; import org.auioc.mcmod.harmonicench.enchantment.HEEnchantments; -import org.auioc.mcmod.harmoniclib.enchantment.api.AbstractHEEnchantment; +import org.auioc.mcmod.harmoniclib.enchantment.api.HLEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.IPlayerEnchantment; -public class DiningEnchantment extends AbstractHEEnchantment implements IPlayerEnchantment.Eat { +public class DiningEnchantment extends HLEnchantment implements IPlayerEnchantment.Eat { public DiningEnchantment() { super( diff --git a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/EfficacyEnchantment.java b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/EfficacyEnchantment.java index 7e17ff2..cefa588 100644 --- a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/EfficacyEnchantment.java +++ b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/EfficacyEnchantment.java @@ -35,13 +35,13 @@ import org.auioc.mcmod.arnicalib.base.math.MathUtil; import org.auioc.mcmod.arnicalib.game.entity.projectile.ITippedArrow; import org.auioc.mcmod.arnicalib.mod.mixin.common.MixinAccessorMobEffectInstance; -import org.auioc.mcmod.harmoniclib.enchantment.api.AbstractHEEnchantment; +import org.auioc.mcmod.harmoniclib.enchantment.api.HLEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.IProjectileEnchantment; import org.auioc.mcmod.harmoniclib.mixinapi.IMixinSpectralArrow; import java.util.HashSet; -public class EfficacyEnchantment extends AbstractHEEnchantment implements IProjectileEnchantment.TippedArrow, IProjectileEnchantment.SpectralArrow, IProjectileEnchantment.FireworkRocket { +public class EfficacyEnchantment extends HLEnchantment implements IProjectileEnchantment.TippedArrow, IProjectileEnchantment.SpectralArrow, IProjectileEnchantment.FireworkRocket { public EfficacyEnchantment() { super( diff --git a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/ElectrificationEnchantment.java b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/ElectrificationEnchantment.java index 72439e2..bc2d262 100644 --- a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/ElectrificationEnchantment.java +++ b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/ElectrificationEnchantment.java @@ -33,11 +33,11 @@ import net.minecraft.world.item.enchantment.Enchantments; import net.minecraft.world.level.Level; import org.auioc.mcmod.arnicalib.game.random.GameRandomUtils; -import org.auioc.mcmod.harmoniclib.enchantment.api.AbstractHEEnchantment; +import org.auioc.mcmod.harmoniclib.enchantment.api.HLEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.IItemEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.ILivingEnchantment; -public class ElectrificationEnchantment extends AbstractHEEnchantment implements IItemEnchantment.Tick.Inventory, ILivingEnchantment.Hurt { +public class ElectrificationEnchantment extends HLEnchantment implements IItemEnchantment.Tick.Inventory, ILivingEnchantment.Hurt { public ElectrificationEnchantment() { super( diff --git a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/ForgingEnchantment.java b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/ForgingEnchantment.java index e5f111f..f42e9fb 100644 --- a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/ForgingEnchantment.java +++ b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/ForgingEnchantment.java @@ -31,14 +31,14 @@ import net.minecraft.world.item.enchantment.Enchantments; import org.auioc.mcmod.arnicalib.base.math.MathUtil; import org.auioc.mcmod.harmonicench.enchantment.HEEnchantments; -import org.auioc.mcmod.harmoniclib.enchantment.api.AbstractHEEnchantment; +import org.auioc.mcmod.harmoniclib.enchantment.api.HLEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.IAttributeModifierEnchantment; import javax.annotation.Nullable; import java.util.Map; import java.util.UUID; -public class ForgingEnchantment extends AbstractHEEnchantment implements IAttributeModifierEnchantment { +public class ForgingEnchantment extends HLEnchantment implements IAttributeModifierEnchantment { private static final EnchantmentCategory METALLIC_ARMOR = EnchantmentCategory.create( "METALLIC_ARMOR", diff --git a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/FreeRidingEnchantment.java b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/FreeRidingEnchantment.java index 595b9a8..265dc50 100644 --- a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/FreeRidingEnchantment.java +++ b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/FreeRidingEnchantment.java @@ -26,10 +26,10 @@ import net.minecraft.world.item.enchantment.Enchantment; import net.minecraft.world.item.enchantment.Enchantments; import org.auioc.mcmod.arnicalib.game.enchantment.HEnchantmentCategory; -import org.auioc.mcmod.harmoniclib.enchantment.api.AbstractHEEnchantment; +import org.auioc.mcmod.harmoniclib.enchantment.api.HLEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.IItemEnchantment; -public class FreeRidingEnchantment extends AbstractHEEnchantment implements IItemEnchantment.Hurt { +public class FreeRidingEnchantment extends HLEnchantment implements IItemEnchantment.Hurt { public FreeRidingEnchantment() { super( diff --git a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/HandinessEnchantment.java b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/HandinessEnchantment.java index c861bd7..92d6f99 100644 --- a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/HandinessEnchantment.java +++ b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/HandinessEnchantment.java @@ -29,10 +29,10 @@ import net.minecraft.world.item.enchantment.Enchantments; import net.minecraft.world.phys.Vec3; import org.auioc.mcmod.arnicalib.base.math.MathUtil; -import org.auioc.mcmod.harmoniclib.enchantment.api.AbstractHEEnchantment; +import org.auioc.mcmod.harmoniclib.enchantment.api.HLEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.IProjectileEnchantment; -public class HandinessEnchantment extends AbstractHEEnchantment implements IProjectileEnchantment.HurtLiving { +public class HandinessEnchantment extends HLEnchantment implements IProjectileEnchantment.HurtLiving { public HandinessEnchantment() { super( diff --git a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/IceAspectEnchantment.java b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/IceAspectEnchantment.java index 8e3d349..c3d1d14 100644 --- a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/IceAspectEnchantment.java +++ b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/IceAspectEnchantment.java @@ -26,10 +26,10 @@ import net.minecraft.world.item.enchantment.EnchantmentCategory; import net.minecraft.world.item.enchantment.Enchantments; import org.auioc.mcmod.arnicalib.base.math.MathUtil; -import org.auioc.mcmod.harmoniclib.enchantment.api.AbstractHEEnchantment; +import org.auioc.mcmod.harmoniclib.enchantment.api.HLEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.ILivingEnchantment; -public class IceAspectEnchantment extends AbstractHEEnchantment implements ILivingEnchantment.Hurt { +public class IceAspectEnchantment extends HLEnchantment implements ILivingEnchantment.Hurt { public IceAspectEnchantment() { super( diff --git a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/LongEnchantment.java b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/LongEnchantment.java index 87736df..639e809 100644 --- a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/LongEnchantment.java +++ b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/LongEnchantment.java @@ -29,13 +29,13 @@ import net.neoforged.neoforge.common.NeoForgeMod; import org.auioc.mcmod.arnicalib.base.math.MathUtil; import org.auioc.mcmod.harmonicench.enchantment.HEEnchantments; -import org.auioc.mcmod.harmoniclib.enchantment.api.AbstractHEEnchantment; +import org.auioc.mcmod.harmoniclib.enchantment.api.HLEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.IAttributeModifierEnchantment; import java.util.Map; import java.util.UUID; -public class LongEnchantment extends AbstractHEEnchantment implements IAttributeModifierEnchantment { +public class LongEnchantment extends HLEnchantment implements IAttributeModifierEnchantment { private static final UUID ATTACK_RANGE_UUID = UUID.fromString("2A117CB2-C6AA-15F5-18EE-4B8C74CF8B9F"); 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 9c4613f..7604a43 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 @@ -26,10 +26,10 @@ 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.harmoniclib.enchantment.api.AbstractHEEnchantment; +import org.auioc.mcmod.harmoniclib.enchantment.api.HLEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.IItemEnchantment; -public class LuckOfTheSnowEnchantment extends AbstractHEEnchantment implements IItemEnchantment.FishingRod { +public class LuckOfTheSnowEnchantment extends HLEnchantment implements IItemEnchantment.FishingRod { public LuckOfTheSnowEnchantment() { super( diff --git a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/MobAffinityEnchantment.java b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/MobAffinityEnchantment.java index 43f5fb9..59734b6 100644 --- a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/MobAffinityEnchantment.java +++ b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/MobAffinityEnchantment.java @@ -36,13 +36,13 @@ import org.auioc.mcmod.arnicalib.game.effect.MobEffectUtils; import org.auioc.mcmod.arnicalib.game.entity.MobStance; import org.auioc.mcmod.harmonicench.HarmonicEnchantments; -import org.auioc.mcmod.harmoniclib.enchantment.api.AbstractHEEnchantment; +import org.auioc.mcmod.harmoniclib.enchantment.api.HLEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.ILivingEnchantment; import java.util.LinkedHashMap; import java.util.function.BiPredicate; -public class MobAffinityEnchantment extends AbstractHEEnchantment implements ILivingEnchantment.Piglin, ILivingEnchantment.Cat, ILivingEnchantment.Potion { +public class MobAffinityEnchantment extends HLEnchantment implements ILivingEnchantment.Piglin, ILivingEnchantment.Cat, ILivingEnchantment.Potion { public MobAffinityEnchantment() { super( diff --git a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/ProficiencyEnchantment.java b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/ProficiencyEnchantment.java index 716c732..4aa9334 100644 --- a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/ProficiencyEnchantment.java +++ b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/ProficiencyEnchantment.java @@ -34,7 +34,7 @@ import net.neoforged.api.distmarker.Dist; import net.neoforged.api.distmarker.OnlyIn; import org.auioc.mcmod.arnicalib.base.math.MathUtil; -import org.auioc.mcmod.harmoniclib.enchantment.api.AbstractHEEnchantment; +import org.auioc.mcmod.harmoniclib.enchantment.api.HLEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.IBlockEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.IItemEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.EnchantmentHelper; @@ -45,7 +45,7 @@ import java.util.Optional; -public class ProficiencyEnchantment extends AbstractHEEnchantment implements IBlockEnchantment.BreakSpeed, IBlockEnchantment.Break, IItemEnchantment.Tooltip { +public class ProficiencyEnchantment extends HLEnchantment implements IBlockEnchantment.BreakSpeed, IBlockEnchantment.Break, IItemEnchantment.Tooltip { public static final String NBT_PROFICIENCY = "Proficiency"; diff --git a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/RapierEnchantment.java b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/RapierEnchantment.java index 79cd169..9775771 100644 --- a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/RapierEnchantment.java +++ b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/RapierEnchantment.java @@ -31,7 +31,7 @@ import net.neoforged.neoforge.common.ToolActions; import org.auioc.mcmod.arnicalib.base.math.MathUtil; import org.auioc.mcmod.harmonicench.enchantment.HEEnchantments; -import org.auioc.mcmod.harmoniclib.enchantment.api.AbstractHEEnchantment; +import org.auioc.mcmod.harmoniclib.enchantment.api.HLEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.IAttributeModifierEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.IToolActionControllerEnchantment; @@ -39,7 +39,7 @@ import java.util.UUID; -public class RapierEnchantment extends AbstractHEEnchantment implements IAttributeModifierEnchantment, IToolActionControllerEnchantment { +public class RapierEnchantment extends HLEnchantment implements IAttributeModifierEnchantment, IToolActionControllerEnchantment { private static final UUID ATTACK_SPEED_UUID = UUID.fromString("DD970DD3-E85C-C575-F1E2-4708A674A99C"); diff --git a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/SafeTeleportingEnchantment.java b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/SafeTeleportingEnchantment.java index b99643a..17d9f4b 100644 --- a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/SafeTeleportingEnchantment.java +++ b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/SafeTeleportingEnchantment.java @@ -27,14 +27,14 @@ import net.minecraft.world.item.enchantment.EnchantmentCategory; import net.minecraft.world.item.enchantment.Enchantments; import org.auioc.mcmod.arnicalib.base.math.MathUtil; -import org.auioc.mcmod.harmoniclib.enchantment.api.AbstractHEEnchantment; +import org.auioc.mcmod.harmoniclib.enchantment.api.HLEnchantment; import org.auioc.mcmod.harmoniclib.event.HLServerEventHandler; /** * @see HLServerEventHandler#onEnderPearlTeleport * @see HLServerEventHandler#onEntityTravelToDimension */ -public class SafeTeleportingEnchantment extends AbstractHEEnchantment { +public class SafeTeleportingEnchantment extends HLEnchantment { public SafeTeleportingEnchantment() { super( diff --git a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/SiphoningEnchantment.java b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/SiphoningEnchantment.java index 0aaa7a8..bc0be46 100644 --- a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/SiphoningEnchantment.java +++ b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/SiphoningEnchantment.java @@ -29,10 +29,10 @@ import net.minecraft.world.item.enchantment.EnchantmentCategory; import net.minecraft.world.item.enchantment.Enchantments; import org.auioc.mcmod.arnicalib.base.math.MathUtil; -import org.auioc.mcmod.harmoniclib.enchantment.api.AbstractHEEnchantment; +import org.auioc.mcmod.harmoniclib.enchantment.api.HLEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.ILivingEnchantment; -public class SiphoningEnchantment extends AbstractHEEnchantment implements ILivingEnchantment.Death { +public class SiphoningEnchantment extends HLEnchantment implements ILivingEnchantment.Death { public SiphoningEnchantment() { super( diff --git a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/SnipingEnchantment.java b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/SnipingEnchantment.java index 6cb3c73..bebedf5 100644 --- a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/SnipingEnchantment.java +++ b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/SnipingEnchantment.java @@ -30,11 +30,11 @@ import net.minecraft.world.phys.Vec3; import org.auioc.mcmod.arnicalib.base.math.MathUtil; import org.auioc.mcmod.harmonicench.enchantment.HEEnchantments; -import org.auioc.mcmod.harmoniclib.enchantment.api.AbstractHEEnchantment; +import org.auioc.mcmod.harmoniclib.enchantment.api.HLEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.IProjectileEnchantment; import org.auioc.mcmod.harmoniclib.mixinapi.IMixinAbstractArrow; -public class SnipingEnchantment extends AbstractHEEnchantment implements IProjectileEnchantment.HurtLiving, IProjectileEnchantment.AbstractArrow { +public class SnipingEnchantment extends HLEnchantment implements IProjectileEnchantment.HurtLiving, IProjectileEnchantment.AbstractArrow { public SnipingEnchantment() { super( diff --git a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/SunAffinityEnchantment.java b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/SunAffinityEnchantment.java index 02875a7..250f7b6 100644 --- a/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/SunAffinityEnchantment.java +++ b/src/main/java/org/auioc/mcmod/harmonicench/enchantment/impl/SunAffinityEnchantment.java @@ -29,12 +29,12 @@ import net.neoforged.neoforge.event.TickEvent; import org.auioc.mcmod.arnicalib.game.enchantment.HEnchantmentCategory; import org.auioc.mcmod.harmonicench.effect.HEMobEffects; -import org.auioc.mcmod.harmoniclib.enchantment.api.AbstractHEEnchantment; +import org.auioc.mcmod.harmoniclib.enchantment.api.HLEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.IItemEnchantment; import org.auioc.mcmod.harmoniclib.enchantment.api.IPlayerEnchantment; -public class SunAffinityEnchantment extends AbstractHEEnchantment implements IItemEnchantment.Elytra, IPlayerEnchantment.Tick { +public class SunAffinityEnchantment extends HLEnchantment implements IItemEnchantment.Elytra, IPlayerEnchantment.Tick { public SunAffinityEnchantment() { super( diff --git a/src/main/java/org/auioc/mcmod/harmoniclib/enchantment/api/HEEnchantmentManager.java b/src/main/java/org/auioc/mcmod/harmoniclib/enchantment/api/HEEnchantmentManager.java index 34a4af0..9411950 100644 --- a/src/main/java/org/auioc/mcmod/harmoniclib/enchantment/api/HEEnchantmentManager.java +++ b/src/main/java/org/auioc/mcmod/harmoniclib/enchantment/api/HEEnchantmentManager.java @@ -28,6 +28,8 @@ public class HEEnchantmentManager { + // TODO Improve? + private static final HashMap ENABLED = new HashMap<>(); @Nullable diff --git a/src/main/java/org/auioc/mcmod/harmoniclib/enchantment/api/AbstractHEEnchantment.java b/src/main/java/org/auioc/mcmod/harmoniclib/enchantment/api/HLEnchantment.java similarity index 75% rename from src/main/java/org/auioc/mcmod/harmoniclib/enchantment/api/AbstractHEEnchantment.java rename to src/main/java/org/auioc/mcmod/harmoniclib/enchantment/api/HLEnchantment.java index 2129cf0..02ae7dd 100644 --- a/src/main/java/org/auioc/mcmod/harmoniclib/enchantment/api/AbstractHEEnchantment.java +++ b/src/main/java/org/auioc/mcmod/harmoniclib/enchantment/api/HLEnchantment.java @@ -29,39 +29,39 @@ import java.util.function.Predicate; -public abstract class AbstractHEEnchantment extends Enchantment implements IValidSlotsVisibleEnchantment, IConfigurableEnchantment { +public abstract class HLEnchantment extends Enchantment implements IValidSlotsVisibleEnchantment, IConfigurableEnchantment { protected final int maxLevel; protected final Predicate compatibility; protected final NullableBooleanValue isEnabled = new NullableBooleanValue(() -> HEEnchantmentManager.getConfigEnabled(RegistryUtils.id(this))); - public AbstractHEEnchantment(Rarity rarity, EnchantmentCategory category, EquipmentSlot[] validSlots, int maxLevel, Predicate compatibility) { + public HLEnchantment(Rarity rarity, EnchantmentCategory category, EquipmentSlot[] validSlots, int maxLevel, Predicate compatibility) { super(rarity, category, validSlots); this.maxLevel = maxLevel; this.compatibility = compatibility; } - public AbstractHEEnchantment(Rarity rarity, EnchantmentCategory category, EquipmentSlot validSlot, int maxLevel, Predicate compatibility) { + public HLEnchantment(Rarity rarity, EnchantmentCategory category, EquipmentSlot validSlot, int maxLevel, Predicate compatibility) { this(rarity, category, new EquipmentSlot[] { validSlot }, maxLevel, compatibility); } - public AbstractHEEnchantment(Rarity rarity, EnchantmentCategory category, EquipmentSlot[] validSlots, Predicate compatibility) { + public HLEnchantment(Rarity rarity, EnchantmentCategory category, EquipmentSlot[] validSlots, Predicate compatibility) { this(rarity, category, validSlots, 1, compatibility); } - public AbstractHEEnchantment(Rarity rarity, EnchantmentCategory category, EquipmentSlot validSlot, Predicate compatibility) { + public HLEnchantment(Rarity rarity, EnchantmentCategory category, EquipmentSlot validSlot, Predicate compatibility) { this(rarity, category, validSlot, 1, compatibility); } - public AbstractHEEnchantment(Rarity rarity, EnchantmentCategory category, EquipmentSlot validSlot, int maxLevel) { + public HLEnchantment(Rarity rarity, EnchantmentCategory category, EquipmentSlot validSlot, int maxLevel) { this(rarity, category, validSlot, maxLevel, (o) -> true); } - public AbstractHEEnchantment(Rarity rarity, EnchantmentCategory category, EquipmentSlot[] validSlots, int maxLevel) { + public HLEnchantment(Rarity rarity, EnchantmentCategory category, EquipmentSlot[] validSlots, int maxLevel) { this(rarity, category, validSlots, maxLevel, (o) -> true); } - public AbstractHEEnchantment() { + public HLEnchantment() { this(Rarity.COMMON, EnchantmentCategory.VANISHABLE, EquipmentSlot.MAINHAND, 1, (o) -> true); }