mirror of
https://github.com/KAMKEEL/CustomNPC-Plus-API.git
synced 2026-11-15 14:54:43 +00:00
Merge branch 'dev' into experimental
This commit is contained in:
commit
ccacd6d774
3 files changed
+246
No files matched your search
@@ -0,0 +1,132 @@
|
||||
package noppes.npcs.api.block;
|
||||
|
||||
import noppes.npcs.api.IBlock;
|
||||
import noppes.npcs.api.ITimers;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
|
||||
public interface IBlockScripted extends IBlock {
|
||||
|
||||
/**
|
||||
* @param item The item to be set as model
|
||||
*/
|
||||
void setModel(IItemStack item);
|
||||
|
||||
void setModel(String name);
|
||||
|
||||
IItemStack getModel();
|
||||
|
||||
ITimers getTimers();
|
||||
|
||||
/**
|
||||
* @param strength Sets the strength of the redstone signal (0-15)
|
||||
*/
|
||||
void setRedstonePower(int strength);
|
||||
|
||||
/**
|
||||
* @return Returns the current redstone power (0-15) this block is giving off
|
||||
*/
|
||||
int getRedstonePower();
|
||||
|
||||
void setIsLadder(boolean enabled);
|
||||
|
||||
boolean getIsLadder();
|
||||
|
||||
/**
|
||||
* @param value Sets the light value (0-15)
|
||||
*/
|
||||
void setLight(int value);
|
||||
|
||||
/**
|
||||
* @return Returns the light value (0-15)
|
||||
*/
|
||||
int getLight();
|
||||
|
||||
/**
|
||||
* @param x Scale x (0-10)
|
||||
* @param y Scale y (0-10)
|
||||
* @param z Scale z (0-10)
|
||||
*/
|
||||
void setScale(float x, float y, float z);
|
||||
|
||||
float getScaleX();
|
||||
|
||||
float getScaleY();
|
||||
|
||||
float getScaleZ();
|
||||
|
||||
/**
|
||||
* @param x Rotation x (0-359)
|
||||
* @param y Rotation y (0-359)
|
||||
* @param z Rotation z (0-359)
|
||||
*/
|
||||
void setRotation(int x, int y, int z);
|
||||
|
||||
int getRotationX();
|
||||
|
||||
int getRotationY();
|
||||
|
||||
int getRotationZ();
|
||||
|
||||
/**
|
||||
* On servers the enable-command-block option in the server.properties needs to be set to true <br>
|
||||
* Use /gamerule commandBlockOutput false/true to turn off/on command block feedback <br>
|
||||
* Setting NpcUseOpCommands to true in the CustomNPCs.cfg should allow the npc to run op commands, be warned this could be a major security risk, use at own risk <br>
|
||||
* For permission plugins the commands are run under uuid:c9c843f8-4cb1-4c82-aa61-e264291b7bd6 and name:[customnpcs]
|
||||
* @param command The command to be executed
|
||||
*/
|
||||
void executeCommand(String command);
|
||||
|
||||
boolean getIsPassible();
|
||||
|
||||
void setIsPassible(boolean bo);
|
||||
|
||||
/**
|
||||
* @return Harvesting hardness (-1 makes it unharvestable)
|
||||
*/
|
||||
float getHardness();
|
||||
|
||||
void setHardness(float hardness);
|
||||
|
||||
/**
|
||||
* @return Explosion resistance (-1 makes it unexplodable)
|
||||
*/
|
||||
float getResistance();
|
||||
|
||||
void setResistance(float resistance);
|
||||
|
||||
ITextPlane getTextPlane();
|
||||
|
||||
ITextPlane getTextPlane2();
|
||||
|
||||
ITextPlane getTextPlane3();
|
||||
|
||||
ITextPlane getTextPlane4();
|
||||
|
||||
ITextPlane getTextPlane5();
|
||||
|
||||
ITextPlane getTextPlane6();
|
||||
|
||||
void setStoredData(String key, Object value);
|
||||
|
||||
Object getStoredData(String key);
|
||||
|
||||
void removeStoredData(String key);
|
||||
|
||||
boolean hasStoredData(String key);
|
||||
|
||||
void clearStoredData();
|
||||
|
||||
String[] getStoredDataKeys();
|
||||
|
||||
void removeTempData(String key);
|
||||
|
||||
void setTempData(String key, Object value);
|
||||
|
||||
boolean hasTempData(String key);
|
||||
|
||||
Object getTempData(String key);
|
||||
|
||||
void clearTempData();
|
||||
|
||||
String[] getTempDataKeys();
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package noppes.npcs.api.block;
|
||||
|
||||
public interface ITextPlane {
|
||||
|
||||
public String getText();
|
||||
|
||||
public void setText(String text);
|
||||
|
||||
public int getRotationX();
|
||||
|
||||
public int getRotationY();
|
||||
|
||||
public int getRotationZ();
|
||||
|
||||
public void setRotationX(int x);
|
||||
|
||||
public void setRotationY(int y);
|
||||
|
||||
/**
|
||||
* @param z Default: 0.5
|
||||
*/
|
||||
public void setRotationZ(int z);
|
||||
|
||||
public float getOffsetX();
|
||||
|
||||
public float getOffsetY();
|
||||
|
||||
public float getOffsetZ();
|
||||
|
||||
public void setOffsetX(float x);
|
||||
|
||||
public void setOffsetY(float y);
|
||||
|
||||
public void setOffsetZ(float z);
|
||||
|
||||
public float getScale();
|
||||
|
||||
/**
|
||||
* @param scale Default: 1
|
||||
*/
|
||||
public void setScale(float scale);
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package noppes.npcs.api.event;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
import noppes.npcs.api.IBlock;
|
||||
import noppes.npcs.api.IPos;
|
||||
import noppes.npcs.api.entity.IEntity;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
|
||||
public interface IBlockEvent extends ICustomNPCsEvent {
|
||||
IBlock getBlock();
|
||||
@Cancelable
|
||||
interface EntityFallenUponEvent extends IBlockEvent{
|
||||
IEntity getEntity();
|
||||
float getDistanceFallen();
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
interface InteractEvent extends IBlockEvent {
|
||||
IPlayer getPlayer();
|
||||
|
||||
float getHitX();
|
||||
|
||||
float getHitY();
|
||||
|
||||
float getHitZ();
|
||||
|
||||
int getSide();
|
||||
}
|
||||
|
||||
interface RedstoneEvent extends IBlockEvent{
|
||||
int getPrevPower();
|
||||
int getPower();
|
||||
}
|
||||
interface BreakEvent extends IBlockEvent{
|
||||
|
||||
}
|
||||
@Cancelable
|
||||
interface ExplodedEvent extends IBlockEvent{
|
||||
|
||||
}
|
||||
interface RainFillEvent extends IBlockEvent{
|
||||
|
||||
}
|
||||
|
||||
interface NeighborChangedEvent extends IBlockEvent {
|
||||
IPos getChangedPos();
|
||||
}
|
||||
|
||||
interface InitEvent extends IBlockEvent{
|
||||
|
||||
}
|
||||
interface UpdateEvent extends IBlockEvent{
|
||||
|
||||
}
|
||||
|
||||
interface ClickedEvent extends IBlockEvent {
|
||||
IPlayer getPlayer();
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
interface HarvestedEvent extends IBlockEvent {
|
||||
IPlayer getPlayer();
|
||||
}
|
||||
|
||||
interface CollidedEvent extends IBlockEvent {
|
||||
IEntity getEntity();
|
||||
}
|
||||
|
||||
interface TimerEvent extends IBlockEvent {
|
||||
int getId();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user