Full Imports and Code Format Optimization

This commit is contained in:
Kam committed 2025-03-12 20:11:39 -04:00
1 parent c22c5f9d79
commit afb5f1d645
60 files changed
+592 -509

No files matched your search

@@ -14,12 +14,14 @@ public interface IItemCustom extends IItemCustomizable {
/**
* Sets the armor type for the scripted item.
*
* @param armorType The armor type
*/
void setArmorType(int armorType);
/**
* Sets whether the scripted item is a tool.
*
* @param isTool True if the item is a tool, false otherwise
*/
void setIsTool(boolean isTool);
@@ -27,42 +29,49 @@ public interface IItemCustom extends IItemCustomizable {
/**
* Sets whether the scripted item is a normal item. Will disable
* all forms of Rotation, Translation, Scale Rendering in hand and on ground
*
* @param normalItem True if the item is a normal item, false otherwise
*/
void setIsNormalItem(boolean normalItem);
/**
* Sets the dig speed for the scripted item.
*
* @param digSpeed The dig speed
*/
void setDigSpeed(int digSpeed);
/**
* Sets the maximum stack size for the scripted item.
*
* @param maxStackSize The maximum stack size
*/
void setMaxStackSize(int maxStackSize);
/**
* Sets the current durability value for the scripted item.
*
* @param durabilityValue The durability value
*/
void setDurabilityValue(float durabilityValue);
/**
* Sets the maximum item use duration for the scripted item.
*
* @param duration The maximum item use duration
*/
void setMaxItemUseDuration(int duration);
/**
* Sets the item use action for the scripted item.
*
* @param action The item use action
*/
void setItemUseAction(int action);
/**
* Sets the enchantability for the scripted item.
*
* @param enchantability The enchantability
*/
void setEnchantability(int enchantability);
@@ -8,102 +8,119 @@ public interface IItemCustomizable extends IItemStack {
/**
* Gets the armor type for the scripted item.
*
* @return The armor type
*/
int getArmorType();
/**
* Checks if the scripted item is a tool. Allows for enchanting
*
* @return True if the item is a tool, false otherwise
*/
boolean isTool();
/**
* Checks if the scripted item is a normal item.
*
* @return True if the item is a normal item, false otherwise
*/
boolean isNormalItem();
/**
* Gets the dig speed for the scripted item.
*
* @return The dig speed
*/
int getDigSpeed();
/**
* Gets the current durability value for the scripted item.
*
* @return The durability value
*/
double getDurabilityValue();
/**
* Gets the maximum item use duration for the scripted item.
*
* @return The maximum item use duration
*/
int getMaxItemUseDuration();
/**
* Gets the item use action for the scripted item.
*
* @return The item use action
*/
int getItemUseAction();
/**
* Gets the enchantability for the scripted item.
*
* @return The enchantability
*/
int getEnchantability();
/**
* Gets the texture path for the scripted item.
*
* @return The texture path
*/
String getTexture();
/**
* Sets the texture path for the scripted item. Can be a URL
*
* @param texture The texture path
*/
void setTexture(String texture);
/**
* Checks if the durability bar should be shown for the scripted item.
*
* @return True if the durability bar should be shown, false otherwise
*/
Boolean getDurabilityShow();
/**
* Sets whether the durability bar should be shown for the scripted item.
*
* @param durabilityShow True if the durability bar should be shown, false otherwise
*/
void setDurabilityShow(Boolean durabilityShow);
/**
* Gets the color of the durability bar for the scripted item.
*
* @return The durability bar color
*/
Integer getDurabilityColor();
/**
* Sets the color of the durability bar for the scripted item.
*
* @param durabilityColor The durability bar color
*/
void setDurabilityColor(Integer durabilityColor);
/**
* Gets the color of the scripted item.
*
* @return The item color
*/
Integer getColor();
/**
* Sets the color of the scripted item.
*
* @param color The item color
*/
void setColor(Integer color);
/**
* Sets the rotation values for the scripted item.
*
* @param rotationX The X-axis rotation
* @param rotationY The Y-axis rotation
* @param rotationZ The Z-axis rotation
@@ -112,6 +129,7 @@ public interface IItemCustomizable extends IItemStack {
/**
* Sets the rotation rate values for the scripted item. Spinning Speed
*
* @param rotationXRate The X-axis rotation rate
* @param rotationYRate The Y-axis rotation rate
* @param rotationZRate The Z-axis rotation rate
@@ -120,6 +138,7 @@ public interface IItemCustomizable extends IItemStack {
/**
* Sets the scale values for the scripted item.
*
* @param scaleX The X-axis scale
* @param scaleY The Y-axis scale
* @param scaleZ The Z-axis scale
@@ -128,6 +147,7 @@ public interface IItemCustomizable extends IItemStack {
/**
* Sets the translation values for the scripted item.
*
* @param translateX The X-axis translation
* @param translateY The Y-axis translation
* @param translateZ The Z-axis translation
@@ -136,72 +156,84 @@ public interface IItemCustomizable extends IItemStack {
/**
* Gets the X-axis rotation for the scripted item.
*
* @return The X-axis rotation
*/
Float getRotationX();
/**
* Gets the Y-axis rotation for the scripted item.
*
* @return The Y-axis rotation
*/
Float getRotationY();
/**
* Gets the Z-axis rotation for the scripted item.
*
* @return The Z-axis rotation
*/
Float getRotationZ();
/**
* Gets the X-axis rotation rate for the scripted item.
*
* @return The X-axis rotation rate
*/
Float getRotationXRate();
/**
* Gets the Y-axis rotation rate for the scripted item.
*
* @return The Y-axis rotation rate
*/
Float getRotationYRate();
/**
* Gets the Z-axis rotation rate for the scripted item.
*
* @return The Z-axis rotation rate
*/
Float getRotationZRate();
/**
* Gets the X-axis scale for the scripted item.
*
* @return The X-axis scale
*/
Float getScaleX();
/**
* Gets the Y-axis scale for the scripted item.
*
* @return The Y-axis scale
*/
Float getScaleY();
/**
* Gets the Z-axis scale for the scripted item.
*
* @return The Z-axis scale
*/
Float getScaleZ();
/**
* Gets the X-axis translation for the scripted item.
*
* @return The X-axis translation
*/
Float getTranslateX();
/**
* Gets the Y-axis translation for the scripted item.
*
* @return The Y-axis translation
*/
Float getTranslateY();
/**
* Gets the Z-axis translation for the scripted item.
*
* @return The Z-axis translation
*/
Float getTranslateZ();
+1 -1
View File
@@ -4,6 +4,6 @@ import noppes.npcs.api.handler.data.ILinkedItem;
public interface IItemLinked extends IItemCustomizable {
public ILinkedItem getLinkedItem();
ILinkedItem getLinkedItem();
}
+8 -7
View File
@@ -50,7 +50,7 @@ public interface IItemStack {
void setItemDamage(int value);
/**
* @param key The key of this NBTTag
* @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);
@@ -72,9 +72,9 @@ public interface IItemStack {
boolean isEnchanted();
/**
* @since 1.7.10d
* @param id The enchantment id
* @return
* @since 1.7.10d
*/
boolean hasEnchant(int id);
@@ -97,26 +97,26 @@ public interface IItemStack {
int getMaxItemDamage();
/**
* @since 1.7.10d
* @return Returns whether this item is a book
* @since 1.7.10d
*/
boolean isWrittenBook();
/**
* @since 1.7.10d
* @return Returns the books title
* @since 1.7.10d
*/
String getBookTitle();
/**
* @since 1.7.10d
* @return Returns the books author
* @since 1.7.10d
*/
String getBookAuthor();
/**
* @since 1.7.10d
* @return If the item is a book, returns a string array with book pages
* @since 1.7.10d
*/
String[] getBookText();
@@ -131,6 +131,7 @@ public interface IItemStack {
/**
* No support is given for this method. Dont use if you dont know what you are doing.
*
* @return Minecraft ItemStack
*/
ItemStack getMCItemStack();
@@ -141,7 +142,7 @@ public interface IItemStack {
void setMCNbt(NBTTagCompound compound);
public boolean compare(IItemStack item, boolean ignoreNBT);
boolean compare(IItemStack item, boolean ignoreNBT);
boolean compare(IItemStack item, boolean ignoreDamage, boolean ignoreNBT);
}