mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-11 23:07:37 +00:00
Create Dev Branch
Add Scripting for ModelType
This commit is contained in:
1 parent
b9ede60c59
commit
2262639182
2 files changed
+20
No files matched your search
@@ -57,6 +57,25 @@ public class ScriptNpc extends ScriptLiving{
|
||||
npc.display.modelSize = size;
|
||||
npc.script.clientNeedsUpdate = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the current npcs modelType of the NPC
|
||||
*/
|
||||
public int getModelType(){
|
||||
return npc.display.modelType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param modelType The modelType of the NPC. 0: Steve, 1: Steve64, 2: Alex
|
||||
*/
|
||||
public void setModelType(int modelType){
|
||||
if(modelType > 2)
|
||||
modelType = 2;
|
||||
else if(modelType < 0)
|
||||
modelType = 0;
|
||||
npc.display.modelType = modelType;
|
||||
npc.script.clientNeedsUpdate = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The npcs name
|
||||
|
||||
Reference in new issue
Block a user