Skip to content

Commit

Permalink
refactor(ench): rename HLEnchantment
Browse files Browse the repository at this point in the history
  • Loading branch information
WakelessSloth56 committed Feb 20, 2024
1 parent 1d57357 commit fa538ec
Show file tree
Hide file tree
Showing 25 changed files with 56 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@
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;

import java.util.Map;
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");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@

public class HEEnchantmentManager {

// TODO Improve?

private static final HashMap<ResourceLocation, BooleanValue> ENABLED = new HashMap<>();

@Nullable
Expand Down
Loading

0 comments on commit fa538ec

Please sign in to comment.