Create Dev Branch

Add Scripting for ModelType
This commit is contained in:
KAMKEEL committed 2021-05-08 03:51:29 -04:00
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