mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2024-12-22 04:37:42 +01:00
Elements nbt tag
This commit is contained in:
parent
bec55fdacc
commit
1e642ff513
@ -151,7 +151,6 @@ public class ItemStats {
|
||||
PICKAXE_POWER = new PickaxePower(),
|
||||
CUSTOM_SOUNDS = new CustomSounds(),
|
||||
ELEMENTS_CATEGORY = new ItemStatCategory(StatsCategory.ELEMENTS, Material.SLIME_BALL, "The elements of your item."),
|
||||
//ELEMENTS = new Elements(),
|
||||
COMMANDS = new Commands(),
|
||||
STAFF_SPIRIT = new StaffSpiritStat(),
|
||||
LUTE_ATTACK_SOUND = new LuteAttackSoundStat(),
|
||||
|
@ -65,7 +65,6 @@ public class MMOItemTemplate extends PostLoadObject implements ItemReference {
|
||||
|
||||
@Override
|
||||
protected void whenPostLoaded(ConfigurationSection config) {
|
||||
|
||||
FriendlyFeedbackProvider ffp = new FriendlyFeedbackProvider(FFPMMOItems.get());
|
||||
ffp.activatePrefix(true, getType().getId() + " " + getId());
|
||||
|
||||
|
@ -1,9 +1,11 @@
|
||||
package net.Indyuce.mmoitems.stat;
|
||||
|
||||
import io.lumine.mythic.lib.element.Element;
|
||||
import net.Indyuce.mmoitems.api.util.NumericStatFormula;
|
||||
import net.Indyuce.mmoitems.stat.type.DoubleStat;
|
||||
import net.Indyuce.mmoitems.util.ElementStatType;
|
||||
import net.Indyuce.mmoitems.util.PluginUtils;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
|
||||
/**
|
||||
* mmoitems
|
||||
@ -17,17 +19,19 @@ public class ElementStat extends DoubleStat {
|
||||
private final ElementStatType type;
|
||||
|
||||
public ElementStat(ElementStatType type, Element element) {
|
||||
super(String.format("ELEMENTS_%s_%s", type.name(), element.getName()),
|
||||
super(type.getConcatenatedTagPath(element),
|
||||
StatsCategory.ELEMENTS,
|
||||
element.getIcon(),
|
||||
PluginUtils.capitalizeAllWorlds(String.format("%s %s", element.getName(), type.getName())),
|
||||
new String[]{},
|
||||
new String[]{"slashing", "piercing", "blunt", "catalyst", "range", "tool", "armor", "gem_stone"}
|
||||
);
|
||||
|
||||
this.element = element;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
|
||||
public Element getElement() {
|
||||
return element;
|
||||
}
|
||||
|
@ -255,7 +255,7 @@ public class DoubleStat extends ItemStat<NumericStatFormula, DoubleData> impleme
|
||||
// Create Fresh
|
||||
ArrayList<ItemTag> ret = new ArrayList<>();
|
||||
|
||||
// Add sole tag
|
||||
// Add sole taggetNBT
|
||||
ret.add(new ItemTag(getNBTPath(), data.getValue()));
|
||||
|
||||
// Add category tag
|
||||
|
Loading…
Reference in New Issue
Block a user