mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-22 09:39:48 +00:00
Added MarkovNameGenerator, Added Disable Body Part Feature
Two New Features >> + Added Markov Name Generate + Corrected Hide Body Parts
This commit is contained in:
1 parent
f155ef2481
commit
3a36be0ae4
47 files changed
+14517
-93
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user