mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 16:29:39 +00:00
Part Data Changes
Add Mermaid Legs Added Feather Tail Corrected Textures
This commit is contained in:
1 parent
21713aa33c
commit
473d4d1f02
11 files changed
+85
-14
No files matched your search
@@ -10,9 +10,9 @@ import noppes.npcs.entity.EntityCustomNpc;
|
||||
|
||||
public class GuiModelLegs extends GuiModelInterface{
|
||||
|
||||
private GuiScreen parent;
|
||||
private final String[] arrLegs = new String[]{"gui.no","Player","Player Naga","Spider","Horse","Naga", "Mermaid","Digitigrade"};
|
||||
private final String[] arrTail = new String[]{"gui.no","Player", "Player Dragon","Cat","Wolf","Horse","Dragon", "Squirrel", "Fin", "Rodent"};
|
||||
private GuiScreen parent; // 0 1 2 3 4 5 6 7 8
|
||||
private final String[] arrLegs = new String[]{"gui.no","Player","Player Naga","Spider","Horse","Naga", "Mermaid", "Mermaid 2","Digitigrade"};
|
||||
private final String[] arrTail = new String[]{"gui.no","Player", "Player Dragon","Cat","Wolf","Horse","Dragon", "Squirrel", "Fin", "Rodent", "Feather"};
|
||||
public GuiModelLegs(GuiScreen parent, EntityCustomNpc npc){
|
||||
super(npc);
|
||||
this.parent = parent;
|
||||
@@ -24,7 +24,7 @@ public class GuiModelLegs extends GuiModelInterface{
|
||||
super.initGui();
|
||||
int y = guiTop + 20;
|
||||
|
||||
addButton(new GuiNpcButton(1, guiLeft + 50, y += 22, 70, 20, arrLegs, getNagaIndex(playerdata.legParts)));
|
||||
addButton(new GuiNpcButton(1, guiLeft + 50, y += 22, 70, 20, arrLegs, getLegIndex(playerdata.legParts)));
|
||||
addLabel(new GuiNpcLabel(1, "Legs", guiLeft, y + 5, 0xFFFFFF));
|
||||
if(playerdata.legParts.type > 0)
|
||||
addButton(new GuiNpcButton(11, guiLeft + 122, y, 40, 20, playerdata.legParts.getColor()));
|
||||
@@ -35,13 +35,15 @@ public class GuiModelLegs extends GuiModelInterface{
|
||||
if(tail != null)
|
||||
addButton(new GuiNpcButton(12, guiLeft + 122, y, 40, 20, tail.getColor()));
|
||||
}
|
||||
private int getNagaIndex(ModelPartData data) {
|
||||
private int getLegIndex(ModelPartData data) {
|
||||
if(!data.playerTexture && data.type == 1)
|
||||
return 5;
|
||||
if(data.type == 4)
|
||||
return 6;
|
||||
if(data.type == 5)
|
||||
return 7;
|
||||
if(data.type == 6)
|
||||
return 8;
|
||||
return data.type + 1;
|
||||
}
|
||||
|
||||
@@ -66,6 +68,8 @@ public class GuiModelLegs extends GuiModelInterface{
|
||||
return 8;
|
||||
if(data.type == 5)
|
||||
return 9;
|
||||
if(data.type == 6)
|
||||
return 10;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -91,8 +95,10 @@ public class GuiModelLegs extends GuiModelInterface{
|
||||
data.setTexture("legs/naga1", 1);
|
||||
if(value == 5)
|
||||
data.setTexture("legs/mermaid1", 4);
|
||||
if(value == 6)
|
||||
data.setTexture("", 5);
|
||||
if(value == 6)
|
||||
data.setTexture("legs/mermaid1", 5);
|
||||
if(value == 7)
|
||||
data.setTexture("", 6);
|
||||
|
||||
initGui();
|
||||
|
||||
@@ -122,6 +128,8 @@ public class GuiModelLegs extends GuiModelInterface{
|
||||
data.setTexture("tail/fin1", 4);
|
||||
if(value == 9)
|
||||
data.setTexture("tail/rodent1", 5);
|
||||
if(value == 10)
|
||||
data.setTexture("tail/feather1", 6);
|
||||
|
||||
}
|
||||
initGui();
|
||||
|
||||
@@ -201,9 +201,10 @@ public class ModelLegs extends ModelScaleRenderer{
|
||||
naga = new ModelNagaLegs(base);
|
||||
this.addChild(naga);
|
||||
|
||||
// Add Mermaid Legs
|
||||
mermaid = new ModelMermaidLegs(base);
|
||||
|
||||
mermaid2 = new ModelMermaidLegs2(base);
|
||||
this.addChild(mermaid);
|
||||
this.addChild(mermaid2);
|
||||
|
||||
digitigrade = new ModelDigitigradeLegs(base);
|
||||
@@ -350,8 +351,8 @@ public class ModelLegs extends ModelScaleRenderer{
|
||||
spider.isHidden = part.type != 2;
|
||||
horse.isHidden = part.type != 3;
|
||||
mermaid.isHidden = part.type != 4;
|
||||
mermaid2.isHidden = part.type != 4;
|
||||
digitigrade.isHidden = part.type != 5;
|
||||
mermaid2.isHidden = part.type != 5;
|
||||
digitigrade.isHidden = part.type != 6;
|
||||
|
||||
if(!horse.isHidden){
|
||||
x = 0;
|
||||
|
||||
@@ -10,13 +10,10 @@ import net.minecraft.util.ResourceLocation;
|
||||
import noppes.npcs.ModelPartData;
|
||||
import noppes.npcs.client.ClientProxy;
|
||||
import noppes.npcs.client.model.ModelMPM;
|
||||
import noppes.npcs.client.model.part.tails.ModelDragonTail;
|
||||
import noppes.npcs.client.model.part.tails.ModelSquirrelTail;
|
||||
import noppes.npcs.client.model.part.tails.*;
|
||||
import noppes.npcs.client.model.util.ModelScaleRenderer;
|
||||
import noppes.npcs.constants.EnumAnimation;
|
||||
import noppes.npcs.entity.EntityCustomNpc;
|
||||
import noppes.npcs.client.model.part.tails.ModelRodentTail;
|
||||
import noppes.npcs.client.model.part.tails.ModelTailFin;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -30,6 +27,7 @@ public class ModelTail extends ModelScaleRenderer {
|
||||
private ModelRenderer horse;
|
||||
private ModelRenderer fin;
|
||||
private ModelRenderer rodent;
|
||||
private ModelRenderer feather;
|
||||
|
||||
private int color = 0xFFFFFF;
|
||||
|
||||
@@ -75,6 +73,8 @@ public class ModelTail extends ModelScaleRenderer {
|
||||
|
||||
this.addChild(fin = new ModelTailFin(base));
|
||||
this.addChild(rodent = new ModelRodentTail(base));
|
||||
|
||||
this.addChild(feather = new ModelFeatherTail(base));
|
||||
}
|
||||
|
||||
public void setData(EntityCustomNpc entity) {
|
||||
@@ -127,6 +127,7 @@ public class ModelTail extends ModelScaleRenderer {
|
||||
squirrel.isHidden = config.type != 3;
|
||||
fin.isHidden = config.type != 4;
|
||||
rodent.isHidden = config.type != 5;
|
||||
feather.isHidden = config.type != 6;
|
||||
if(!config.playerTexture){
|
||||
location = config.getResource();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
package noppes.npcs.client.model.part.tails;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelFeatherTail extends ModelRenderer {
|
||||
ModelRenderer feather1;
|
||||
ModelRenderer feather2;
|
||||
ModelRenderer feather3;
|
||||
ModelRenderer feather4;
|
||||
ModelRenderer feather5;
|
||||
|
||||
public ModelFeatherTail(ModelBiped base) {
|
||||
super(base);
|
||||
|
||||
int x = 56;
|
||||
int y = 16;
|
||||
|
||||
feather1 = new ModelRenderer(base, x, y);
|
||||
feather1.addBox(-1.5F, 0F, 0F, 3, 8, 0);
|
||||
feather1.setRotationPoint(1F, -0.5F, 2F);
|
||||
setRotation(feather1, 1.482807F, 0.2602503F, 0.1487144F);
|
||||
addChild(feather1);
|
||||
|
||||
feather2 = new ModelRenderer(base, x, y);
|
||||
feather2.addBox(-1.5F, 0F, 0F, 3, 8, 0);
|
||||
feather2.setRotationPoint(0F, -0.5F, 1F);
|
||||
setRotation(feather2, 1.200559F, 0.3717861F, 0.1858931F);
|
||||
addChild(feather2);
|
||||
|
||||
feather3 = new ModelRenderer(base, x, y);
|
||||
feather3.mirror = true;
|
||||
feather3.addBox(-1.5F, -0.5F, 0F, 3, 8, 0);
|
||||
feather3.setRotationPoint(-1F, 0, 2F);
|
||||
setRotation(feather3, 1.256389F, -0.4089647F, -0.4833219F);
|
||||
addChild(feather3);
|
||||
|
||||
feather4 = new ModelRenderer(base, x, y);
|
||||
feather4.addBox(-1.5F, 0F, 0F, 3, 8, 0);
|
||||
feather4.setRotationPoint(0F, -0.5F, 2F);
|
||||
setRotation(feather4, 1.786329F, 0F, 0F);
|
||||
addChild(feather4);
|
||||
|
||||
feather5 = new ModelRenderer(base, x, y);
|
||||
feather5.mirror = true;
|
||||
feather5.addBox(-1.5F, 0F, 0F, 3, 8, 0);
|
||||
feather5.setRotationPoint(-1F, -0.5F, 2F);
|
||||
setRotation(feather5, 1.570073F, -0.2602503F, -0.2230717F);
|
||||
addChild(feather5);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user