mirror of
https://github.com/KAMKEEL/CustomNPC-Plus-API.git
synced 2026-11-17 16:55:15 +00:00
Merge branch 'refs/heads/dev' into animation-events-2
This commit is contained in:
commit
14bc09c4c8
8 files changed
+243
-18
No files matched your search
@@ -0,0 +1,37 @@
|
||||
package noppes.npcs.api.handler.data;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IAnvilRecipe {
|
||||
/**
|
||||
* Returns the unique name of this anvil recipe.
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* The XP cost per repair tick (e.g., 10 levels per tick).
|
||||
*/
|
||||
int getXpCost();
|
||||
|
||||
/**
|
||||
* The repair percentage (e.g., 0.1f repairs 10% of max damage per tick).
|
||||
*/
|
||||
float getRepairPercentage();
|
||||
|
||||
/**
|
||||
* Checks whether the provided item and repair material match this recipe.
|
||||
* @param itemToRepair the damaged item
|
||||
* @param repairMaterial the material used to repair
|
||||
* @return true if the items match the recipe requirements
|
||||
*/
|
||||
boolean matches(ItemStack itemToRepair, ItemStack repairMaterial);
|
||||
|
||||
/**
|
||||
* Returns the repaired item based on the input damaged item.
|
||||
* @param itemToRepair the input damaged item
|
||||
* @return a copy with reduced damage
|
||||
*/
|
||||
ItemStack getResult(ItemStack itemToRepair);
|
||||
|
||||
int getID();
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package noppes.npcs.api.handler.data;
|
||||
|
||||
public interface ICustomEffect {
|
||||
|
||||
int getID();
|
||||
|
||||
String getName();
|
||||
|
||||
void setMenuName(String name);
|
||||
|
||||
String getMenuName();
|
||||
|
||||
void setName(String name);
|
||||
|
||||
String getIcon();
|
||||
|
||||
void setIcon(String icon);
|
||||
|
||||
int getEveryXTick();
|
||||
|
||||
void setEveryXTick(int everyXTick);
|
||||
|
||||
int getIconX();
|
||||
|
||||
void setIconX(int iconX);
|
||||
|
||||
int getIconY();
|
||||
|
||||
void setIconY(int iconY);
|
||||
|
||||
int getWidth();
|
||||
|
||||
void setWidth(int width);
|
||||
|
||||
int getHeight();
|
||||
|
||||
void setHeight(int height);
|
||||
|
||||
boolean isLossOnDeath();
|
||||
|
||||
void setLossOnDeath(boolean lossOnDeath);
|
||||
|
||||
ICustomEffect save();
|
||||
|
||||
void setID(int id);
|
||||
|
||||
/**
|
||||
* Utilized by DBC Addon or other Addons to tell
|
||||
* which map of Effects to Match to.
|
||||
* Index: 0 - CNPC+
|
||||
* Index: 1 - DBC Addon
|
||||
*/
|
||||
int getIndex();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package noppes.npcs.api.handler.data;
|
||||
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
|
||||
public interface IPlayerEffect {
|
||||
|
||||
void kill();
|
||||
|
||||
int getId();
|
||||
|
||||
int getDuration();
|
||||
|
||||
void setDuration(int duration);
|
||||
|
||||
byte getLevel();
|
||||
|
||||
void setLevel(byte level);
|
||||
|
||||
String getName();
|
||||
|
||||
void performEffect(IPlayer player);
|
||||
|
||||
int getIndex();
|
||||
|
||||
void setIndex(int index);
|
||||
}
|
||||
Reference in new issue
Block a user