public class CustomTexturedLeatherArmor extends CustomLeatherArmor implements ModelInjector
CustomItem that contains at least one Texture since it implements
ModelInjector. A texture pack is required in order for the Item to function.
The Texture Pack will be provided during the
AdditionsAPIInitializationEvent using the
AdditionsAPIInitializationEvent.addResourcePackFromPlugin(org.bukkit.plugin.java.JavaPlugin, String)
or a similar method. The resource pack must have the following structure:
assets\plugin_name\textures\items\texture_name.png where plugin_name will be
the first part of the CustomItem's Id Name (e.g. "vanilla_additions")
and the texture_name will be the name of the Texture that you specified when
creating the Item. It is necessary that the CustomTexturedItem is
registered during the AdditionsAPIInitializationEvent and that
the Texture Pack is received by the Player in order for the Texture to work.
CHEST_UUID, FEET_UUID, HEAD_UUID, LEGS_UUID, LORE_PREFIX, LORE_SUFFIX, MAIN_HAND_UUID, OFF_HAND_UUID| Constructor and Description |
|---|
CustomTexturedLeatherArmor(DamageableItem dItem,
org.bukkit.Color color,
java.lang.String idName,
java.lang.String defaultTexture)
Creates a
CustomTexturedLeatherArmor |
| Modifier and Type | Method and Description |
|---|---|
java.util.HashMap<java.lang.String,java.lang.Short> |
getAllTextures()
This is needed for later use and will be filled with Texture Names when
using
ModelInjector.addTexture(String) and with the appropriate durability
values when the API is enabled. |
java.lang.String |
getDefaultTexture() |
java.util.HashMap<ModelInjection,java.lang.Short> |
getOverrideEntries()
Provide your override entry to define the model that you want to use.
The "damaged" and "damage" tag will be automatically defined by the toolbox, you don't need to worry about them. |
getColor, setColoraddArmor, addArmorToughness, addAttribute, getArmorType, getDurabilityMechanics, setDurabilityMechanics, setDurabilityMechanicsaddAllCustomRecipes, addAttribute, addAttribute, addAttribute, addCustomRecipe, addEnchantment, addForbiddenEnchantment, addForbiddenEnchantment, addItemFlag, addLoreLine, clearAttributes, clone, compareTo, getAmount, getAttributes, getAttributeVisibility, getBurnTime, getCanBePlacedVisibility, getCanDestroyVisibility, getCustomRecipes, getDisplayName, getDurability, getEnchantmentVisibility, getEnchantmnets, getFakeDurability, getForbidenEnchantments, getFullLore, getIdName, getItemFlags, getItemType, getLore, getMaterial, getPermissions, getPotionEffectsVisibility, getUnbreakableVisibility, hasFakeDurability, hasHoeAbilities, isCombinableInCrafting, isEnchantable, isUnbreakable, setAmount, setAttributes, setAttributeVisibility, setBurnTime, setCanBePlacedVisibility, setCanDestroyVisibility, setCombinedInCrafting, setDisplayName, setDurability, setEnchantable, setEnchantmentVisibility, setFakeDurability, setHoeAbilities, setIdName, setLore, setMaterial, setPermissions, setPotionEffectsVisibility, setUnbreakable, setUnbreakableVisibilityequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddTexture, checkCustomItem, getDamageableItem, getTexture, injectpublic CustomTexturedLeatherArmor(DamageableItem dItem, org.bukkit.Color color, java.lang.String idName, java.lang.String defaultTexture)
CustomTexturedLeatherArmordItem - The DamageableItem that the CustomItem will be based off. This
will determine the Material of the CustomItem.idName - the CustomItem's ID Name. This MUST BE SIMILAR to
"vanilla_additions:emerald_sword" as the Texture will not be
able to be detected otherwise. It is also saved in the
ItemStack so you can easily detect which CustomItem it
is.defaultTexture - The name of the default texture. This will be the name of the
PNG file (without the extension .png) whose texture will be
used from the Resource Pack.public java.util.HashMap<java.lang.String,java.lang.Short> getAllTextures()
ModelInjectorModelInjector.addTexture(String) and with the appropriate durability
values when the API is enabled. Here's some example code: private Map overrideModels = new HashMap();
@Override
public Map getAllTextures() {
return overrideModels;
} getAllTextures in interface ModelInjectorpublic java.util.HashMap<ModelInjection,java.lang.Short> getOverrideEntries()
ModelInjector
Provide your override entry to define the model that you want to use.
The "damaged" and "damage" tag will be automatically defined by the
toolbox, you don't need to worry about them.
Note: You should at least provide an entry with a empty predicate tag that points to your basic model
getOverrideEntries in interface ModelInjector-- The base model is the original item's model, we inject a override entry so it will display the model we defined when an itemstack matches our custom item id.
public java.lang.String getDefaultTexture()
getDefaultTexture in interface ModelInjector