mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-25 20:24:30 +00:00
Updated interfaces to have the proper functions. Documentation will focus around them, so they'll be better organized from now on.
This commit is contained in:
1 parent
aab550cdca
commit
c2546c3f82
22 files changed
+801
-355
No files matched your search
@@ -200,6 +200,7 @@ public class ScriptEntity<T extends Entity> implements IEntity {
|
||||
entityID, entity.dimension
|
||||
);
|
||||
}
|
||||
|
||||
public void spawnParticle(ScriptParticle entityParticle) { entityParticle.spawnOnEntity(this); }
|
||||
|
||||
public int getEntityId(){
|
||||
@@ -357,6 +358,10 @@ public class ScriptEntity<T extends Entity> implements IEntity {
|
||||
this.entity.setPosition((double)((float)pos.getX() + 0.5F), (double)pos.getY(), (double)((float)pos.getZ() + 0.5F));
|
||||
}
|
||||
|
||||
public int getDimension(){
|
||||
return entity.dimension;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param range The search range for entities around this entity
|
||||
* @return Array of entities within range
|
||||
|
||||
@@ -317,6 +317,7 @@ public class ScriptNpc<T extends EntityNPCInterface> extends ScriptLiving<T> imp
|
||||
return new ScriptRoleTransporter(npc);
|
||||
return new ScriptRoleInterface(npc);
|
||||
}
|
||||
|
||||
public void setRole(int role){
|
||||
for (EnumRoleType e : EnumRoleType.values()) {
|
||||
if (e.ordinal() == role) {
|
||||
@@ -348,6 +349,7 @@ public class ScriptNpc<T extends EntityNPCInterface> extends ScriptLiving<T> imp
|
||||
return new ScriptJobSpawner(npc);
|
||||
return new ScriptJobInterface(npc);
|
||||
}
|
||||
|
||||
public void setJob(int job){
|
||||
for (EnumJobType e : EnumJobType.values()) {
|
||||
if (e.ordinal() == job) {
|
||||
|
||||
@@ -449,6 +449,7 @@ public class ScriptPlayer<T extends EntityPlayerMP> extends ScriptLivingBase<T>
|
||||
questData.checkQuestCompletion(playerData, EnumQuestType.Item);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public boolean checkGUIOpen() {
|
||||
NoppesUtilPlayer.isGUIOpen(player);
|
||||
PlayerData data = PlayerDataController.instance.getPlayerData(player);
|
||||
|
||||
Reference in new issue
Block a user