Add All new Files to Repository

This commit is contained in:
KAMKEEL committed 2021-04-27 11:56:36 -04:00
1 parent 5a90076d69
commit f9e7799c54
330 files changed
+2130 -250

No files matched your search

+2 -2
View File
@@ -32,9 +32,9 @@ import noppes.npcs.entity.EntityNPCInterface;
import cpw.mods.fml.common.network.IGuiHandler;
public class CommonProxy implements IGuiHandler {
public boolean newVersionAvailable = false;
public int revision = 4;
public int revision = 1;
public void load() {
CustomNpcs.Channel.register(new PacketHandlerServer());
+1 -1
View File
@@ -749,7 +749,7 @@ public class CustomItems {
armor = new ItemNpcArmor(26922, armorEmerald,1,"fullemerald").setUnlocalizedName("npcFullEmeraldChest").setMaxStackSize(1).setTextureName("customnpcs:npcFullEmeraldChest");
armor = new ItemNpcArmor(26923, armorEmerald,2,"fullemerald").setUnlocalizedName("npcFullEmeraldLeggings").setMaxStackSize(1).setTextureName("customnpcs:npcFullEmeraldLeggings");
armor = new ItemNpcArmor(26924, armorEmerald,3,"fullemerald").setUnlocalizedName("npcFullEmeraldBoots").setMaxStackSize(1).setTextureName("customnpcs:npcFullEmeraldBoots");
armor = new ItemNpcArmor(26880,ArmorMaterial.CLOTH,0,"fullwood").setUnlocalizedName("npcFullWoodenHead").setMaxStackSize(1).setTextureName("customnpcs:npcFullWoodenHead");
armor = new ItemNpcArmor(26881,ArmorMaterial.CLOTH,1,"fullwood").setUnlocalizedName("npcFullWoodenChest").setMaxStackSize(1).setTextureName("customnpcs:npcFullWoodenChest");
armor = new ItemNpcArmor(26882,ArmorMaterial.CLOTH,2,"fullwood").setUnlocalizedName("npcFullWoodenLeggings").setMaxStackSize(1).setTextureName("customnpcs:npcFullWoodenLeggings");
+3 -9
View File
@@ -43,15 +43,7 @@ import noppes.npcs.controllers.ServerCloneController;
import noppes.npcs.controllers.SpawnController;
import noppes.npcs.controllers.TransportController;
import noppes.npcs.enchants.EnchantInterface;
import noppes.npcs.entity.EntityChairMount;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.EntityMagicProjectile;
import noppes.npcs.entity.EntityNPCGolem;
import noppes.npcs.entity.EntityNpcCrystal;
import noppes.npcs.entity.EntityNpcDragon;
import noppes.npcs.entity.EntityNpcPony;
import noppes.npcs.entity.EntityNpcSlime;
import noppes.npcs.entity.EntityProjectile;
import noppes.npcs.entity.*;
import noppes.npcs.entity.old.EntityNPCDwarfFemale;
import noppes.npcs.entity.old.EntityNPCDwarfMale;
import noppes.npcs.entity.old.EntityNPCElfFemale;
@@ -210,6 +202,8 @@ public class CustomNpcs {
registerNpc(EntityNPCEnderman.class, "npcEnderman");
registerNpc(EntityNPCGolem.class, "npcGolem");
registerNpc(EntityCustomNpc.class, "CustomNpc");
registerNpc(EntityNPC64x64.class, "CustomNpc64");
registerNewEntity(EntityChairMount.class, "CustomNpcChairMount", 64, 10, false);
registerNewEntity(EntityProjectile.class, "throwableitem", 64, 3, true);
@@ -152,4 +152,18 @@ public class DataDisplay {
return false;
return showName == 0 || (showName == 2 && npc.isAttacking());
}
public String getSkinTexture(){
return texture;
}
public void setSkinTexture(String texture){
if(this.texture.equals(texture))
return;
this.texture = texture;
npc.textureLocation = null;
skinType = 0;
npc.updateClient = true;
}
}
@@ -14,6 +14,7 @@ import noppes.npcs.constants.EnumScriptType;
import noppes.npcs.controllers.ScriptContainer;
import noppes.npcs.controllers.ScriptController;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.EntityNPC64x64;
import noppes.npcs.entity.EntityNPCInterface;
import noppes.npcs.scripted.ScriptEvent;
import noppes.npcs.scripted.ScriptNpc;
@@ -105,19 +105,8 @@ import noppes.npcs.client.gui.roles.GuiNpcFollowerSetup;
import noppes.npcs.client.gui.roles.GuiNpcItemGiver;
import noppes.npcs.client.gui.roles.GuiNpcTraderSetup;
import noppes.npcs.client.gui.roles.GuiNpcTransporter;
import noppes.npcs.client.model.ModelNPCGolem;
import noppes.npcs.client.model.ModelNpcCrystal;
import noppes.npcs.client.model.ModelNpcDragon;
import noppes.npcs.client.model.ModelNpcSlime;
import noppes.npcs.client.model.ModelSkirtArmor;
import noppes.npcs.client.renderer.NpcItemRenderer;
import noppes.npcs.client.renderer.RenderCustomNpc;
import noppes.npcs.client.renderer.RenderNPCHumanMale;
import noppes.npcs.client.renderer.RenderNPCPony;
import noppes.npcs.client.renderer.RenderNpcCrystal;
import noppes.npcs.client.renderer.RenderNpcDragon;
import noppes.npcs.client.renderer.RenderNpcSlime;
import noppes.npcs.client.renderer.RenderProjectile;
import noppes.npcs.client.model.*;
import noppes.npcs.client.renderer.*;
import noppes.npcs.client.renderer.blocks.BlockBannerRenderer;
import noppes.npcs.client.renderer.blocks.BlockBarrelRenderer;
import noppes.npcs.client.renderer.blocks.BlockBeamRenderer;
@@ -161,14 +150,7 @@ import noppes.npcs.containers.ContainerNPCTraderSetup;
import noppes.npcs.containers.ContainerNpcItemGiver;
import noppes.npcs.containers.ContainerNpcQuestReward;
import noppes.npcs.containers.ContainerNpcQuestTypeItem;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.EntityNPCGolem;
import noppes.npcs.entity.EntityNPCInterface;
import noppes.npcs.entity.EntityNpcCrystal;
import noppes.npcs.entity.EntityNpcDragon;
import noppes.npcs.entity.EntityNpcPony;
import noppes.npcs.entity.EntityNpcSlime;
import noppes.npcs.entity.EntityProjectile;
import noppes.npcs.entity.*;
import org.lwjgl.input.Keyboard;
@@ -199,6 +181,7 @@ public class ClientProxy extends CommonProxy {
RenderingRegistry.registerEntityRenderingHandler(EntityNpcSlime.class, new RenderNpcSlime(new ModelNpcSlime(16), new ModelNpcSlime(0), 0.25F));
RenderingRegistry.registerEntityRenderingHandler(EntityProjectile.class, new RenderProjectile());
RenderingRegistry.registerEntityRenderingHandler(EntityCustomNpc.class, new RenderCustomNpc());
RenderingRegistry.registerEntityRenderingHandler(EntityNPC64x64.class, new RenderCustomNpc(1));
RenderingRegistry.registerEntityRenderingHandler(EntityNPCGolem.class, new RenderNPCHumanMale(
new ModelNPCGolem(0), new ModelNPCGolem(1F), new ModelNPCGolem(0.5F)));
FMLCommonHandler.instance().bus().register(new ClientTickHandler());
@@ -39,7 +39,7 @@ public class GuiNpcMobSpawner extends GuiNPCInterface implements IGuiData{
public GuiNpcMobSpawner(int i, int j, int k) {
super();
xSize = 256;
xSize = 384;
posX = i;
posY = j;
@@ -56,7 +56,7 @@ public class GuiNpcMobSpawner extends GuiNPCInterface implements IGuiData{
if(scroll == null){
scroll = new GuiCustomScroll(this,0);
scroll.setSize(165, 188);
scroll.setSize(293, 188);
}
else
scroll.clear();
@@ -64,7 +64,7 @@ public class GuiNpcMobSpawner extends GuiNPCInterface implements IGuiData{
scroll.guiTop = guiTop + 26;
addScroll(scroll);
addTextField(new GuiNpcTextField(1, this, fontRendererObj, guiLeft + 4, guiTop + 4, 165, 20, search));
addTextField(new GuiNpcTextField(1, this, fontRendererObj, guiLeft + 4, guiTop + 4, 293, 20, search));
GuiMenuTopButton button;
addTopButton(button = new GuiMenuTopButton(3,guiLeft + 4, guiTop - 17, "spawner.clones"));
@@ -74,28 +74,38 @@ public class GuiNpcMobSpawner extends GuiNPCInterface implements IGuiData{
addTopButton(button = new GuiMenuTopButton(5, button, "gui.server"));
button.active = showingClones == 2;
addButton(new GuiNpcButton(1, guiLeft + 170, guiTop + 6, 82, 20, "item.monsterPlacer.name"));
addButton(new GuiNpcButton(1, guiLeft + 298, guiTop + 6, 82, 20, "item.monsterPlacer.name"));
addButton(new GuiNpcButton(2, guiLeft + 170, guiTop + 100, 82, 20, "spawner.mobspawner"));
addButton(new GuiNpcButton(2, guiLeft + 298, guiTop + 100, 82, 20, "spawner.mobspawner"));
if(showingClones == 0 || showingClones == 2){
addSideButton(new GuiMenuSideButton(21,guiLeft - 69, this.guiTop + 2, 70,22, "Tab 1"));
addSideButton(new GuiMenuSideButton(22,guiLeft - 69, this.guiTop + 23, 70,22, "Tab 2"));
addSideButton(new GuiMenuSideButton(23,guiLeft - 69, this.guiTop + 44, 70,22, "Tab 3"));
addSideButton(new GuiMenuSideButton(24,guiLeft - 69, this.guiTop + 65, 70,22, "Tab 4"));
addSideButton(new GuiMenuSideButton(25,guiLeft - 69, this.guiTop + 86, 70,22, "Tab 5"));
addSideButton(new GuiMenuSideButton(26,guiLeft - 69, this.guiTop + 107, 70,22, "Tab 6"));
addSideButton(new GuiMenuSideButton(27,guiLeft - 69, this.guiTop + 128, 70,22, "Tab 7"));
addSideButton(new GuiMenuSideButton(28,guiLeft - 69, this.guiTop + 149, 70,22, "Tab 8"));
addSideButton(new GuiMenuSideButton(29,guiLeft - 69, this.guiTop + 170, 70,22, "Tab 9"));
addButton(new GuiNpcButton(6, guiLeft + 170, guiTop + 30, 82, 20, "gui.remove"));
addSideButton(new GuiMenuSideButton(21,guiLeft - 90, this.guiTop + 2, 90,22, "1"));
addSideButton(new GuiMenuSideButton(22,guiLeft - 90, this.guiTop + 23, 90,22, "2"));
addSideButton(new GuiMenuSideButton(23,guiLeft - 90, this.guiTop + 44, 90,22, "3"));
addSideButton(new GuiMenuSideButton(24,guiLeft - 90, this.guiTop + 65, 90,22, "4"));
addSideButton(new GuiMenuSideButton(25,guiLeft - 90, this.guiTop + 86, 90,22, "5"));
addSideButton(new GuiMenuSideButton(26,guiLeft - 90, this.guiTop + 107, 45,22, "6"));
addSideButton(new GuiMenuSideButton(27,guiLeft - 45, this.guiTop + 107, 45,22, "7"));
addSideButton(new GuiMenuSideButton(28,guiLeft - 90, this.guiTop + 128, 45,22, "8"));
addSideButton(new GuiMenuSideButton(29,guiLeft - 45, this.guiTop + 128, 45,22, "9"));
addSideButton(new GuiMenuSideButton(30,guiLeft - 90, this.guiTop + 149, 45,22, "10"));
addSideButton(new GuiMenuSideButton(31,guiLeft - 45, this.guiTop + 149, 45,22, "11"));
addSideButton(new GuiMenuSideButton(32,guiLeft - 90, this.guiTop + 170, 45,22, "12"));
addSideButton(new GuiMenuSideButton(33,guiLeft - 45, this.guiTop + 170, 45,22, "13"));
addSideButton(new GuiMenuSideButton(34,guiLeft - 90, this.guiTop + 191, 45,22, "14"));
addSideButton(new GuiMenuSideButton(35,guiLeft - 45, this.guiTop + 191, 45,22, "15"));
addButton(new GuiNpcButton(6, guiLeft + 298, guiTop + 190, 82, 20, "gui.remove"));
getSideButton(20 + activeTab).active = true;
showClones();
}
else
else{
showEntities();
}
}
private void showEntities() {
@@ -119,7 +129,6 @@ public class GuiNpcMobSpawner extends GuiNPCInterface implements IGuiData{
Client.sendData(EnumPacketServer.CloneList, activeTab);
return;
}
ArrayList<String> list = new ArrayList<String>();
this.list = ClientCloneController.Instance.getClones(activeTab);
scroll.setList(getSearchList());
@@ -44,7 +44,7 @@ public class GuiNpcMobSpawnerAdd extends GuiNPCInterface implements GuiYesNoCall
addLabel(new GuiNpcLabel(1, "Tab", guiLeft + 10, guiTop + 50));
addButton(new GuiNpcButton(2, guiLeft + 40, guiTop + 45, 20, 20, new String[]{"1","2","3","4","5","6","7","8","9"}, tab - 1));
addButton(new GuiNpcButton(2, guiLeft + 40, guiTop + 45, 20, 20, new String[]{"1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"}, tab - 1));
addButton(new GuiNpcButton(3, guiLeft + 4, guiTop + 95, new String[]{"Client side", "Server side"}, serverSide?1:0));
@@ -82,15 +82,21 @@ public class GuiNpcMobSpawnerMounter extends GuiNPCInterface implements IGuiData
addButton(new GuiNpcButton(2, guiLeft + 170, guiTop + 50, 82, 20, "spawner.mountplayer"));
if(showingClones == 0 || showingClones == 2){
addSideButton(new GuiMenuSideButton(21,guiLeft - 69, this.guiTop + 2, 70,22, "Tab 1"));
addSideButton(new GuiMenuSideButton(22,guiLeft - 69, this.guiTop + 23, 70,22, "Tab 2"));
addSideButton(new GuiMenuSideButton(23,guiLeft - 69, this.guiTop + 44, 70,22, "Tab 3"));
addSideButton(new GuiMenuSideButton(24,guiLeft - 69, this.guiTop + 65, 70,22, "Tab 4"));
addSideButton(new GuiMenuSideButton(25,guiLeft - 69, this.guiTop + 86, 70,22, "Tab 5"));
addSideButton(new GuiMenuSideButton(26,guiLeft - 69, this.guiTop + 107, 70,22, "Tab 6"));
addSideButton(new GuiMenuSideButton(27,guiLeft - 69, this.guiTop + 128, 70,22, "Tab 7"));
addSideButton(new GuiMenuSideButton(28,guiLeft - 69, this.guiTop + 149, 70,22, "Tab 8"));
addSideButton(new GuiMenuSideButton(29,guiLeft - 69, this.guiTop + 170, 70,22, "Tab 9"));
addSideButton(new GuiMenuSideButton(21,guiLeft - 90, this.guiTop + 2, 90,22, "1"));
addSideButton(new GuiMenuSideButton(22,guiLeft - 90, this.guiTop + 23, 90,22, "2"));
addSideButton(new GuiMenuSideButton(23,guiLeft - 90, this.guiTop + 44, 90,22, "3"));
addSideButton(new GuiMenuSideButton(24,guiLeft - 90, this.guiTop + 65, 90,22, "4"));
addSideButton(new GuiMenuSideButton(25,guiLeft - 90, this.guiTop + 86, 90,22, "5"));
addSideButton(new GuiMenuSideButton(26,guiLeft - 45, this.guiTop + 107, 45,22, "6"));
addSideButton(new GuiMenuSideButton(27,guiLeft - 90, this.guiTop + 107, 45,22, "7"));
addSideButton(new GuiMenuSideButton(28,guiLeft - 45, this.guiTop + 128, 45,22, "8"));
addSideButton(new GuiMenuSideButton(29,guiLeft - 90, this.guiTop + 128, 45,22, "9"));
addSideButton(new GuiMenuSideButton(30,guiLeft - 45, this.guiTop + 149, 45,22, "10"));
addSideButton(new GuiMenuSideButton(31,guiLeft - 90, this.guiTop + 149, 45,22, "11"));
addSideButton(new GuiMenuSideButton(32,guiLeft - 45, this.guiTop + 170, 45,22, "12"));
addSideButton(new GuiMenuSideButton(33,guiLeft - 90, this.guiTop + 170, 45,22, "13"));
addSideButton(new GuiMenuSideButton(34,guiLeft - 45, this.guiTop + 191, 45,22, "14"));
addSideButton(new GuiMenuSideButton(35,guiLeft - 90, this.guiTop + 191, 45,22, "15"));
getSideButton(20 + activeTab).active = true;
showClones();
@@ -59,16 +59,22 @@ public class GuiNpcMobSpawnerSelector extends SubGuiInterface implements IGuiDat
addButton(new GuiNpcButton(0, guiLeft + 171, guiTop + 80, 80, 20, "gui.done"));
addButton(new GuiNpcButton(1, guiLeft + 171, guiTop + 103, 80, 20, "gui.cancel"));
addSideButton(new GuiMenuSideButton(21,guiLeft - 69, this.guiTop + 2, 70,22, "Tab 1"));
addSideButton(new GuiMenuSideButton(22,guiLeft - 69, this.guiTop + 23, 70,22, "Tab 2"));
addSideButton(new GuiMenuSideButton(23,guiLeft - 69, this.guiTop + 44, 70,22, "Tab 3"));
addSideButton(new GuiMenuSideButton(24,guiLeft - 69, this.guiTop + 65, 70,22, "Tab 4"));
addSideButton(new GuiMenuSideButton(25,guiLeft - 69, this.guiTop + 86, 70,22, "Tab 5"));
addSideButton(new GuiMenuSideButton(26,guiLeft - 69, this.guiTop + 107, 70,22, "Tab 6"));
addSideButton(new GuiMenuSideButton(27,guiLeft - 69, this.guiTop + 128, 70,22, "Tab 7"));
addSideButton(new GuiMenuSideButton(28,guiLeft - 69, this.guiTop + 149, 70,22, "Tab 8"));
addSideButton(new GuiMenuSideButton(29,guiLeft - 69, this.guiTop + 170, 70,22, "Tab 9"));
addSideButton(new GuiMenuSideButton(21,guiLeft - 90, this.guiTop + 2, 90,22, "1"));
addSideButton(new GuiMenuSideButton(22,guiLeft - 90, this.guiTop + 23, 90,22, "2"));
addSideButton(new GuiMenuSideButton(23,guiLeft - 90, this.guiTop + 44, 90,22, "3"));
addSideButton(new GuiMenuSideButton(24,guiLeft - 90, this.guiTop + 65, 90,22, "4"));
addSideButton(new GuiMenuSideButton(25,guiLeft - 90, this.guiTop + 86, 90,22, "5"));
addSideButton(new GuiMenuSideButton(26,guiLeft - 45, this.guiTop + 107, 45,22, "6"));
addSideButton(new GuiMenuSideButton(27,guiLeft - 90, this.guiTop + 107, 45,22, "7"));
addSideButton(new GuiMenuSideButton(28,guiLeft - 45, this.guiTop + 128, 45,22, "8"));
addSideButton(new GuiMenuSideButton(29,guiLeft - 90, this.guiTop + 128, 45,22, "9"));
addSideButton(new GuiMenuSideButton(30,guiLeft - 45, this.guiTop + 149, 45,22, "10"));
addSideButton(new GuiMenuSideButton(31,guiLeft - 90, this.guiTop + 149, 45,22, "11"));
addSideButton(new GuiMenuSideButton(32,guiLeft - 45, this.guiTop + 170, 45,22, "12"));
addSideButton(new GuiMenuSideButton(33,guiLeft - 90, this.guiTop + 170, 45,22, "13"));
addSideButton(new GuiMenuSideButton(34,guiLeft - 45, this.guiTop + 191, 45,22, "14"));
addSideButton(new GuiMenuSideButton(35,guiLeft - 90, this.guiTop + 191, 45,22, "15"));
getSideButton(20 + activeTab).active = true;
showClones();
@@ -32,6 +32,7 @@ import noppes.npcs.constants.EnumPacketServer;
import noppes.npcs.controllers.PixelmonHelper;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.EntityFakeLiving;
import noppes.npcs.entity.EntityNPC64x64;
import noppes.npcs.entity.EntityNPCInterface;
public class GuiCreationScreen extends GuiModelInterface implements ICustomScrollListener{
@@ -61,7 +62,8 @@ public class GuiCreationScreen extends GuiModelInterface implements ICustomScrol
e.printStackTrace();
} catch (NoSuchMethodException e) {
}
}
}
data.put("NPC64", EntityNPC64x64.class);
list = new ArrayList<String>(data.keySet());
Collections.sort(list,String.CASE_INSENSITIVE_ORDER);
}
@@ -11,10 +11,12 @@ import noppes.npcs.entity.EntityCustomNpc;
public class GuiModelBody extends GuiModelInterface{
private GuiScreen parent;
private final String[] arrWing = new String[]{"gui.no","Player","Type1","Type2","Type3"};
private final String[] arrWing = new String[]{"gui.no","Player","Type1","Type2","Type3","Type4","Type5","Type6","Type7","Type8","Type9",
"Type10","Type11","Type12","Type13"};
private final String[] arrBreasts = new String[]{"gui.no","Type1","Type2","Type3"};
private final String[] arrParticles = new String[]{"gui.no","Player","Type1","Type2", "Rainbow"};
private final String[] arrfins = new String[]{"gui.no","Player","Type1"};
private final String[] arrfins = new String[]{"gui.no","Player","Type1","Type2","Type3","Type4","Type5","Type6"};
private final String[] arrskirt = new String[]{"gui.no","Player","Type1"};
public GuiModelBody(GuiScreen parent, EntityCustomNpc npc){
super(npc);
@@ -47,15 +49,48 @@ public class GuiModelBody extends GuiModelInterface{
if(fin != null)
addButton(new GuiNpcButton(13, guiLeft + 122, y, 40, 20, fin.getColor()));
ModelPartData skirt = playerdata.getPartData("skirt");
addButton(new GuiNpcButton(4, guiLeft + 50, y += 22, 70, 20, arrskirt, getSkirtindex(skirt)));
addLabel(new GuiNpcLabel(4, "Skirt", guiLeft, y + 5, 0xFFFFFF));
if(skirt != null)
addButton(new GuiNpcButton(14, guiLeft + 122, y, 40, 20, skirt.getColor()));
}
private int getFinIndex(ModelPartData fin) {
if(fin == null)
return 0;
return fin.playerTexture?1:2;
if(fin == null)
return 0;
if(fin.type == 0){
if(fin.playerTexture)
return 1;
if(fin.texture.contains("1"))
return 2;
if(fin.texture.contains("2"))
return 3;
if(fin.texture.contains("3"))
return 4;
if(fin.texture.contains("4"))
return 5;
if(fin.texture.contains("5"))
return 6;
if(fin.texture.contains("6"))
return 7;
}
return 0;
}
private int getSkirtindex(ModelPartData skirt) {
if (skirt == null)
return 0;
if (skirt.type == 0) {
if (skirt.playerTexture)
return 1;
if (skirt.texture.contains("1"))
return 2;
}
return 0;
}
private int getParticleIndex(ModelPartData particles) {
if(particles == null)
return 0;
@@ -110,19 +145,44 @@ public class GuiModelBody extends GuiModelInterface{
initGui();
}
if(button.id == 3){
int value = button.getValue();
if(value == 0)
playerdata.removePart("fin");
else{
ModelPartData particles = playerdata.getOrCreatePart("fin");
if(value == 1)
particles.setTexture("", 0);
if(value == 2)
particles.setTexture("fin/fin1", 0);
}
initGui();
int value = button.getValue();
if(value == 0)
playerdata.removePart("fin");
else{
ModelPartData particles = playerdata.getOrCreatePart("fin");
if(value == 1)
particles.setTexture("", 0);
if(value == 2)
particles.setTexture("fin/fin1", 0);
if(value == 3)
particles.setTexture("fin/fin2", 0);
if(value == 4)
particles.setTexture("fin/fin3", 0);
if(value == 5)
particles.setTexture("fin/fin4", 0);
if(value == 6)
particles.setTexture("fin/fin5", 0);
if(value == 7)
particles.setTexture("fin/fin6", 0);
}
initGui();
}
if(button.id == 4){
int value = button.getValue();
if(value == 0)
playerdata.removePart("skirt");
else{
ModelPartData particles = playerdata.getOrCreatePart("skirt");
if(value == 1)
particles.setTexture("", 0);
if(value == 2)
particles.setTexture("skirt/skirt1", 0);
}
initGui();
}
if(button.id == 11){
this.mc.displayGuiScreen(new GuiModelColor(this, playerdata.getPartData("wings"), npc));
}
@@ -132,6 +192,9 @@ public class GuiModelBody extends GuiModelInterface{
if(button.id == 13){
this.mc.displayGuiScreen(new GuiModelColor(this, playerdata.getPartData("fin"), npc));
}
if(button.id == 14){
this.mc.displayGuiScreen(new GuiModelColor(this, playerdata.getPartData("skirt"), npc));
}
}
@Override
@@ -15,11 +15,12 @@ public class GuiModelHead extends GuiModelInterface{
private final String[] arrHeadwear = new String[]{"gui.no","gui.yes","Solid"};
private final String[] arrHair = new String[]{"gui.no","Player","Long","Thin","Stylish","Ponytail"};
private final String[] arrBeard = new String[]{"gui.no","Player","Standard","Viking","Long","Short"};
private final String[] arrMohawk = new String[]{"gui.no","Type1"};
private final String[] arrSnout = new String[]{"gui.no","Player Small","Player Medium", "Player Large", "Player Bunny",
"Small1", "Medium1", "Large1", "Bunny1"};
private final String[] arrMohawk = new String[]{"gui.no","Type1","Type2","Type3"};
private final String[] arrSnout = new String[]{"gui.no","Player Small","Player Medium", "Player Large", "Player Bunny",
"Small1", "Medium1", "Large1", "Bunny1", "Beak1"};
private final String[] arrEars = new String[]{"gui.no","Player","Player Bunny","Bunny","Type1"};
private final String[] arrHorns = new String[]{"gui.no", "Player Bull", "Player Antlers", "Player AntennasB", "Player AntennasF", "Bull", "Antlers", "AntennasB", "AntennasF" };
public GuiModelHead(GuiScreen parent, EntityCustomNpc npc){
super(npc);
this.parent = parent;
@@ -28,42 +29,49 @@ public class GuiModelHead extends GuiModelInterface{
@Override
public void initGui() {
super.initGui();
super.initGui();
int y = guiTop + 20;
addButton(new GuiNpcButton(0, guiLeft + 50, y += 22, 70, 20, arrHeadwear, playerdata.headwear));
addButton(new GuiNpcButton(0, guiLeft + 50, y += 22, 70, 20, arrHeadwear, playerdata.headwear));
addLabel(new GuiNpcLabel(0, "Headwear", guiLeft, y + 5, 0xFFFFFF));
ModelPartData hair = playerdata.getPartData("hair");
addButton(new GuiNpcButton(1, guiLeft + 50, y += 22, 70, 20, arrHair, hair == null?0:hair.type + 1));
addButton(new GuiNpcButton(1, guiLeft + 50, y += 22, 70, 20, arrHair, hair == null ? 0 : hair.type + 1));
addLabel(new GuiNpcLabel(1, "Hair", guiLeft, y + 5, 0xFFFFFF));
if(hair != null)
if (hair != null)
addButton(new GuiNpcButton(11, guiLeft + 122, y, 40, 20, hair.getColor()));
ModelPartData mohawk = playerdata.getPartData("mohawk");
addButton(new GuiNpcButton(2, guiLeft + 50, y += 22, 70, 20, arrMohawk, mohawk == null?0:mohawk.type));
addButton(new GuiNpcButton(2, guiLeft + 50, y += 22, 70, 20, arrMohawk, mohawk == null ? 0 : mohawk.type));
addLabel(new GuiNpcLabel(2, "Mohawk", guiLeft, y + 5, 0xFFFFFF));
if(mohawk != null)
if (mohawk != null)
addButton(new GuiNpcButton(12, guiLeft + 122, y, 40, 20, mohawk.getColor()));
ModelPartData beard = playerdata.getPartData("beard");
addButton(new GuiNpcButton(3, guiLeft + 50, y += 22, 70, 20, arrBeard, beard == null?0:beard.type + 1));
addButton(new GuiNpcButton(3, guiLeft + 50, y += 22, 70, 20, arrBeard, beard == null ? 0 : beard.type + 1));
addLabel(new GuiNpcLabel(3, "Beard", guiLeft, y + 5, 0xFFFFFF));
if(beard != null)
if (beard != null)
addButton(new GuiNpcButton(13, guiLeft + 122, y, 40, 20, beard.getColor()));
ModelPartData snout = playerdata.getPartData("snout");
addButton(new GuiNpcButton(4, guiLeft + 50, y += 22, 70, 20, arrSnout, snout == null?0:snout.type + (snout.playerTexture?1:5)));
addButton(new GuiNpcButton(4, guiLeft + 50, y += 22, 70, 20, arrSnout, snout == null ? 0 : snout.type + (snout.playerTexture ? 1 : 5)));
addLabel(new GuiNpcLabel(4, "Snout", guiLeft, y + 5, 0xFFFFFF));
if(snout != null)
if (snout != null)
addButton(new GuiNpcButton(14, guiLeft + 122, y, 40, 20, snout.getColor()));
ModelPartData ears = playerdata.getPartData("ears");
addButton(new GuiNpcButton(5, guiLeft + 50, y += 22, 70, 20, arrEars, getEars(ears)));
addButton(new GuiNpcButton(5, guiLeft + 50, y += 22, 70, 20, arrEars, getEars(ears)));
addLabel(new GuiNpcLabel(5, "Ears", guiLeft, y + 5, 0xFFFFFF));
if(ears != null)
if (ears != null)
addButton(new GuiNpcButton(15, guiLeft + 122, y, 40, 20, ears.getColor()));
ModelPartData horns = playerdata.getPartData("horns");
y += 22;addButton(new GuiNpcButton(6, guiLeft + 50, y, 70, 20, arrHorns, getHorns(horns)));
addLabel(new GuiNpcLabel(6, "Horns", guiLeft, y + 5, 16777215));
if (horns != null) {
addButton(new GuiNpcButton(16, guiLeft + 122, y, 40, 20, horns.getColor()));
}
}
@@ -82,6 +90,15 @@ public class GuiModelHead extends GuiModelInterface{
return 0;
}
private int getHorns(ModelPartData data) {
if (data == null)
return 0;
if (data.playerTexture) {
return data.type + 1;
}
return data.type + 5;
}
@Override
protected void actionPerformed(GuiButton btn) {
super.actionPerformed(btn);
@@ -124,26 +141,28 @@ public class GuiModelHead extends GuiModelInterface{
initGui();
}
if(button.id == 4){
if(button.getValue() == 0)
playerdata.removePart("snout");
else if(button.getValue() < 5){
ModelPartData data = playerdata.getOrCreatePart("snout");
data.type = (byte) (button.getValue() - 1);
}
else{
ModelPartData data = playerdata.getOrCreatePart("snout");
byte type = 0;
if(button.displayString.startsWith("Medium"))
type = 1;
if(button.displayString.startsWith("Large"))
type = 2;
if(button.displayString.startsWith("Bunny"))
type = 3;
data.setTexture("snout/" + button.displayString.toLowerCase(), type);
}
initGui();
}
if(button.id == 4){
if(button.getValue() == 0)
playerdata.removePart("snout");
else if(button.getValue() < 5){
ModelPartData data = playerdata.getOrCreatePart("snout");
data.type = (byte) (button.getValue() - 1);
}
else{
ModelPartData data = playerdata.getOrCreatePart("snout");
byte type = 0;
if(button.displayString.startsWith("Medium"))
type = 1;
if(button.displayString.startsWith("Large"))
type = 2;
if(button.displayString.startsWith("Bunny"))
type = 3;
if(button.displayString.startsWith("Beak"))
type = 4;
data.setTexture("snout/" + button.displayString.toLowerCase(), type);
}
initGui();
}
if(button.id == 5){
int value = button.getValue();
@@ -163,6 +182,26 @@ public class GuiModelHead extends GuiModelInterface{
initGui();
}
if(button.id == 6){
int value = button.getValue();
if(value == 0)
playerdata.removePart("horns");
else{
ModelPartData data = playerdata.getOrCreatePart("horns");
if(value <= 4)
data.setTexture("", value - 1);
if(value == 5)
data.setTexture("horns/bull", 0);
if(value == 6)
data.setTexture("horns/antlers", 1);
if(value == 7)
data.setTexture("horns/antennas", 2);
if(value == 8)
data.setTexture("horns/antennas", 3);
}
initGui();
}
if(button.id == 11){
this.mc.displayGuiScreen(new GuiModelColor(this, playerdata.getPartData("hair"), npc));
}
@@ -178,6 +217,9 @@ public class GuiModelHead extends GuiModelInterface{
if(button.id == 15){
this.mc.displayGuiScreen(new GuiModelColor(this, playerdata.getPartData("ears"), npc));
}
if(button.id == 16){
this.mc.displayGuiScreen(new GuiModelColor(this, playerdata.getPartData("horns"), npc));
}
}
@Override
@@ -12,7 +12,7 @@ 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"};
private final String[] arrTail = new String[]{"gui.no","Player", "Player Dragon","Cat","Wolf","Horse","Dragon", "Squirrel", "Fin", "Rodent"};
public GuiModelLegs(GuiScreen parent, EntityCustomNpc npc){
super(npc);
this.parent = parent;
@@ -46,22 +46,26 @@ public class GuiModelLegs extends GuiModelInterface{
}
private int getTailIndex(ModelPartData data){
if(data == null)
return 0;
if(data.playerTexture && data.type == 0)
return 1;
if(data.type == 0 && data.texture.contains("tail1"))
return 3;
if(data.type == 0 && data.texture.contains("tail2"))
return 4;
if(data.playerTexture && data.type == 1)
return 2;
if(data.type == 1)
return 6;
if(data.type == 2)
return 5;
if(data.type == 3)
return 7;
if(data == null)
return 0;
if(data.playerTexture && data.type == 0)
return 1;
if(data.type == 0 && data.texture.contains("tail1"))
return 3;
if(data.type == 0 && data.texture.contains("tail2"))
return 4;
if(data.playerTexture && data.type == 1)
return 2;
if(data.type == 1)
return 6;
if(data.type == 2)
return 5;
if(data.type == 3)
return 7;
if(data.type == 4)
return 8;
if(data.type == 5)
return 9;
return 0;
}
@@ -94,30 +98,34 @@ public class GuiModelLegs extends GuiModelInterface{
}
if(button.id == 2){
if(button.id == 2){
int value = button.getValue();
if(value == 0)
playerdata.removePart("tail");
else{
ModelPartData data = playerdata.getOrCreatePart("tail");
if(value == 1)
data.setTexture("", 0);
if(value == 2)
data.setTexture("", 1);
if(value == 3)
data.setTexture("tail/tail1", 0);
if(value == 4)
data.setTexture("tail/tail2", 0);
if(value == 5)
data.setTexture("tail/horse1", 2);
if(value == 6)
data.setTexture("tail/dragon1", 1);
if(value == 7)
data.setTexture("tail/squirrel1", 3);
}
initGui();
}
if(value == 0)
playerdata.removePart("tail");
else{
ModelPartData data = playerdata.getOrCreatePart("tail");
if(value == 1)
data.setTexture("", 0);
if(value == 2)
data.setTexture("", 1);
if(value == 3)
data.setTexture("tail/tail1", 0);
if(value == 4)
data.setTexture("tail/tail2", 0);
if(value == 5)
data.setTexture("tail/horse1", 2);
if(value == 6)
data.setTexture("tail/dragon1", 1);
if(value == 7)
data.setTexture("tail/squirrel1", 3);
if(value == 8)
data.setTexture("tail/fin1", 4);
if(value == 9)
data.setTexture("tail/rodent1", 5);
}
initGui();
}
if(button.id == 11){
this.mc.displayGuiScreen(new GuiModelColor(this, playerdata.legParts, npc));
}
@@ -23,6 +23,14 @@ public class GuiNpcSlider extends GuiButton {
if(parent instanceof ISliderListener)
listener = (ISliderListener) parent;
}
public GuiNpcSlider(GuiScreen parent, int id, int xPos, int yPos, int width, int height, String displayString, float sliderValue) {
super(id, xPos, yPos, width, height, NoppesStringUtils.translate(displayString));
this.id = id;
this.sliderValue = sliderValue;
if(parent instanceof ISliderListener)
listener = (ISliderListener) parent;
}
public GuiNpcSlider(GuiScreen parent, int id, int xPos, int yPos, float sliderValue) {
this(parent, id, xPos, yPos, "", sliderValue);
@@ -32,6 +32,8 @@ import noppes.npcs.constants.EnumAnimation;
import noppes.npcs.constants.EnumJobType;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.roles.JobPuppet;
import noppes.npcs.client.model.part.ModelHorns;
import noppes.npcs.client.model.part.ModelSkirt;
import org.lwjgl.opengl.GL11;
@@ -44,6 +46,8 @@ public class ModelMPM extends ModelNPCMale{
private ModelPartInterface snout;
private ModelPartInterface ears;
private ModelPartInterface fin;
private ModelPartInterface skirt;
private ModelPartInterface horns;
private ModelPartInterface clawsR;
private ModelPartInterface clawsL;
@@ -94,40 +98,26 @@ public class ModelMPM extends ModelNPCMale{
headwear = new ModelHeadwear(this);
legs = new ModelLegs(this, (ModelScaleRenderer)bipedRightLeg, (ModelScaleRenderer)bipedLeftLeg);
breasts = new ModelBreasts(this);
this.bipedBody.addChild(breasts);
if(!isArmor){
ears = new ModelEars(this);
this.bipedHead.addChild(ears);
mohawk = new ModelMohawk(this);
this.bipedHead.addChild(mohawk);
hair = new ModelHair(this);
this.bipedHead.addChild(hair);
beard = new ModelBeard(this);
this.bipedHead.addChild(beard);
snout = new ModelSnout(this);
this.bipedHead.addChild(snout);
tail = new ModelTail(this);
wings = new ModelWings(this);
this.bipedBody.addChild(wings);
fin = new ModelFin(this);
this.bipedBody.addChild(fin);
clawsL = new ModelClaws(this, false);
this.bipedLeftArm.addChild(clawsL);
clawsR = new ModelClaws(this, true);
this.bipedRightArm.addChild(clawsR);
}
}
this.bipedBody.addChild(breasts = new ModelBreasts(this));
if(!isArmor){
this.bipedHead.addChild(ears = new ModelEars(this));
this.bipedHead.addChild(mohawk = new ModelMohawk(this));
this.bipedHead.addChild(hair = new ModelHair(this));
this.bipedHead.addChild(beard = new ModelBeard(this));
this.bipedHead.addChild(snout = new ModelSnout(this));
this.bipedHead.addChild(horns = new ModelHorns(this));
tail = new ModelTail(this);
this.bipedBody.addChild(wings = new ModelWings(this));
this.bipedBody.addChild(skirt = new ModelSkirt(this));
this.bipedBody.addChild(fin = new ModelFin(this));
this.bipedLeftArm.addChild(clawsL = new ModelClaws(this, false));
this.bipedRightArm.addChild(clawsR = new ModelClaws(this, true));
}
}
private void setPlayerData(EntityCustomNpc entity){
if(!isArmor){
@@ -141,6 +131,8 @@ public class ModelMPM extends ModelNPCMale{
ears.setData(entity.modelData, entity);
clawsL.setData(entity.modelData, entity);
clawsR.setData(entity.modelData, entity);
skirt.setData(entity.modelData, entity);
horns.setData(entity.modelData, entity);
}
breasts.setData(entity.modelData, entity);
legs.setData(entity);
@@ -263,6 +255,7 @@ public class ModelMPM extends ModelNPCMale{
beard.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
wings.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
tail.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
skirt.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
}
legs.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
@@ -0,0 +1,31 @@
package noppes.npcs.client.model;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.MathHelper;
import noppes.npcs.ModelPartConfig;
import noppes.npcs.ModelPartData;
import noppes.npcs.client.ClientProxy;
import noppes.npcs.client.model.animation.AniCrawling;
import noppes.npcs.client.model.animation.AniHug;
import noppes.npcs.client.model.part.*;
import noppes.npcs.client.model.util.ModelPartInterface;
import noppes.npcs.client.model.util.ModelScaleRenderer;
import noppes.npcs.constants.EnumAnimation;
import noppes.npcs.constants.EnumJobType;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.roles.JobPuppet;
import org.lwjgl.opengl.GL11;
import java.util.Random;
public class ModelMPM64 extends ModelMPM{
public ModelMPM64(float par1) {
super(par1);
}
}
@@ -0,0 +1,78 @@
package noppes.npcs.client.model.part;
import org.lwjgl.opengl.GL11;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import noppes.npcs.client.model.ModelMPM;
import noppes.npcs.client.model.util.ModelPartInterface;
public class ModelDuckBeak extends ModelRenderer {
ModelRenderer Top3;
ModelRenderer Top2;
ModelRenderer Bottom;
ModelRenderer Left;
ModelRenderer Right;
ModelRenderer Middle;
ModelRenderer Top;
public ModelDuckBeak(ModelMPM base) {
super(base);
Top3 = new ModelRenderer(base, 14, 0);
Top3.addBox(0F, 0F, 0F, 2, 1, 3);
Top3.setRotationPoint(-1F, -2F, -5F);
setRotation(Top3, 0.3346075F, 0F, 0F);
addChild(Top3);
Top2 = new ModelRenderer(base, 0, 0);
Top2.addBox(0F, 0F, -0.4F, 4, 1, 3);
Top2.setRotationPoint(-2F, -3F, -2F);
setRotation(Top2, 0.3346075F, 0F, 0F);
addChild(Top2);
Bottom = new ModelRenderer(base, 24, 0);
Bottom.addBox(0F, 0F, 0F, 2, 1, 5);
Bottom.setRotationPoint(-1F, -1F, -5F);
addChild(Bottom);
Left = new ModelRenderer(base, 0, 4);
Left.mirror = true;
Left.addBox(0F, 0F, 0F, 1, 3, 2);
Left.setRotationPoint(0.98F, -3F, -2F);
addChild(Left);
Right = new ModelRenderer(base, 0, 4);
Right.addBox(0F, 0F, 0F, 1, 3, 2);
Right.setRotationPoint(-1.98F, -3F, -2F);
addChild(Right);
Middle = new ModelRenderer(base, 3, 0);
Middle.addBox(0F, 0F, 0F, 2, 1, 3);
Middle.setRotationPoint(-1F, -2F, -5F);
addChild(Middle);
Top = new ModelRenderer(base, 6, 4);
Top.addBox(0F, 0F, 0F, 2, 2, 1);
Top.setRotationPoint(-1F, -4.4F, -1F);
addChild(Top);
}
@Override
public void render(float f)
{
GL11.glPushMatrix();
GL11.glTranslatef(0, 0, -1f * f);
GL11.glScalef(0.82f, 0.82f, 0.70f);
super.render(f);
GL11.glPopMatrix();
}
private void setRotation(ModelRenderer model, float x, float y, float z) {
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
}
@@ -13,7 +13,7 @@ public class ModelFin extends ModelPartInterface {
public ModelFin(ModelMPM base) {
super(base);
model = new Model2DRenderer(base, 56, 20, 8, 12, 64, 32);
model = new Model2DRenderer(base, 48, 8, 16, 24, 64, 32);
model.setRotationPoint(-0.5F, 12, 10);
model.setScale(0.74f);
model.rotateAngleY = (float)Math.PI / 2;
@@ -0,0 +1,58 @@
package noppes.npcs.client.model.part;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
import noppes.npcs.ModelPartData;
import noppes.npcs.ModelData;
import noppes.npcs.client.model.ModelMPM;
import noppes.npcs.client.model.util.ModelPartInterface;
import noppes.npcs.client.model.part.horns.ModelAntennasBack;
import noppes.npcs.client.model.part.horns.ModelAntennasFront;
import noppes.npcs.client.model.part.horns.ModelAntlerHorns;
import noppes.npcs.client.model.part.horns.ModelBullHorns;
public class ModelHorns extends ModelPartInterface {
private ModelRenderer bull;
private ModelRenderer antlers;
private ModelRenderer antennasBack;
private ModelRenderer antennasFront;
public ModelHorns(ModelMPM base) {
super(base);
this.addChild(bull = new ModelBullHorns(base));
this.addChild(antlers = new ModelAntlerHorns(base));
this.addChild(antennasBack = new ModelAntennasBack(base));
this.addChild(antennasFront = new ModelAntennasFront(base));
}
@Override
public void setRotationAngles(float par1, float par2, float par3,
float par4, float par5, float par6, Entity entity) {
}
@Override
public void initData(ModelData data) {
ModelPartData config = data.getPartData("horns");
if(config == null)
{
isHidden = true;
return;
}
color = config.color;
isHidden = false;
bull.isHidden = config.type != 0;
antlers.isHidden = config.type != 1;
antennasBack.isHidden = config.type != 2;
antennasFront.isHidden = config.type != 3;
if(!config.playerTexture){
location = config.getResource();
}
else
location = null;
}
}
@@ -12,6 +12,7 @@ import noppes.npcs.client.ClientProxy;
import noppes.npcs.client.model.ModelMPM;
import noppes.npcs.client.model.part.legs.ModelDigitigradeLegs;
import noppes.npcs.client.model.part.legs.ModelMermaidLegs;
import noppes.npcs.client.model.part.legs.ModelMermaidLegs2;
import noppes.npcs.client.model.part.legs.ModelNagaLegs;
import noppes.npcs.client.model.util.ModelScaleRenderer;
import noppes.npcs.constants.EnumAnimation;
@@ -27,6 +28,7 @@ public class ModelLegs extends ModelScaleRenderer{
private ModelNagaLegs naga;
private ModelDigitigradeLegs digitigrade;
private ModelMermaidLegs mermaid;
private ModelMermaidLegs2 mermaid2;
private ModelRenderer spiderLeg1;
private ModelRenderer spiderLeg2;
@@ -200,7 +202,9 @@ public class ModelLegs extends ModelScaleRenderer{
this.addChild(naga);
mermaid = new ModelMermaidLegs(base);
this.addChild(mermaid);
mermaid2 = new ModelMermaidLegs2(base);
this.addChild(mermaid2);
digitigrade = new ModelDigitigradeLegs(base);
this.addChild(digitigrade);
@@ -297,8 +301,17 @@ public class ModelLegs extends ModelScaleRenderer{
naga.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
}
else if(part.type == 4){
mermaid.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
}
mermaid.isRiding = base.isRiding;
mermaid.isSleeping = base.isSleeping(entity);
mermaid.isCrawling = this.entity.currentAnimation == EnumAnimation.CRAWLING;
mermaid.isSneaking = base.isSneak;
mermaid2.isRiding = base.isRiding;
mermaid2.isSleeping = base.isSleeping(entity);
mermaid2.isCrawling = this.entity.currentAnimation == EnumAnimation.CRAWLING;
mermaid2.isSneaking = base.isSneak;
mermaid.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
mermaid2.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
}
else if(part.type == 5){
digitigrade.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
}
@@ -314,7 +327,7 @@ public class ModelLegs extends ModelScaleRenderer{
return;
GL11.glPushMatrix();
if(part.type == 4)
part.playerTexture = !entity.isInWater();
part.playerTexture = false;
if(!base.isArmor){
if(!part.playerTexture){
ClientProxy.bindTexture(part.getResource());
@@ -325,18 +338,19 @@ public class ModelLegs extends ModelScaleRenderer{
base.currentlyPlayerTexture = true;
}
}
if(part.type == 0 || part.type == 4 && !entity.isInWater()){
leg1.setConfig(config, x, y, z);
leg1.render(par1);
leg2.setConfig(config, -x, y, z);
leg2.render(par1);
}
if(part.type == 0){
leg1.setConfig(config, x, y, z);
leg1.render(par1);
leg2.setConfig(config, -x, y, z);
leg2.render(par1);
}
if(!base.isArmor){
naga.isHidden = part.type != 1;
spider.isHidden = part.type != 2;
horse.isHidden = part.type != 3;
mermaid.isHidden = part.type != 4 || !entity.isInWater();
mermaid.isHidden = part.type != 4;
mermaid2.isHidden = part.type != 4;
digitigrade.isHidden = part.type != 5;
if(!horse.isHidden){
@@ -0,0 +1,72 @@
package noppes.npcs.client.model.part;
import java.util.List;
import org.lwjgl.opengl.GL11;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import noppes.npcs.ModelData;
import noppes.npcs.ModelPartData;
import noppes.npcs.client.model.ModelMPM;
import noppes.npcs.client.model.util.ModelPartInterface;
import noppes.npcs.client.model.util.ModelPlane;
import noppes.npcs.client.model.util.ModelPlaneRenderer;
public class ModelSkirt extends ModelPartInterface {
private ModelPlaneRenderer Shape1;
public ModelSkirt(ModelMPM base) {
super(base);
float pi = (float) (Math.PI / 5);
Shape1 = new ModelPlaneRenderer(base, 58, 18);
Shape1.addSidePlane(0, 0, 0, 9, 2);
ModelPlaneRenderer part1 = new ModelPlaneRenderer(base, 58, 18);
part1.addSidePlane(2, 0, 0, 9, 2);
part1.rotateAngleY = -(float) (Math.PI/2);
Shape1.addChild(part1);
Shape1.setRotationPoint(2.4F, 8.8F, 0F);
setRotation(Shape1, 0.3F, -0.2f, -0.2F);
}
public void render(float par1)
{
if (this.isHidden || !this.showModel)
return;
GL11.glPushMatrix();
GL11.glScalef(1.7f, 1.04f, 1.6f);
super.render(par1);
GL11.glPopMatrix();
}
public void renderParts(float par1) {
for(int i = 0; i < 10; i++){
GL11.glRotatef(36, 0, 1, 0);
Shape1.render(par1);
}
}
public void setRotationAngles(float par1, float par2, float par3,
float par4, float par5, float par6, Entity entity) {
setRotation(Shape1, 0.3F, -0.2f, -0.2F);
Shape1.rotateAngleX += base.bipedLeftArm.rotateAngleX * 0.04f;
Shape1.rotateAngleZ += base.bipedLeftArm.rotateAngleX * 0.06f;
//this.Shape1.rotateAngleX -= MathHelper.sin(par3 * 0.067F) * 0.05F;
this.Shape1.rotateAngleZ -= MathHelper.cos(par3 * 0.09F) * 0.04F - 0.05F;
}
@Override
public void initData(ModelData data) {
ModelPartData config = data.getPartData("skirt");
if(config == null)
{
isHidden = true;
return;
}
color = config.color;
isHidden = false;
location = (ResourceLocation) config.getResource();
}
}
@@ -13,6 +13,7 @@ public class ModelSnout extends ModelPartInterface {
private ModelRenderer medium;
private ModelRenderer large;
private ModelRenderer bunny;
private ModelRenderer beak;
public ModelSnout(ModelMPM base) {
super(base);
@@ -41,6 +42,10 @@ public class ModelSnout extends ModelPartInterface {
tooth.addBox(2F, 3f, 0F, 2, 1, 1);
tooth.setRotationPoint(0F, 0F, 0F);
bunny.addChild(tooth);
beak = new ModelDuckBeak(base);
beak.setRotationPoint(0, 0, -4F);
this.addChild(beak);
}
@Override
@@ -64,6 +69,7 @@ public class ModelSnout extends ModelPartInterface {
medium.isHidden = config.type != 1;
large.isHidden = config.type != 2;
bunny.isHidden = config.type != 3;
beak.isHidden = config.type != 4;
if(!config.playerTexture){
location = config.getResource();
@@ -15,6 +15,8 @@ import noppes.npcs.client.model.part.tails.ModelSquirrelTail;
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;
@@ -26,6 +28,8 @@ public class ModelTail extends ModelScaleRenderer {
private ModelRenderer dragon;
private ModelRenderer squirrel;
private ModelRenderer horse;
private ModelRenderer fin;
private ModelRenderer rodent;
private int color = 0xFFFFFF;
@@ -68,6 +72,9 @@ public class ModelTail extends ModelScaleRenderer {
this.addChild(dragon = new ModelDragonTail(base));
this.addChild(squirrel = new ModelSquirrelTail(base));
this.addChild(fin = new ModelTailFin(base));
this.addChild(rodent = new ModelRodentTail(base));
}
public void setData(EntityCustomNpc entity) {
@@ -118,6 +125,8 @@ public class ModelTail extends ModelScaleRenderer {
dragon.isHidden = config.type != 1;
horse.isHidden = config.type != 2;
squirrel.isHidden = config.type != 3;
fin.isHidden = config.type != 4;
rodent.isHidden = config.type != 5;
if(!config.playerTexture){
location = config.getResource();
}
@@ -17,14 +17,14 @@ public class ModelWings extends ModelPartInterface {
public ModelWings(ModelMPM base) {
super(base);
lWing = new Model2DRenderer(base, 56, 16, 8, 16, 64, 32);
lWing = new Model2DRenderer(base, 48, 32, 16, 32, 64, 32);
lWing.mirror = true;
lWing.setRotationPoint(2F, 4, 2F);
lWing.setRotationOffset(-16, -12);
setRotation(lWing, 0.7141593F, -0.5235988F, -0.5090659F);
this.addChild(lWing);
rWing = new Model2DRenderer(base, 56, 16, 8, 16, 64, 32);
rWing = new Model2DRenderer(base, 48, 32, 16, 32, 64, 32);
rWing.setRotationPoint(-2F, 4F, 2F);
rWing.setRotationOffset(-16, -12);
setRotation(rWing, 0.7141593F, 0.5235988F, 0.5090659F);
@@ -0,0 +1,44 @@
package noppes.npcs.client.model.part.horns;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import noppes.npcs.client.model.ModelMPM;
public class ModelAntennasBack extends ModelRenderer {
public ModelAntennasBack(ModelMPM base) {
super(base);
ModelRenderer rightantenna1 = new ModelRenderer(base, 36, 0);
rightantenna1.addBox(-1F, 0F, 0F, 1, 4, 1);
rightantenna1.setRotationPoint(3F, -10.9F, 0F);
setRotation(rightantenna1, -0.7504916F, 0.0698132F, 0.0698132F);
addChild(rightantenna1);
ModelRenderer leftantenna1 = new ModelRenderer(base, 32, 0);
leftantenna1.mirror = true;
leftantenna1.addBox(0F, 0F, 0F, 1, 4, 1);
leftantenna1.setRotationPoint(-3F, -10.9F, 0F);
setRotation(leftantenna1, -0.7504916F, -0.0698132F, -0.0698132F);
addChild(leftantenna1);
ModelRenderer rightantenna2 = new ModelRenderer(base, 36, 0);
rightantenna2.addBox(-1F, 0F, 0F, 1, 4, 1);
rightantenna2.setRotationPoint(4.6F, -12.2F, 3.4F);
setRotation(rightantenna2, -1.22173F, 0.4363323F, 0.0698132F);
addChild(rightantenna2);
ModelRenderer leftantenna2 = new ModelRenderer(base, 32, 0);
leftantenna2.mirror = true;
leftantenna2.addBox(0F, 0F, 0F, 1, 4, 1);
leftantenna2.setRotationPoint(-4.6F, -12.2F, 3.4F);
setRotation(leftantenna2, -1.22173F, -0.4363323F, -0.0698132F);
addChild(leftantenna2);
}
private void setRotation(ModelRenderer model, float x, float y, float z) {
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
}
@@ -0,0 +1,44 @@
package noppes.npcs.client.model.part.horns;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import noppes.npcs.client.model.ModelMPM;
public class ModelAntennasFront extends ModelRenderer {
public ModelAntennasFront(ModelMPM base) {
super(base);
ModelRenderer rightantenna1 = new ModelRenderer(base, 36, 0);
rightantenna1.addBox(0F, 0F, 0F, 1, 4, 1);
rightantenna1.setRotationPoint(2F, -9.4F, -2F);
setRotation(rightantenna1, 0.4014257F, 0.0698132F, 0.0698132F);
addChild(rightantenna1);
ModelRenderer leftantenna1 = new ModelRenderer(base, 32, 0);
leftantenna1.mirror = true;
leftantenna1.addBox(-1F, 0F, 0F, 1, 4, 1);
leftantenna1.setRotationPoint(-2F, -9.4F, -2F);
setRotation(leftantenna1, 0.4014257F, -0.0698132F, -0.0698132F);
addChild(leftantenna1);
ModelRenderer rightantenna2 = new ModelRenderer(base, 36, 0);
rightantenna2.addBox(0F, 0F, 0F, 1, 4, 1);
rightantenna2.setRotationPoint(3F, -10.2F, -5.3F);
setRotation(rightantenna2, 1.22173F, -0.2094395F, 0.0698132F);
addChild(rightantenna2);
ModelRenderer leftantenna2 = new ModelRenderer(base, 32, 0);
leftantenna2.mirror = true;
leftantenna2.addBox(-1F, 0F, 0F, 1, 4, 1);
leftantenna2.setRotationPoint(-3F, -10.2F, -5.3F);
setRotation(leftantenna2, 1.22173F, 0.2094395F, -0.0698132F);
addChild(leftantenna2);
}
private void setRotation(ModelRenderer model, float x, float y, float z) {
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
}
@@ -0,0 +1,70 @@
package noppes.npcs.client.model.part.horns;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import noppes.npcs.client.model.ModelMPM;
public class ModelAntlerHorns extends ModelRenderer {
public ModelAntlerHorns(ModelMPM base) {
super(base);
ModelRenderer right_base_horn = new ModelRenderer(base, 58, 20);
right_base_horn.addBox(0F, -5F, 0F, 1, 6, 1);
right_base_horn.setRotationPoint(-2.5F, -6F, -1F);
setRotation(right_base_horn, 0F, 0F, -0.2F);
addChild(right_base_horn);
ModelRenderer right_horn1 = new ModelRenderer(base, 58, 20);
right_horn1.addBox(0F, -5F, 0F, 1, 5, 1);
right_horn1.setRotationPoint(0F, -4F, 0F);
setRotation(right_horn1, 1F, 0F, -1F);
right_base_horn.addChild(right_horn1);
ModelRenderer right_horn2 = new ModelRenderer(base, 58, 20);
right_horn2.addBox(0F, -4F, 0F, 1, 5, 1);
right_horn2.setRotationPoint(-0F, -6F, -0F);
setRotation(right_horn2, -0.5F, -0.5F, 0F);
right_base_horn.addChild(right_horn2);
ModelRenderer things1 = new ModelRenderer(base, 58, 20);
things1.addBox(0F, -5F, 0F, 1, 5, 1);
things1.setRotationPoint(0F, -3F, 1F);
setRotation(things1, 2F, 0.5f, 0.5f);
right_horn2.addChild(things1);
ModelRenderer things2 = new ModelRenderer(base, 58, 20);
things2.addBox(0F, -5F, 0F, 1, 5, 1);
things2.setRotationPoint(0F, -3F, 1F);
setRotation(things2, 2F, -0.5f, -0.5f);
right_horn2.addChild(things2);
ModelRenderer left_base_horn = new ModelRenderer(base, 58, 20);
left_base_horn.addBox(0F, -5F, 0F, 1, 6, 1);
left_base_horn.setRotationPoint(1.5F, -6F, -1F);
setRotation(left_base_horn, 0F, 0F, 0.2F);
addChild(left_base_horn);
ModelRenderer left_horn1 = new ModelRenderer(base, 58, 20);
left_horn1.addBox(0F, -5F, 0F, 1, 5, 1);
left_horn1.setRotationPoint(0F, -5F, 0F);
setRotation(left_horn1, 1F, 0F, 1F);
left_base_horn.addChild(left_horn1);
ModelRenderer left_horn2 = new ModelRenderer(base, 58, 20);
left_horn2.addBox(0F, -4F, 0F, 1, 5, 1);
left_horn2.setRotationPoint(0F, -6F, 1F);
setRotation(left_horn2, -0.5F, 0.5F, 0F);
left_base_horn.addChild(left_horn2);
ModelRenderer things8 = new ModelRenderer(base, 58, 20);
things8.addBox(0F, -5F, 0F, 1, 5, 1);
things8.setRotationPoint(0F, -3F, 1F);
setRotation(things8, 2F, -0.5f, -0.5f);
left_horn2.addChild(things8);
ModelRenderer things4 = new ModelRenderer(base, 58, 20);
things4.addBox(0F, -5F, 0F, 1, 5, 1);
things4.setRotationPoint(0F, -3F, 1F);
setRotation(things4, 2F, 0.5f, 0.5f);
left_horn2.addChild(things4);
}
private void setRotation(ModelRenderer model, float x, float y, float z) {
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
}
@@ -0,0 +1,55 @@
package noppes.npcs.client.model.part.horns;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import noppes.npcs.client.model.ModelMPM;
public class ModelBullHorns extends ModelRenderer {
public ModelBullHorns(ModelMPM base) {
super(base);
ModelRenderer Left1 = new ModelRenderer(base, 36, 16);
Left1.mirror = true;
Left1.addBox(0F, 0F, 0F, 2, 2, 2);
Left1.setRotationPoint(4F, -8F, -2F);
addChild(Left1);
ModelRenderer Right1 = new ModelRenderer(base, 36, 16);
Right1.addBox(-3F, 0F, 0F, 2, 2, 2);
Right1.setRotationPoint(-3F, -8F, -2F);
addChild(Right1);
ModelRenderer Left2 = new ModelRenderer(base, 12, 16);
Left2.mirror = true;
Left2.addBox(0F, 0F, 0F, 2, 2, 2);
Left2.setRotationPoint(5F, -8F, -2F);
setRotation(Left2, 0.0371786F, 0.3346075F, -0.2602503F);
addChild(Left2);
ModelRenderer Right2 = new ModelRenderer(base, 12, 16);
Right2.addBox(-2F, 0F, 0F, 2, 2, 2);
Right2.setRotationPoint(-5F, -8F, -2F);
setRotation(Right2, 0.0371786F, -0.3346075F, 0.2602503F);
addChild(Right2);
ModelRenderer Left3 = new ModelRenderer(base, 13, 17);
Left3.mirror = true;
Left3.addBox(-1F, 0F, 0F, 2, 1, 1);
Left3.setRotationPoint(7F, -8F, -2F);
setRotation(Left3, 0.2602503F, 0.8551081F, -0.4089647F);
addChild(Left3);
ModelRenderer Right3 = new ModelRenderer(base, 13, 17);
Right3.addBox(-1F, 0F, 0F, 2, 1, 1);
Right3.setRotationPoint(-7F, -8F, -2F);
setRotation(Right3, -0.2602503F, -0.8551081F, 0.4089647F);
addChild(Right3);
}
private void setRotation(ModelRenderer model, float x, float y, float z) {
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
}
@@ -4,6 +4,11 @@ import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.util.MathHelper;
import noppes.npcs.CustomNpcs;
import noppes.npcs.ModelData;
import noppes.npcs.constants.EnumAnimation;
import noppes.npcs.entity.EntityNPCInterface;
import noppes.npcs.entity.EntityCustomNpc;
public class ModelMermaidLegs extends ModelRenderer {
@@ -13,42 +18,47 @@ public class ModelMermaidLegs extends ModelRenderer {
ModelRenderer fin1;
ModelRenderer fin2;
public boolean isRiding = false;
public boolean isSneaking = false;
public boolean isSleeping = false;
public boolean isCrawling = false;
public ModelMermaidLegs(ModelBase base) {
super(base);
textureWidth = 64;
textureHeight = 32;
super(base);
textureWidth = 64;
textureHeight = 32;
top = new ModelRenderer(base, 0, 16);
top.addBox(-2F, -2.5F, -2F, 8, 9, 4);
top.setRotationPoint(-2F, 14F, 1F);
setRotation(top, 0.26F, 0F, 0F);
top = new ModelRenderer(base, 0, 16);
top.addBox(-2F, -2.5F, -2F, 8, 9, 4);
top.setRotationPoint(-2F, 14F, 1F);
setRotation(top, 0.26F, 0F, 0F);
middle = new ModelRenderer(base, 28, 0);
middle.addBox(0F, 0F, 0F, 7, 6, 4);
middle.setRotationPoint(-1.5F, 6.5F, -1F);
setRotation(middle, 0.86f, 0F, 0F);
top.addChild(middle);
middle = new ModelRenderer(base, 28, 0);
middle.addBox(0F, 0F, 0F, 7, 6, 4);
middle.setRotationPoint(-1.5F, 6.5F, -1F);
setRotation(middle, 0.86f, 0F, 0F);
top.addChild(middle);
bottom = new ModelRenderer(base, 24, 16);
bottom.addBox(0F, 0F, 0F, 6, 7, 3);
bottom.setRotationPoint(0.5F, 6F, 0.5f);
setRotation(bottom, 0.15f, 0F, 0F);
middle.addChild(bottom);
bottom = new ModelRenderer(base, 24, 16);
bottom.addBox(0F, 0F, 0F, 6, 7, 3);
bottom.setRotationPoint(0.5F, 6F, 0.5f);
setRotation(bottom, 0.15f, 0F, 0F);
middle.addChild(bottom);
fin1 = new ModelRenderer(base, 0, 0);
fin1.addBox(0F, 0F, 0F, 5, 9, 1);
fin1.setRotationPoint(0F, 4.5F, 1F);
setRotation(fin1, 0.05f, 0, 0.5911399F);
bottom.addChild(fin1);
fin2 = new ModelRenderer(base, 0, 0);
fin2.mirror = true;
fin2.addBox(-5F, 0F, 0F, 5, 9, 1);
fin2.setRotationPoint(6F, 4.5F, 1F);
setRotation(fin2, 0.05f, 0, -0.591143F);
bottom.addChild(fin2);
fin1 = new ModelRenderer(base, 0, 0);
fin1.addBox(0F, 0F, 0F, 5, 9, 1);
fin1.setRotationPoint(0F, 4.5F, 1F);
setRotation(fin1, 0.05f, 0, 0.5911399F);
bottom.addChild(fin1);
}
fin2 = new ModelRenderer(base, 0, 0);
fin2.mirror = true;
fin2.addBox(-5F, 0F, 0F, 5, 9, 1);
fin2.setRotationPoint(6F, 4.5F, 1F);
setRotation(fin2, 0.05f, 0, -0.591143F);
bottom.addChild(fin2);
}
@Override
public void render(float f5) {
@@ -66,12 +76,21 @@ public class ModelMermaidLegs extends ModelRenderer {
public void setRotationAngles(float par1, float par2, float par3,
float par4, float par5, float par6, Entity entity) {
float ani = MathHelper.sin(par1 * 0.6662F);
top.setRotationPoint(-2F, 14F, 1F);
if(ani > 0.2)
ani /= 3f;
top.rotateAngleX = 0.26F - ani * 0.2F * par2;
middle.rotateAngleX = 0.86f - ani * 0.24F * par2;
bottom.rotateAngleX = 0.15f - ani * 0.28F * par2;
fin2.rotateAngleX = fin1.rotateAngleX = 0.05f - ani * 0.35F * par2;
if(this.isSleeping || this.isCrawling){
top.rotateAngleX = middle.rotateAngleX = bottom.rotateAngleX = fin2.rotateAngleX = 0;
}
else{
top.rotateAngleX = 0.26F - ani * 0.2F * par2;
middle.rotateAngleX = 0.86f - ani * 0.24F * par2;
bottom.rotateAngleX = 0.15f - ani * 0.28F * par2;
fin2.rotateAngleX = fin1.rotateAngleX = 0.05f - ani * 0.35F * par2;
if(entity.isSneaking()){
top.setRotationPoint(-2F, 12F, 6F);
}
}
}
}
@@ -0,0 +1,114 @@
package noppes.npcs.client.model.part.legs;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.util.MathHelper;
import noppes.npcs.ModelData;
import noppes.npcs.constants.EnumAnimation;
public class ModelMermaidLegs2 extends ModelRenderer {
ModelRenderer Tail1;
ModelRenderer Tail2;
ModelRenderer Tail3;
ModelRenderer Tail4;
ModelRenderer Tail5;
ModelRenderer Tail6;
ModelRenderer Tail7;
ModelRenderer Tail8;
public boolean isRiding = false;
public boolean isSneaking = false;
public boolean isSleeping = false;
public boolean isCrawling = false;
public ModelMermaidLegs2(ModelBase base) {
super(base);
textureWidth = 64;
textureHeight = 32;
Tail1 = new ModelRenderer(base, 0, 18);
Tail1.addBox(0F, 0F, 0F, 8, 6, 4);
Tail1.setRotationPoint(-4F, 12F, -2F);
setRotation(Tail1, 0.075F, 0F, 0F);
Tail2 = new ModelRenderer(base, 0, 18);
Tail2.addBox(0F, 0F, 0F, 6, 5, 3);
Tail2.setRotationPoint(1F, 5.5F, 0.3F);
setRotation(Tail2, 0.56F, 0F, 0F);
Tail1.addChild(Tail2);
Tail3 = new ModelRenderer(base, 0, 18);
Tail3.addBox(0F, 0F, 0F, 5, 5, 2);
Tail3.setRotationPoint(5.5F, 4F, 2.5F);
setRotation(Tail3, -0.37818F, 3.141593F, 0F);
Tail2.addChild(Tail3);
Tail4 = new ModelRenderer(base, 0, 20);
Tail4.addBox(0F, 0F, 0F, 4, 3, 1);
Tail4.setRotationPoint(0.5F, 4.5F, 0.5F);
setRotation(Tail4, -0.1f, 0, 0F);
Tail3.addChild(Tail4);
Tail5 = new ModelRenderer(base, 0, 20);
Tail5.addBox(0F, 0F, 0F, 1, 3, 1);
Tail5.setRotationPoint(-1F, 1.5F, 0F);
setRotation(Tail5, 0, 0, 0F);
Tail4.addChild(Tail5);
Tail6 = new ModelRenderer(base, 0, 20);
Tail6.addBox(0F, 0F, 0F, 1, 3, 1);
Tail6.setRotationPoint(-2F, 3F, 0F);
setRotation(Tail6, 0, 0, 0F);
Tail4.addChild(Tail6);
Tail7 = new ModelRenderer(base, 0, 20);
Tail7.addBox(0F, 0F, 0F, 1, 3, 1);
Tail7.setRotationPoint(4F, 1.5F, 0F);
setRotation(Tail7, 0, 0, 0F);
Tail4.addChild(Tail7);
Tail8 = new ModelRenderer(base, 0, 20);
Tail8.addBox(0F, 0F, 0F, 1, 3, 1);
Tail8.setRotationPoint(5F, 3F, 0F);
setRotation(Tail8, 0, 0, 0F);
Tail4.addChild(Tail8);
}
@Override
public void render(float f5) {
if (isHidden || !showModel)
return;
Tail1.render(f5);
}
private void setRotation(ModelRenderer model, float x, float y, float z) {
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6,
Entity entity) {
Tail1.setRotationPoint(-4F, 12F, -2F);
float ani = MathHelper.sin(par1 * 0.6662F);
if (ani > 0.2)
ani /= 3f;
if(this.isSleeping || this.isCrawling){
Tail1.rotateAngleX = Tail2.rotateAngleX = Tail3.rotateAngleX = Tail4.rotateAngleX = 0;
}
else{
Tail1.rotateAngleX = 0.2F - ani * 0.2F * par2;
Tail2.rotateAngleX = 0.56F - ani * 0.24F * par2;
Tail3.rotateAngleX = -0.4F + ani * 0.24F * par2;
Tail4.rotateAngleX = -0.1f + ani * 0.10F * par2;
if(entity.isSneaking()){
Tail1.setRotationPoint(-4F, 10F, 3F);
}
}
}
}
@@ -0,0 +1,32 @@
package noppes.npcs.client.model.part.tails;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import noppes.npcs.client.model.ModelMPM;
public class ModelRodentTail extends ModelRenderer {
ModelRenderer Shape1;
ModelRenderer Shape2;
public ModelRodentTail(ModelMPM base) {
super(base);
Shape1 = new ModelRenderer(base, 0, 0);
Shape1.addBox(-0.5333334F, -0.4666667F, -1F, 1, 1, 6);
Shape1.setRotationPoint(0F, 0F, 2F);
setRotation(Shape1, -0.9294653F, 0F, 0F);
addChild(Shape1);
Shape2 = new ModelRenderer(base, 1, 1);
Shape2.addBox(-0.5F, -0.1666667F, 1F, 1, 1, 5);
Shape2.setRotationPoint(0F, 3F, 4F);
setRotation(Shape2, -0.4833219F, 0F, 0F);
addChild(Shape2);
}
private void setRotation(ModelRenderer model, float x, float y, float z) {
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
}
@@ -0,0 +1,44 @@
package noppes.npcs.client.model.part.tails;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import noppes.npcs.client.model.ModelMPM;
public class ModelTailFin extends ModelRenderer {
public ModelTailFin(ModelMPM base) {
super(base);
ModelRenderer Shape1 = new ModelRenderer(base, 0, 0);
Shape1.addBox(-2F, -2F, -2F, 3, 3, 8);
Shape1.setRotationPoint(0.5F, 0F, 1F);
setRotation(Shape1, -0.669215F, 0F, 0F);
addChild(Shape1);
ModelRenderer Shape2 = new ModelRenderer(base, 2, 2);
Shape2.addBox(-1F, -1F, 1F, 3, 2, 6);
Shape2.setRotationPoint(-0.5F, 3F, 4.5F);
setRotation(Shape2, -0.2602503F, 0F, 0F);
addChild(Shape2);
ModelRenderer Shape3 = new ModelRenderer(base, 0, 11);
Shape3.addBox(-1F, -1F, -1F, 3, 1, 6);
Shape3.setRotationPoint(0.5F, 5F, 12F);
setRotation(Shape3, 0F, 1.07818F, 0F);
addChild(Shape3);
ModelRenderer Shape4 = new ModelRenderer(base, 0, 11);
Shape4.mirror = true;
Shape4.addBox(-2F, 0F, -1F, 3, 1, 6);
Shape4.setRotationPoint(-0.5F, 4F, 12F);
setRotation(Shape4, 0F, -1.003822F, 0F);
addChild(Shape4);
}
private void setRotation(ModelRenderer model, float x, float y, float z) {
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
}
@@ -10,6 +10,7 @@ import net.minecraft.entity.EntityList;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import noppes.npcs.client.model.ModelMPM;
import noppes.npcs.client.model.ModelMPM64;
import noppes.npcs.client.model.util.ModelRenderPassHelper;
import noppes.npcs.controllers.PixelmonHelper;
import noppes.npcs.entity.EntityCustomNpc;
@@ -23,11 +24,15 @@ public class RenderCustomNpc extends RenderNPCHumanMale{
private EntityLivingBase entity;
private ModelRenderPassHelper renderpass = new ModelRenderPassHelper();
public RenderCustomNpc() {
super(new ModelMPM(0), new ModelMPM(1), new ModelMPM(0.5f));
}
public RenderCustomNpc(int i) {
super(new ModelMPM64(0), new ModelMPM64(1), new ModelMPM64(0.5f));
}
@Override
public void renderPlayer(EntityNPCInterface npcInterface, double d, double d1, double d2, float f, float f1){
EntityCustomNpc npc = (EntityCustomNpc) npcInterface;
@@ -0,0 +1,18 @@
package noppes.npcs.entity;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import noppes.npcs.CustomNpcs;
import noppes.npcs.ModelData;
import noppes.npcs.ModelPartData;
import noppes.npcs.client.EntityUtil;
public class EntityNPC64x64 extends EntityCustomNpc{
public EntityNPC64x64(World world) {
super(world);
display.setSkinTexture("customnpcs:textures/entity/humanmale/Steve64x32.png");
}
}
@@ -21,6 +21,7 @@ public class ItemNpcWeaponInterface extends ItemSword implements ItemRenderInter
CustomNpcs.proxy.registerItem(this);
setCreativeTab(CustomItems.tabWeapon);
}
public void renderSpecial(){
GL11.glScalef(0.66f, 0.66f,0.66f);
GL11.glTranslatef(0.16f, 0.26f, 0.06f);