Fixed display and sweep artifact not being registered

This commit is contained in:
Auxilor 2021-02-26 10:14:55 +00:00
parent ca3747d33e
commit 4d0eac235e
2 changed files with 7 additions and 0 deletions

View File

@ -209,10 +209,15 @@ public class EnchantDisplay extends DisplayModule {
return new Object[0];
}
boolean hideEnchants = false;
if (meta.hasItemFlag(ItemFlag.HIDE_ENCHANTS) || meta.hasItemFlag(ItemFlag.HIDE_POTION_EFFECTS)) {
hideEnchants = true;
}
if (Display.isFinalized(itemStack)) {
hideEnchants = false;
}
return new Object[]{hideEnchants};
}
}

View File

@ -33,6 +33,7 @@ import com.willfp.ecoenchants.enchantments.ecoenchants.artifact.SnowArtifact;
import com.willfp.ecoenchants.enchantments.ecoenchants.artifact.SoulArtifact;
import com.willfp.ecoenchants.enchantments.ecoenchants.artifact.SoulFireArtifact;
import com.willfp.ecoenchants.enchantments.ecoenchants.artifact.SparkleArtifact;
import com.willfp.ecoenchants.enchantments.ecoenchants.artifact.SweepArtifact;
import com.willfp.ecoenchants.enchantments.ecoenchants.artifact.TearArtifact;
import com.willfp.ecoenchants.enchantments.ecoenchants.artifact.TotemArtifact;
import com.willfp.ecoenchants.enchantments.ecoenchants.artifact.VillagerArtifact;
@ -484,6 +485,7 @@ public class EcoEnchants {
public static final EcoEnchant VILLAGER_ARTIFACT = new VillagerArtifact();
public static final EcoEnchant ANGER_ARTIFACT = new AngerArtifact();
public static final EcoEnchant NAUTILUS_ARTIFACT = new NautilusArtifact();
public static final EcoEnchant SWEEP_ARTIFACT = new SweepArtifact();
/**
* Get all registered {@link EcoEnchant}s.