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,40 @@
|
||||
package noppes.npcs.api.overlay;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ICustomOverlay {
|
||||
int getID();
|
||||
|
||||
List<ICustomOverlayComponent> getComponents();
|
||||
|
||||
int getDefaultAlignment();
|
||||
|
||||
void setDefaultAlignment(int defaultAlignment);
|
||||
|
||||
IOverlayTexturedRect addTexturedRect(int id, String texture, int x, int y, int width, int height);
|
||||
|
||||
IOverlayTexturedRect addTexturedRect(int id, String texture, int x, int y, int width, int height, int textureX, int textureY);
|
||||
|
||||
IOverlayLabel addLabel(int id, String label, int x, int y, int width, int height);
|
||||
|
||||
IOverlayLabel addLabel(int id, String label, int x, int y, int width, int height, int color);
|
||||
|
||||
IOverlayLine addLine(int id, int x1, int y1, int x2, int y2, int color, int thickness);
|
||||
|
||||
IOverlayLine addLine(int id, int x1, int y1, int x2, int y2);
|
||||
|
||||
ICustomOverlayComponent getComponent(int componentID);
|
||||
|
||||
void removeComponent(int componentID);
|
||||
|
||||
void updateComponent(ICustomOverlayComponent component);
|
||||
|
||||
void update(IPlayer player);
|
||||
|
||||
ICustomOverlay fromNBT(NBTTagCompound tag);
|
||||
|
||||
NBTTagCompound toNBT();
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package noppes.npcs.api.overlay;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public interface ICustomOverlayComponent {
|
||||
int getID();
|
||||
|
||||
ICustomOverlayComponent setID(int id);
|
||||
|
||||
int getPosX();
|
||||
|
||||
int getPosY();
|
||||
|
||||
ICustomOverlayComponent setPos(int x, int y);
|
||||
|
||||
int getAlignment();
|
||||
|
||||
void setAlignment(int alignment);
|
||||
|
||||
int getColor();
|
||||
|
||||
ICustomOverlayComponent setColor(int color);
|
||||
|
||||
float getAlpha();
|
||||
|
||||
void setAlpha(float alpha);
|
||||
|
||||
float getRotation();
|
||||
|
||||
void setRotation(float rotation);
|
||||
|
||||
NBTTagCompound toNBT(NBTTagCompound nbt);
|
||||
|
||||
ICustomOverlayComponent fromNBT(NBTTagCompound nbt);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package noppes.npcs.api.overlay;
|
||||
|
||||
public interface IOverlayLabel extends ICustomOverlayComponent {
|
||||
String getText();
|
||||
|
||||
IOverlayLabel setText(String var1);
|
||||
|
||||
int getWidth();
|
||||
|
||||
int getHeight();
|
||||
|
||||
IOverlayLabel setSize(int var1, int var2);
|
||||
|
||||
float getScale();
|
||||
|
||||
IOverlayLabel setScale(float var1);
|
||||
|
||||
boolean getShadow();
|
||||
|
||||
void setShadow(boolean shadow);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package noppes.npcs.api.overlay;
|
||||
|
||||
public interface IOverlayLine extends ICustomOverlayComponent {
|
||||
int getX1();
|
||||
int getY1();
|
||||
int getX2();
|
||||
int getY2();
|
||||
int getThickness();
|
||||
|
||||
void setX1(int x1);
|
||||
void setY1(int y1);
|
||||
void setX2(int x2);
|
||||
void setY2(int y2);
|
||||
void setThickness(int thickness);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package noppes.npcs.api.overlay;
|
||||
|
||||
public interface IOverlayTexturedRect extends ICustomOverlayComponent {
|
||||
String getTexture();
|
||||
|
||||
IOverlayTexturedRect setTexture(String var1);
|
||||
|
||||
int getWidth();
|
||||
|
||||
int getHeight();
|
||||
|
||||
IOverlayTexturedRect setSize(int var1, int var2);
|
||||
|
||||
float getScale();
|
||||
|
||||
IOverlayTexturedRect setScale(float var1);
|
||||
|
||||
int getTextureX();
|
||||
|
||||
int getTextureY();
|
||||
|
||||
IOverlayTexturedRect setTextureOffset(int var1, int var2);
|
||||
}
|
||||
Reference in new issue
Block a user