mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 03:47:27 +00:00
Merge branch 'dev'
This commit is contained in:
commit
0608068276
3 files changed
+23
No files matched your search
@@ -38,6 +38,7 @@ public class RenderNPCHumanMale extends RenderNPCInterface
|
||||
protected ModelNPCMale modelArmorChestplate;
|
||||
protected ModelNPCMale modelArmor;
|
||||
|
||||
protected final ModelNPCMale originalBipedMain;
|
||||
protected final ModelMPM steve = new ModelMPM(0, false);
|
||||
protected final ModelMPM alex = new ModelMPM(0, true);
|
||||
|
||||
@@ -45,6 +46,7 @@ public class RenderNPCHumanMale extends RenderNPCInterface
|
||||
{
|
||||
super(mainmodel, 0.5F);
|
||||
modelBipedMain = mainmodel;
|
||||
originalBipedMain = mainmodel;
|
||||
modelArmorChestplate = armorChest;
|
||||
modelArmor = armor;
|
||||
}
|
||||
@@ -132,6 +134,7 @@ public class RenderNPCHumanMale extends RenderNPCInterface
|
||||
((EntityCustomNpc) npc).modelData.armwear = 0;
|
||||
((EntityCustomNpc) npc).modelData.legwear = 0;
|
||||
this.mainModel = originalModel;
|
||||
this.modelBipedMain = originalBipedMain;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1699,6 +1699,7 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
|
||||
{
|
||||
return this.display.modelType;
|
||||
}
|
||||
|
||||
public void setModelType(int val)
|
||||
{
|
||||
this.display.modelType = val;
|
||||
|
||||
@@ -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