mirror of
https://github.com/KAMKEEL/CustomNPC-Plus-API.git
synced 2026-11-19 09:39:11 +00:00
Add CNPC+ Api
This commit is contained in:
1 parent
0c4db676e4
commit
95e2f9df01
109 files changed
+7308
No files matched your search
@@ -0,0 +1,7 @@
|
||||
package noppes.npcs.api.item;
|
||||
|
||||
public interface IItemArmor {
|
||||
int getArmorSlot();
|
||||
|
||||
String getArmorMaterial();
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package noppes.npcs.api.item;
|
||||
|
||||
public interface IItemBlock {
|
||||
String getBlockName();
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package noppes.npcs.api.item;
|
||||
|
||||
public interface IItemBook {
|
||||
String[] getText();
|
||||
|
||||
void setText(String[] var1);
|
||||
|
||||
String getAuthor();
|
||||
|
||||
void setAuthor(String var1);
|
||||
|
||||
String getTitle();
|
||||
|
||||
void setTitle(String var1);
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package noppes.npcs.api.item;
|
||||
|
||||
public interface IItemCustom extends IItemStack {
|
||||
|
||||
boolean getEnabled();
|
||||
|
||||
void setEnabled(boolean bo);
|
||||
|
||||
String getTexture();
|
||||
|
||||
void setTexture(String var2);
|
||||
|
||||
void setArmorType(int armorType);
|
||||
|
||||
int getArmorType();
|
||||
|
||||
void setIsTool(boolean isTool);
|
||||
|
||||
boolean isTool();
|
||||
|
||||
void setDigSpeed(int digSpeed);
|
||||
|
||||
int getDigSpeed();
|
||||
|
||||
void setMaxStackSize(int var1);
|
||||
|
||||
double getDurabilityValue();
|
||||
|
||||
void setDurabilityValue(float var1);
|
||||
|
||||
boolean getDurabilityShow();
|
||||
|
||||
void setDurabilityShow(boolean var1);
|
||||
|
||||
int getDurabilityColor();
|
||||
|
||||
void setDurabilityColor(int var1);
|
||||
|
||||
int getColor();
|
||||
|
||||
void setColor(int var1);
|
||||
|
||||
int getMaxItemUseDuration();
|
||||
|
||||
void setMaxItemUseDuration(int duration);
|
||||
|
||||
void setItemUseAction(int action);
|
||||
|
||||
int getItemUseAction();
|
||||
|
||||
int getEnchantability();
|
||||
|
||||
void setEnchantability(int enchantability);
|
||||
|
||||
void setRotation(float rotationX, float rotationY, float rotationZ);
|
||||
|
||||
void setRotationRate(float rotationXRate, float rotationYRate, float rotationZRate);
|
||||
|
||||
void setScale(float scaleX, float scaleY, float scaleZ);
|
||||
|
||||
void setTranslate(float translateX, float translateY, float translateZ);
|
||||
|
||||
float getRotationX();
|
||||
|
||||
float getRotationY();
|
||||
|
||||
float getRotationZ();
|
||||
|
||||
float getRotationXRate();
|
||||
|
||||
float getRotationYRate();
|
||||
|
||||
float getRotationZRate();
|
||||
|
||||
float getScaleX();
|
||||
|
||||
float getScaleY();
|
||||
|
||||
float getScaleZ();
|
||||
|
||||
float getTranslateX();
|
||||
|
||||
float getTranslateY();
|
||||
|
||||
float getTranslateZ();
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
package noppes.npcs.api.item;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.api.INbt;
|
||||
|
||||
public interface IItemStack {
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* @return Returns the stacksize
|
||||
*/
|
||||
int getStackSize();
|
||||
|
||||
/**
|
||||
* @return Return whether the item has a custom name
|
||||
*/
|
||||
boolean hasCustomName();
|
||||
|
||||
/**
|
||||
* @param name The custom name this item will get
|
||||
*/
|
||||
void setCustomName(String name);
|
||||
|
||||
/**
|
||||
* @return Return the ingame displayed name. This is either the item name or the custom name if it has one.
|
||||
*/
|
||||
String getDisplayName();
|
||||
|
||||
/**
|
||||
* @return Get the items ingame name. Use this incase the item ingame has custom name and you want the original name.
|
||||
*/
|
||||
String getItemName();
|
||||
|
||||
/**
|
||||
* @param size The size of the itemstack. A number between 1 and 64
|
||||
*/
|
||||
void setStackSize(int size);
|
||||
|
||||
int getMaxStackSize();
|
||||
|
||||
/**
|
||||
* @return Returns the item damage of this item. For tools this is the durability for other items the color and more.
|
||||
*/
|
||||
int getItemDamage();
|
||||
|
||||
/**
|
||||
* @param value The value to be set as item damage. For tools this is the durability for other items the color and more.
|
||||
*/
|
||||
void setItemDamage(int value);
|
||||
|
||||
/**
|
||||
* @param key The key of this NBTTag
|
||||
* @param value The value to be stored. Can be a Number or String
|
||||
*/
|
||||
void setTag(String key, Object value);
|
||||
|
||||
/**
|
||||
* @param key The key of the NBTTag
|
||||
* @return Returns whether or not the key exists
|
||||
*/
|
||||
boolean hasTag(String key);
|
||||
|
||||
/**
|
||||
* @param key The key of the NBTTag
|
||||
* @return Returns the value associated with the key. Returns null of it doesnt exist
|
||||
*/
|
||||
Object getTag(String key);
|
||||
|
||||
INbt removeTags();
|
||||
|
||||
boolean isEnchanted();
|
||||
|
||||
/**
|
||||
* @since 1.7.10d
|
||||
* @param id The enchantment id
|
||||
* @return
|
||||
*/
|
||||
boolean hasEnchant(int id);
|
||||
|
||||
void addEnchant(int id, int strength);
|
||||
|
||||
void setAttribute(String name, double value);
|
||||
|
||||
double getAttribute(String name);
|
||||
|
||||
String[] getLore();
|
||||
|
||||
boolean hasLore();
|
||||
|
||||
void setLore(String[] lore);
|
||||
|
||||
boolean hasAttribute(String name);
|
||||
|
||||
/**
|
||||
* @since 1.7.10d
|
||||
* @return Returns whether this item is a book
|
||||
*/
|
||||
boolean isWrittenBook();
|
||||
|
||||
/**
|
||||
* @since 1.7.10d
|
||||
* @return Returns the books title
|
||||
*/
|
||||
String getBookTitle();
|
||||
|
||||
/**
|
||||
* @since 1.7.10d
|
||||
* @return Returns the books author
|
||||
*/
|
||||
String getBookAuthor();
|
||||
|
||||
/**
|
||||
* @since 1.7.10d
|
||||
* @return If the item is a book, returns a string array with book pages
|
||||
*/
|
||||
String[] getBookText();
|
||||
|
||||
/**
|
||||
* @return Returns whether or not this item is a block
|
||||
*/
|
||||
boolean isBlock();
|
||||
|
||||
INbt getNbt();
|
||||
|
||||
INbt getItemNbt();
|
||||
|
||||
/**
|
||||
* No support is given for this method. Dont use if you dont know what you are doing.
|
||||
* @return Minecraft ItemStack
|
||||
*/
|
||||
ItemStack getMCItemStack();
|
||||
|
||||
NBTTagCompound getMCNbt();
|
||||
|
||||
void setMCNbt(NBTTagCompound compound);
|
||||
}
|
||||
Reference in new issue
Block a user