Added MarkovNameGenerator, Added Disable Body Part Feature

Two New Features >>

+ Added Markov Name Generate
+ Corrected Hide Body Parts
This commit is contained in:
KAMKEEL committed 2021-06-13 19:26:00 -04:00
1 parent f155ef2481
commit 3a36be0ae4
47 files changed
+14517 -93

No files matched your search

+21 -6
View File
@@ -7,11 +7,7 @@ import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerAboutToStartEvent;
import cpw.mods.fml.common.event.FMLServerStartedEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.event.FMLServerStoppedEvent;
import cpw.mods.fml.common.event.*;
import cpw.mods.fml.common.network.FMLEventChannel;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.EntityRegistry;
@@ -26,6 +22,7 @@ import net.minecraft.entity.EntityList;
import net.minecraft.server.MinecraftServer;
import net.minecraftforge.common.ForgeChunkManager;
import net.minecraftforge.common.MinecraftForge;
import nikedemos.markovnames.generators.*;
import noppes.npcs.config.ConfigLoader;
import noppes.npcs.config.ConfigProp;
import noppes.npcs.controllers.BankController;
@@ -63,7 +60,7 @@ import noppes.npcs.entity.old.EntityNpcNagaFemale;
import noppes.npcs.entity.old.EntityNpcNagaMale;
import noppes.npcs.entity.old.EntityNpcSkeleton;
@Mod(modid = "customnpcs", name = "CustomNpcs", version = "1.0.1")
@Mod(modid = "customnpcs", name = "CustomNpcs", version = "1.2")
public class CustomNpcs {
@ConfigProp(info = "Disable Chat Bubbles")
@@ -142,6 +139,8 @@ public class CustomNpcs {
public static ConfigLoader Config;
public static final MarkovGenerator[] MARKOV_GENERATOR = new MarkovGenerator[10];
public CustomNpcs() {
instance = this;
}
@@ -218,6 +217,22 @@ public class CustomNpcs {
PixelmonHelper.load();
}
@EventHandler
public void load(FMLInitializationEvent ev) {
MARKOV_GENERATOR[0] = new MarkovRoman(3);
MARKOV_GENERATOR[1] = new MarkovJapanese(4);
MARKOV_GENERATOR[2] = new MarkovSlavic(3);
MARKOV_GENERATOR[3] = new MarkovWelsh(3);
MARKOV_GENERATOR[4] = new MarkovSaami(3);
MARKOV_GENERATOR[5] = new MarkovOldNorse(4);
MARKOV_GENERATOR[6] = new MarkovAncientGreek(3);
MARKOV_GENERATOR[7] = new MarkovAztec(3);
MARKOV_GENERATOR[8] = new MarkovCustomNPCsClassic(3);
MARKOV_GENERATOR[9] = new MarkovSpanish(3);
}
@EventHandler
public void setAboutToStart(FMLServerAboutToStartEvent event) {
ChunkController.instance.clear();
+65 -11
View File
@@ -19,6 +19,9 @@ public class DataDisplay {
public String name;
public String title = "";
private int markovGeneratorId = 8; //roman,japanese,slavic,welsh,sami,oldnorse,ancientgreek,aztec,classic,spanish (0 - 9 inclusively)
private int markovGender = 0; //0:random, 1:male, 2:female
public byte skinType = 0; //0:normal, 1:player, 2:url, 3:url64
public String url = "";
@@ -42,6 +45,12 @@ public class DataDisplay {
public DataDisplay(EntityNPCInterface npc){
this.npc = npc;
/*
Implementing MarkovNames generator. You can blame this blunder on Nikedemos.
Please refer to nikedemos.markovnames.generators.MarkovCustomNPCsClassic.java
String[] names = { "Noppes", "Noppes", "Noppes", "Noppes", "Atesson",
"Rothcersul", "Achdranys", "Pegato", "Chald", "Gareld",
"Nalworche", "Ineald", "Tia'kim", "Torerod", "Turturdar",
@@ -52,23 +61,34 @@ public class DataDisplay {
"Issraya", "Arisotura", "Honf", "Rilfom", "Estz", "Ghatroth",
"Yosil", "Darage", "Aldny", "Tyltran", "Armos", "Loxiku",
"Burhat", "Tinlt", "Ightyd", "Mia",
"Ken", "Karla", "Lily", "Carina", "Daniel", "Slater", "Zidane", "Valentine", "Eirina",
"Carnow", "Grave", "Shadow", "Drakken", "Kaoz", "Silk", "Drake", "Oldam", "Lynxx", "Lenyx",
"Winter", "Seth", "Apolitho", "Amethyst", "Ankin", "Seinkan", "Ayumu", "Sakamoto", "Divina",
"Div", "Magia", "Magnus", "Tiakono", "Ruin", "Hailinx", "Ethan", "Wate", "Carter", "William",
"Ken", "Karla", "Lily", "Carina", "Daniel", "Slater", "Zidane", "Valentine", "Eirina",
"Carnow", "Grave", "Shadow", "Drakken", "Kaoz", "Silk", "Drake", "Oldam", "Lynxx", "Lenyx",
"Winter", "Seth", "Apolitho", "Amethyst", "Ankin", "Seinkan", "Ayumu", "Sakamoto", "Divina",
"Div", "Magia", "Magnus", "Tiakono", "Ruin", "Hailinx", "Ethan", "Wate", "Carter", "William",
"Brion", "Sparrow", "Basrrelen", "Gyaku", "Claire", "Crowfeather", "Blackwell", "Raven", "Farcri",
"Lucas", "Bangheart", "Kamoku", "Kyoukan", "Blaze", "Benjamin", "Larianne", "Kakaragon",
"Melancholy", "Epodyno", "Thanato", "Mika", "Dacks", "Ylander", "Neve", "Meadow", "Cuero",
"Embrera", "Eldamore", "Faolan", "Chim", "Nasu", "Kathrine", "Ariel", "Arei", "Demytrix",
"Kora", "Ava", "Larson", "Leonardo", "Wyrl", "Sakiama", "Lambton", "Kederath", "Malus", "Riplette",
"Andern", "Ezall", "Lucien", "Droco", "Cray", "Tymen", "Zenix", "Entranger",
"Lucas", "Bangheart", "Kamoku", "Kyoukan", "Blaze", "Benjamin", "Larianne", "Kakaragon",
"Melancholy", "Epodyno", "Thanato", "Mika", "Dacks", "Ylander", "Neve", "Meadow", "Cuero",
"Embrera", "Eldamore", "Faolan", "Chim", "Nasu", "Kathrine", "Ariel", "Arei", "Demytrix",
"Kora", "Ava", "Larson", "Leonardo", "Wyrl", "Sakiama", "Lambton", "Kederath", "Malus", "Riplette",
"Andern", "Ezall", "Lucien", "Droco", "Cray", "Tymen", "Zenix", "Entranger",
"Saenorath", "Chris", "Christine", "Marble", "Mable", "Ross", "Rose", "Xalgan ", "Kennet", "Kamkeel"
};
name = names[new Random().nextInt(names.length)];
*/
markovGeneratorId = new Random().nextInt(CustomNpcs.MARKOV_GENERATOR.length-1);
name = getRandomName();
}
public String getRandomName() {
return CustomNpcs.MARKOV_GENERATOR[markovGeneratorId].fetch(markovGender);
}
public NBTTagCompound writeToNBT(NBTTagCompound nbttagcompound) {
nbttagcompound.setString("Name", name);
nbttagcompound.setInteger("MarkovGeneratorId", markovGeneratorId);
nbttagcompound.setInteger("MarkovGender", markovGender);
nbttagcompound.setString("Title", title);
nbttagcompound.setString("SkinUrl", url);
nbttagcompound.setString("Texture", texture);
@@ -95,7 +115,10 @@ public class DataDisplay {
return nbttagcompound;
}
public void readToNBT(NBTTagCompound nbttagcompound) {
name = nbttagcompound.getString("Name");
setName(nbttagcompound.getString("Name"));
setMarkovGeneratorId(nbttagcompound.getInteger("MarkovGeneratorId"));
setMarkovGender(nbttagcompound.getInteger("MarkovGender"));
title = nbttagcompound.getString("Title");
url = nbttagcompound.getString("SkinUrl");
@@ -173,4 +196,35 @@ public class DataDisplay {
npc.updateClient = true;
}
public String getName(){
return name;
}
public void setName(String name){
if(this.name.equals(name))
return;
this.name = name;
npc.updateClient = true;
}
public int getMarkovGender(){
return markovGender;
}
public void setMarkovGender(int gender) {
if(markovGender == gender)
return;
this.markovGender = ValueUtil.CorrectInt(gender, 0, 2);
}
public int getMarkovGeneratorId(){
return markovGeneratorId;
}
public void setMarkovGeneratorId(int id) {
if(markovGeneratorId == id)
return;
this.markovGeneratorId = ValueUtil.CorrectInt(id, 0, CustomNpcs.MARKOV_GENERATOR.length-1);
}
}
@@ -27,13 +27,18 @@ public class ModelDataShared{
private HashMap<String,ModelPartData> parts = new HashMap<String,ModelPartData>();
public byte breasts = 0;
// Enabled vs Disabled
public byte headwear = 2;
public byte bodywear = 0;
public byte armwear = 0;
public byte legwear = 0;
// Hide Body Parts [0: None, 1: Both, 2: Right, 3: Left],
public byte hideHead = 0;
public byte hideBody = 0;
public byte hideArms = 0;
public byte hideLegs = 0;
public NBTTagCompound writeToNBT(){
NBTTagCompound compound = new NBTTagCompound();
@@ -0,0 +1,63 @@
package noppes.npcs.client.gui;
import net.minecraft.client.gui.GuiButton;
import noppes.npcs.DataDisplay;
import noppes.npcs.client.gui.mainmenu.GuiNpcDisplay;
import noppes.npcs.client.gui.util.*;
public class SubGuiNpcName extends SubGuiInterface implements ITextfieldListener {
private DataDisplay display;
public SubGuiNpcName(DataDisplay display){
this.display = display;
setBackground("menubg.png");
xSize = 256;
ySize = 216;
closeOnEsc = true;
}
@Override
public void initGui(){
super.initGui();
int y = guiTop + 4;
addButton(new GuiNpcButton(66, guiLeft + xSize - 24, y, 20, 20, "X"));
addTextField(new GuiNpcTextField(0,this, fontRendererObj, guiLeft + 4, y += 50, 226, 20, display.name));
this.addButton(new GuiButtonBiDirectional(1, guiLeft + 4, y += 22 , 200, 20, new String[] {"markov.roman.name", "markov.japanese.name", "markov.slavic.name", "markov.welsh.name", "markov.sami.name", "markov.oldNorse.name", "markov.ancientGreek.name", "markov.aztec.name", "markov.classicCNPCs.name", "markov.spanish.name"}, display.getMarkovGeneratorId()));
this.addButton(new GuiButtonBiDirectional(2, guiLeft + 64, y += 22 , 120, 20, new String[] {"markov.gender.either", "markov.gender.male", "markov.gender.female"}, display.getMarkovGender()));
addLabel(new GuiNpcLabel(2,"markov.gender.name", guiLeft + 5, y + 5));
addButton(new GuiNpcButton(3, guiLeft + 4, y += 42, 70, 20, "markov.generate"));
}
@Override
public void unFocused(GuiNpcTextField textfield) {
if(textfield.id == 0){
if(!textfield.isEmpty())
display.setName(textfield.getText());
else
textfield.setText(display.getName());
}
}
@Override
protected void actionPerformed(GuiButton guibutton){
GuiNpcButton button = (GuiNpcButton) guibutton;
if(button.id == 1) {
display.setMarkovGeneratorId(button.getValue());
}
if(button.id == 2) {
display.setMarkovGender(button.getValue());
}
if(button.id == 3) {
String name = display.getRandomName();
display.setName(name);
getTextField(0).setText(name);
((GuiNpcDisplay)parent).nameText.setText(name);
}
if(button.id == 66){
close();
}
}
}
@@ -10,14 +10,9 @@ import noppes.npcs.client.NoppesUtil;
import noppes.npcs.client.gui.GuiNPCTextures;
import noppes.npcs.client.gui.GuiNpcTextureCloaks;
import noppes.npcs.client.gui.GuiNpcTextureOverlays;
import noppes.npcs.client.gui.SubGuiNpcName;
import noppes.npcs.client.gui.model.GuiCreationScreen;
import noppes.npcs.client.gui.util.GuiHoverText;
import noppes.npcs.client.gui.util.GuiNPCInterface2;
import noppes.npcs.client.gui.util.GuiNpcButton;
import noppes.npcs.client.gui.util.GuiNpcLabel;
import noppes.npcs.client.gui.util.GuiNpcTextField;
import noppes.npcs.client.gui.util.IGuiData;
import noppes.npcs.client.gui.util.ITextfieldListener;
import noppes.npcs.client.gui.util.*;
import noppes.npcs.constants.EnumPacketServer;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.EntityNPCInterface;
@@ -25,6 +20,7 @@ import noppes.npcs.entity.EntityNPCInterface;
public class GuiNpcDisplay extends GuiNPCInterface2 implements ITextfieldListener, IGuiData{
private DataDisplay display;
public GuiNpcTextField nameText;
public GuiNpcDisplay(EntityNPCInterface npc) {
super(npc,1);
@@ -35,9 +31,20 @@ public class GuiNpcDisplay extends GuiNPCInterface2 implements ITextfieldListene
public void initGui(){
super.initGui();
int y = guiTop + 4;
addLabel(new GuiNpcLabel(0,"gui.name", guiLeft + 5, y + 5));
addTextField(new GuiNpcTextField(0,this, fontRendererObj, guiLeft + 50, y, 200, 20, display.name));
this.addButton(new GuiNpcButton(0, guiLeft + 253, y , 110, 20, new String[]{"display.show","display.hide","display.showAttacking"} ,display.showName));
// Old Implementation
// addLabel(new GuiNpcLabel(0,"gui.name", guiLeft + 5, y + 5));
// addTextField(new GuiNpcTextField(0,this, fontRendererObj, guiLeft + 50, y, 200, 20, display.name));
// this.addButton(new GuiNpcButton(0, guiLeft + 253, y , 110, 20, new String[]{"display.show","display.hide","display.showAttacking"} ,display.showName));
addLabel(new GuiNpcLabel(0,"gui.name", guiLeft + 5, y + 5));
nameText = new GuiNpcTextField(0,this, fontRendererObj, guiLeft + 50, y, 206, 20, display.name);
addTextField(nameText);
this.addButton(new GuiNpcButton(0, guiLeft + 253+52, y , 110, 20, new String[]{"display.show","display.hide","display.showAttacking"} ,display.showName));
this.addButton(new GuiNpcButton(14, guiLeft + 259, y , 20, 20, Character.toString('\u21bb')));
this.addButton(new GuiNpcButton(15, guiLeft + 259 + 22, y , 20, 20, Character.toString('\u22EE')));
y+=23;
addLabel(new GuiNpcLabel(11,"gui.title", guiLeft + 5, y + 5));
@@ -163,6 +170,14 @@ public class GuiNpcDisplay extends GuiNPCInterface2 implements ITextfieldListene
else if(button.id == 10){
display.showBossBar = (byte)button.getValue();
}
else if(button.id == 14){
String name = display.getRandomName();
display.setName(name);
getTextField(0).setText(name);
}
else if(button.id == 15){
setSubGui(new SubGuiNpcName(display));
}
}
@Override
@@ -10,8 +10,9 @@ import noppes.npcs.entity.EntityCustomNpc;
public class GuiModelArms extends GuiModelInterface{
private final String[] arrArm = new String[]{"gui.no","Both","Right","Left"};
private final String[] arrArmwear = new String[]{"gui.no","Both","Left","Right"};
private final String[] arrParticles = new String[]{"gui.no","Both","Left","Right"};
private final String[] arrClaws = new String[]{"gui.no","Both","Left","Right"};
private GuiScreen parent;
public GuiModelArms(GuiScreen parent, EntityCustomNpc npc){
@@ -25,13 +26,16 @@ public class GuiModelArms extends GuiModelInterface{
super.initGui();
int y = guiTop + 20;
addButton(new GuiNpcButton(30, guiLeft + 50, y += 22, 70, 20, arrArm, playerdata.hideArms));
addLabel(new GuiNpcLabel(30, "Hide", guiLeft, y + 5, 0xFFFFFF));
if (npc.display.modelType == 1 || npc.display.modelType == 2) {
addButton(new GuiNpcButton(8, guiLeft + 50, y += 22, 70, 20, arrArmwear, playerdata.armwear));
addLabel(new GuiNpcLabel(8, "Armwear", guiLeft, y + 5, 0xFFFFFF));
}
ModelPartData claws = playerdata.getPartData("claws");
addButton(new GuiNpcButton(0, guiLeft + 50, y += 22, 70, 20, arrParticles, claws == null?0:claws.type + 1));
addButton(new GuiNpcButton(0, guiLeft + 50, y += 22, 70, 20, arrClaws, claws == null?0:claws.type + 1));
addLabel(new GuiNpcLabel(0, "Claws", guiLeft, y + 5, 0xFFFFFF));
if(claws != null)
addButton(new GuiNpcButton(10, guiLeft + 122, y, 40, 20, claws.getColor()));
@@ -46,6 +50,9 @@ public class GuiModelArms extends GuiModelInterface{
if(button.id == 8){
playerdata.armwear = (byte) button.getValue();
}
if(button.id == 30){
playerdata.hideArms = (byte) button.getValue();
}
if(button.id == 0){
if(button.getValue() == 0)
playerdata.removePart("claws");
@@ -11,6 +11,7 @@ import noppes.npcs.entity.EntityCustomNpc;
public class GuiModelBody extends GuiModelInterface{
private GuiScreen parent;
private final String[] arrBody = new String[]{"gui.no","gui.yes"};
private final String[] arrBodywear = new String[]{"gui.no","gui.yes"};
private final String[] arrWing = new String[]{"gui.no","Player","Type1","Type2","Type3","Type4","Type5","Type6","Type7","Type8","Type9",
"Type10","Type11","Type12","Type13"};
@@ -31,6 +32,9 @@ public class GuiModelBody extends GuiModelInterface{
int y = guiTop + 20;
addButton(new GuiNpcButton(30, guiLeft + 50, y += 22, 70, 20, arrBody, playerdata.hideBody));
addLabel(new GuiNpcLabel(30, "Hide", guiLeft, y + 5, 0xFFFFFF));
if (npc.display.modelType == 1 || npc.display.modelType == 2) {
addButton(new GuiNpcButton(8, guiLeft + 50, y += 22, 70, 20, arrBodywear, playerdata.bodywear));
addLabel(new GuiNpcLabel(8, "Bodywear", guiLeft, y + 5, 0xFFFFFF));
@@ -87,17 +91,27 @@ public class GuiModelBody extends GuiModelInterface{
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 getSkirtindex(ModelPartData skirt) {
if(skirt == null)
return 0;
if(skirt.type == 0){
if(skirt.playerTexture)
return 1;
if(skirt.texture.contains("1"))
return 2;
if(skirt.texture.contains("2"))
return 3;
if(skirt.texture.contains("3"))
return 4;
if(skirt.texture.contains("4"))
return 5;
if(skirt.texture.contains("5"))
return 6;
if(skirt.texture.contains("6"))
return 7;
}
return 0;
}
private int getParticleIndex(ModelPartData particles) {
if(particles == null)
@@ -202,11 +216,11 @@ public class GuiModelBody extends GuiModelInterface{
if(value == 0)
playerdata.removePart("skirt");
else{
ModelPartData particles = playerdata.getOrCreatePart("skirt");
ModelPartData skirt = playerdata.getOrCreatePart("skirt");
if(value == 1)
particles.setTexture("", 0);
skirt.setTexture("", 0);
if(value == 2)
particles.setTexture("skirt/skirt1", 0);
skirt.setTexture("skirt/skirt1", 0);
}
initGui();
}
@@ -215,6 +229,10 @@ public class GuiModelBody extends GuiModelInterface{
playerdata.bodywear = (byte) button.getValue();
}
if(button.id == 30){
playerdata.hideBody = (byte) button.getValue();
}
if(button.id == 11){
this.mc.displayGuiScreen(new GuiModelColor(this, playerdata.getPartData("wings"), npc));
}
@@ -12,6 +12,7 @@ public class GuiModelHead extends GuiModelInterface{
private GuiScreen parent;
private final String[] arrHead = new String[]{"gui.no","gui.yes"};
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"};
@@ -33,6 +34,9 @@ public class GuiModelHead extends GuiModelInterface{
int y = guiTop + 20;
addButton(new GuiNpcButton(30, guiLeft + 50, y += 22, 70, 20, arrHead, playerdata.hideHead));
addLabel(new GuiNpcLabel(30, "Hide", guiLeft, y + 5, 0xFFFFFF));
addButton(new GuiNpcButton(0, guiLeft + 50, y += 22, 70, 20, arrHeadwear, playerdata.headwear));
addLabel(new GuiNpcLabel(0, "Headwear", guiLeft, y + 5, 0xFFFFFF));
@@ -108,6 +112,10 @@ public class GuiModelHead extends GuiModelInterface{
playerdata.headwear = (byte) button.getValue();
}
if(button.id == 30){
playerdata.hideHead = (byte) button.getValue();
}
if(button.id == 1){
if(button.getValue() == 0)
playerdata.removePart("hair");
@@ -11,6 +11,7 @@ import noppes.npcs.entity.EntityCustomNpc;
public class GuiModelLegs extends GuiModelInterface{
private GuiScreen parent;
private final String[] arrLeg = new String[]{"gui.no","Both","Right","Left"};
private final String[] arrLegwear = new String[]{"gui.no","Both","Left","Right"};
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"};
@@ -25,6 +26,9 @@ public class GuiModelLegs extends GuiModelInterface{
super.initGui();
int y = guiTop + 20;
addButton(new GuiNpcButton(30, guiLeft + 50, y += 22, 70, 20, arrLeg, playerdata.hideLegs));
addLabel(new GuiNpcLabel(30, "Hide", guiLeft, y + 5, 0xFFFFFF));
if (npc.display.modelType == 1 || npc.display.modelType == 2) {
addButton(new GuiNpcButton(8, guiLeft + 50, y += 22, 70, 20, arrLegwear, playerdata.legwear));
addLabel(new GuiNpcLabel(8, "Legwear", guiLeft, y + 5, 0xFFFFFF));
@@ -47,23 +51,11 @@ public class GuiModelLegs extends GuiModelInterface{
return 5;
if(data.type == 4)
return 6;
// if(data.type == 6)
// return 7;
if(data.type == 5)
return 8;
return data.type + 1;
}
// 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;
// return data.type + 1;
// }
private int getTailIndex(ModelPartData data){
if(data == null)
return 0;
@@ -99,6 +91,9 @@ public class GuiModelLegs extends GuiModelInterface{
if(button.id == 8){
playerdata.legwear = (byte) button.getValue();
}
if(button.id == 30){
playerdata.hideLegs = (byte) button.getValue();
}
if(button.id == 1){
ModelPartData data = playerdata.legParts;
int value = button.getValue() - 1;
@@ -489,6 +489,10 @@ public class ModelMPM extends ModelNPCMale{
GL11.glTranslatef((float)Math.sin(dancing) * 0.075F, (float)Math.abs(Math.cos(dancing)) * 0.125F - 0.02F, (float)(-Math.abs(Math.cos(dancing))) * 0.075F);
}
ModelPartConfig head = entity.modelData.head;
// Hide Head
((ModelScaleRenderer)this.bipedHead).isHidden = entity.modelData.hideHead == 1;
if(bipedHeadwear.showModel && !bipedHeadwear.isHidden){
if(entity.modelData.headwear == 1 || isArmor){
((ModelScaleRenderer)this.bipedHeadwear).setConfig(head,x,y,z);
@@ -524,28 +528,13 @@ public class ModelMPM extends ModelNPCMale{
}
ModelPartConfig body = entity.modelData.body;
// if(bipedBodywear.showModel && !bipedBodywear.isHidden){
// if(entity.modelData.bodywear == 1 || isArmor){
// ((ModelScaleRenderer)this.bipedBodywear).setConfig(body,x,y,z);
// ((ModelScaleRenderer)this.bipedBodywear).render(f);
// }
//// else if(entity.modelData.bodywear == 2){
//// this.bodywear.rotateAngleX = bipedBodywear.rotateAngleX;
//// this.bodywear.rotateAngleY = bipedBodywear.rotateAngleY;
//// this.bodywear.rotateAngleZ = bipedBodywear.rotateAngleZ;
//// this.bodywear.rotationPointX = bipedBodywear.rotationPointX;
//// this.bodywear.rotationPointY = bipedBodywear.rotationPointY;
//// this.bodywear.rotationPointZ = bipedBodywear.rotationPointZ;
//// this.bodywear.setConfig(body,x,y,z);
//// this.bodywear.render(f);
//// }
// }
if(entity.modelData.bodywear == 1){
((ModelScaleRenderer)this.bipedBodywear).isHidden = false;
}
else{
((ModelScaleRenderer)this.bipedBodywear).isHidden = true;
}
// Hide Body
((ModelScaleRenderer)this.bipedBody).isHidden = entity.modelData.hideBody == 1;
// Hide Bodywear
((ModelScaleRenderer)this.bipedBodywear).isHidden = entity.modelData.bodywear != 1;
((ModelScaleRenderer)this.bipedBody).setConfig(body,x,y,z);
((ModelScaleRenderer)this.bipedBody).render(f);
GL11.glPopMatrix();
@@ -566,21 +555,40 @@ public class ModelMPM extends ModelNPCMale{
GL11.glTranslatef((float)Math.sin(dancing) * 0.025F, (float)Math.abs(Math.cos(dancing)) * 0.125F - 0.02F, 0.0F);
}
if(entity.modelData.armwear == 1){
this.bipedRightArmwear.isHidden = false;
this.bipedLeftArmwear.isHidden = false;
// Hide Arms
if(entity.modelData.hideArms == 1){
((ModelScaleRenderer)this.bipedRightArm).isHidden = true;
((ModelScaleRenderer)this.bipedLeftArm).isHidden = true;
}
else if(entity.modelData.armwear == 2){
this.bipedRightArmwear.isHidden = true;
this.bipedLeftArmwear.isHidden = false;
else if(entity.modelData.hideArms == 2){
((ModelScaleRenderer)this.bipedRightArm).isHidden = true;
((ModelScaleRenderer)this.bipedLeftArm).isHidden = false;
}
else if(entity.modelData.armwear == 3){
this.bipedRightArmwear.isHidden = false;
this.bipedLeftArmwear.isHidden = true;
else if(entity.modelData.hideArms == 3){
((ModelScaleRenderer)this.bipedRightArm).isHidden = false;
((ModelScaleRenderer)this.bipedLeftArm).isHidden = true;
}
else{
this.bipedRightArmwear.isHidden = true;
this.bipedLeftArmwear.isHidden = true;
((ModelScaleRenderer)this.bipedRightArm).isHidden = false;
((ModelScaleRenderer)this.bipedLeftArm).isHidden = false;
}
// Hide Armwear
if(entity.modelData.armwear == 1){
((ModelScaleRenderer)this.bipedRightArmwear).isHidden = false;
((ModelScaleRenderer)this.bipedLeftArmwear).isHidden = false;
}
else if(entity.modelData.armwear == 2){
((ModelScaleRenderer)this.bipedRightArmwear).isHidden = true;
((ModelScaleRenderer)this.bipedLeftArmwear).isHidden = false;
}
else if(entity.modelData.armwear == 3){
((ModelScaleRenderer)this.bipedRightArmwear).isHidden = false;
((ModelScaleRenderer)this.bipedLeftArmwear).isHidden = true;
}
else{
((ModelScaleRenderer)this.bipedRightArmwear).isHidden = true;
((ModelScaleRenderer)this.bipedLeftArmwear).isHidden = true;
}
if(!bo){
@@ -606,6 +614,26 @@ public class ModelMPM extends ModelNPCMale{
GL11.glPushMatrix();
// Hide Legs
if(entity.modelData.hideLegs == 1){
((ModelScaleRenderer)this.bipedRightLeg).isHidden = true;
((ModelScaleRenderer)this.bipedLeftLeg).isHidden = true;
}
else if(entity.modelData.hideLegs == 2){
((ModelScaleRenderer)this.bipedRightLeg).isHidden = true;
((ModelScaleRenderer)this.bipedLeftLeg).isHidden = false;
}
else if(entity.modelData.hideLegs == 3){
((ModelScaleRenderer)this.bipedRightLeg).isHidden = false;
((ModelScaleRenderer)this.bipedLeftLeg).isHidden = true;
}
else{
((ModelScaleRenderer)this.bipedRightLeg).isHidden = false;
((ModelScaleRenderer)this.bipedLeftLeg).isHidden = false;
}
// Hide Legwear
if(entity.modelData.legwear == 1){
((ModelScaleRenderer)this.bipedRightLegWear).isHidden = false;
((ModelScaleRenderer)this.bipedLeftLegWear).isHidden = false;
@@ -21,10 +21,15 @@ public class ModelSkirt extends ModelPartInterface {
super(base);
float pi = (float) (Math.PI / 5);
textureWidth = 64;
textureHeight = 32;
Shape1 = new ModelPlaneRenderer(base, 58, 18);
Shape1.setTextureSize(64,32);
Shape1.addSidePlane(0, 0, 0, 9, 2);
ModelPlaneRenderer part1 = new ModelPlaneRenderer(base, 58, 18);
part1.setTextureSize(64,32);
part1.addSidePlane(2, 0, 0, 9, 2);
part1.rotateAngleY = -(float) (Math.PI/2);
Shape1.addChild(part1);