mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 09:09:08 +00:00
Hitbox Lang File modifications
This commit is contained in:
1 parent
41b65496f1
commit
e3c41ad856
4 files changed
+11
-7
No files matched your search
@@ -18,15 +18,15 @@ public class SubGuiCustomHitbox extends SubGuiInterface implements ITextfieldLis
|
||||
@Override
|
||||
public void initGui(){
|
||||
super.initGui();
|
||||
addLabel(new GuiNpcLabel(0,"Custom hitbox", guiLeft + 5, guiTop + 35));
|
||||
addLabel(new GuiNpcLabel(0,"hitbox.hitbox", guiLeft + 5, guiTop + 35));
|
||||
addButton(new GuiNpcButtonYesNo(0,guiLeft + 122, guiTop + 30, 56, 20 ,hitboxData.isHitboxEnabled()));
|
||||
if(hitboxData.isHitboxEnabled()){
|
||||
addLabel(new GuiNpcLabel(3,"Width", guiLeft + 5, guiTop + 57));
|
||||
addLabel(new GuiNpcLabel(3,"hitbox.width", guiLeft + 5, guiTop + 57));
|
||||
addTextField(new GuiNpcTextField(2,this, fontRendererObj, guiLeft + 122, guiTop + 53, 50, 18, hitboxData.getWidth() + ""));
|
||||
getTextField(2).floatsOnly = true;
|
||||
getTextField(2).setMinMaxDefaultFloat(0, Float.MAX_VALUE, 20);
|
||||
|
||||
addLabel(new GuiNpcLabel(4,"Height", guiLeft + 5, guiTop + 79));
|
||||
addLabel(new GuiNpcLabel(4,"hitbox.height", guiLeft + 5, guiTop + 79));
|
||||
addTextField(new GuiNpcTextField(3,this, fontRendererObj, guiLeft + 122, guiTop + 75, 50, 18, hitboxData.getHeight() + ""));
|
||||
getTextField(3).floatsOnly = true;
|
||||
getTextField(3).setMinMaxDefaultFloat(0, Float.MAX_VALUE, 20);
|
||||
|
||||
@@ -36,7 +36,6 @@ public class GuiNpcDisplay extends GuiNPCInterface2 implements ITextfieldListene
|
||||
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')));
|
||||
|
||||
@@ -87,7 +86,7 @@ public class GuiNpcDisplay extends GuiNPCInterface2 implements ITextfieldListene
|
||||
addLabel(new GuiNpcLabel(7,"display.visible", guiLeft + 5, y + 5));
|
||||
this.addButton(new GuiNpcButton(7, guiLeft + 120, y, 50, 20, new String[]{"gui.yes","gui.no","gui.partly"}, display.visible));
|
||||
this.addButton(new GuiNpcButton(13, guiLeft + 185, y , 100, 20, "display.tintsettings"));
|
||||
this.addButton(new GuiNpcButton(12,guiLeft + 300, y, 100, 20, "display.hitbox"));
|
||||
this.addButton(new GuiNpcButton(12,guiLeft + 300, y, 100, 20, "display.hitboxsettings"));
|
||||
|
||||
y+=23;
|
||||
addLabel(new GuiNpcLabel(10,"display.bossbar", guiLeft + 5, y + 5));
|
||||
@@ -144,7 +143,6 @@ public class GuiNpcDisplay extends GuiNPCInterface2 implements ITextfieldListene
|
||||
}
|
||||
if(button.id == 1){
|
||||
NoppesUtil.openGUI(player, new GuiCreationScreen(this, (EntityCustomNpc) npc));
|
||||
//NoppesUtil.openGUI(player, new GuiNpcModelSelection(npc,this));
|
||||
}
|
||||
if(button.id == 2){
|
||||
display.skinType = (byte) button.getValue();
|
||||
@@ -195,6 +193,7 @@ public class GuiNpcDisplay extends GuiNPCInterface2 implements ITextfieldListene
|
||||
setSubGui(new SubGuiNpcName(display));
|
||||
}
|
||||
|
||||
// Button 212
|
||||
GeckoAddonClient.Instance.geckoNpcDisplayActionPerformed(this, button);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ public class HitboxData {
|
||||
}
|
||||
|
||||
public void readFromNBT(NBTTagCompound nbttagcompound) {
|
||||
hitboxEnabled = nbttagcompound.getBoolean("CustomHitbox");
|
||||
hitboxEnabled = nbttagcompound.getBoolean("HitboxEnabled");
|
||||
if(hitboxEnabled) {
|
||||
width = nbttagcompound.getFloat("HitboxWidth");
|
||||
height = nbttagcompound.getFloat("HitboxHeight");
|
||||
|
||||
Reference in new issue
Block a user