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