mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-24 15:14:26 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f9ab885ddd | ||
|
|
e0f77bdcff | ||
|
|
6ff2678f26 | ||
|
|
a1a0864692 | ||
|
|
b3098053ec | ||
|
|
2155566113 | ||
|
|
9d88da30cf | ||
|
|
24e8648a1d | ||
|
|
e1c283a19e |
No files matched your search
+1
-1
@@ -17,7 +17,7 @@ buildscript {
|
||||
|
||||
apply plugin: 'forge'
|
||||
|
||||
version = "1.4"
|
||||
version = "1.4.2"
|
||||
group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = "CustomNPC-Plus"
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ import noppes.npcs.entity.old.EntityNpcNagaMale;
|
||||
import noppes.npcs.entity.old.EntityNpcSkeleton;
|
||||
import noppes.npcs.scripted.wrapper.WrapperNpcAPI;
|
||||
|
||||
@Mod(modid = "customnpcs", name = "CustomNpcs", version = "1.4")
|
||||
@Mod(modid = "customnpcs", name = "CustomNpcs", version = "1.4.2")
|
||||
public class CustomNpcs {
|
||||
|
||||
@ConfigProp(info = "Disable Chat Bubbles")
|
||||
|
||||
@@ -560,7 +560,7 @@ public class PacketHandlerServer{
|
||||
else if(type == EnumPacketServer.FactionSave){
|
||||
Faction faction = new Faction();
|
||||
faction.readNBT(Server.readNBT(buffer));
|
||||
FactionController.getInstance().create(faction);
|
||||
FactionController.getInstance().saveFaction(faction);
|
||||
NoppesUtilServer.sendFactionDataAll(player);
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
faction.writeNBT(compound);
|
||||
|
||||
@@ -79,7 +79,7 @@ public class SubGuiNpcDialogExtra extends SubGuiInterface implements ISubGuiList
|
||||
if(button.id == 15){
|
||||
dialog.disableEsc = button.getValue() == 1;
|
||||
}
|
||||
if(button.id == 15){
|
||||
if(button.id == 16){
|
||||
dialog.darkenScreen = button.getValue() == 1;
|
||||
}
|
||||
if(button.id == 13){
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
package noppes.npcs.client.gui.custom.components;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.gui.GuiLabel;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import noppes.npcs.client.gui.custom.GuiCustom;
|
||||
@@ -14,7 +16,9 @@ import noppes.npcs.scripted.gui.ScriptGuiLabel;
|
||||
import noppes.npcs.scripted.interfaces.ICustomGuiComponent;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class CustomGuiLabel extends GuiLabel implements IGuiComponent {
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class CustomGuiLabel extends Gui implements IGuiComponent {
|
||||
int x, y, width, height;
|
||||
GuiCustom parent;
|
||||
String fullLabel;
|
||||
@@ -25,6 +29,31 @@ public class CustomGuiLabel extends GuiLabel implements IGuiComponent {
|
||||
int border = 2;
|
||||
boolean labelBgEnabled = true;
|
||||
|
||||
protected int field_146167_a;
|
||||
protected int field_146161_f;
|
||||
public int field_146162_g;
|
||||
public int field_146174_h;
|
||||
private ArrayList field_146173_k;
|
||||
private boolean field_146170_l;
|
||||
public boolean field_146172_j;
|
||||
private boolean field_146171_m;
|
||||
private int field_146168_n;
|
||||
private int field_146169_o;
|
||||
private int field_146166_p;
|
||||
private int field_146165_q;
|
||||
private FontRenderer field_146164_r;
|
||||
private int field_146163_s;
|
||||
private static final String __OBFID = "CL_00000671";
|
||||
|
||||
public CustomGuiLabel(int id, String fullLabel, int x, int y, int width, int height){
|
||||
this.id = id;
|
||||
this.fullLabel = fullLabel;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
}
|
||||
|
||||
public void setParent(GuiCustom parent) {
|
||||
this.parent = parent;
|
||||
}
|
||||
@@ -46,16 +75,10 @@ public class CustomGuiLabel extends GuiLabel implements IGuiComponent {
|
||||
}
|
||||
|
||||
public static CustomGuiLabel fromComponent(ScriptGuiLabel component) {
|
||||
CustomGuiLabel lbl = new CustomGuiLabel();
|
||||
CustomGuiLabel lbl = new CustomGuiLabel(component.getID(), component.getText(), GuiCustom.guiLeft + component.getPosX(), GuiCustom.guiTop + component.getPosY(), component.getWidth(), component.getHeight());
|
||||
lbl.scale = 1.0F;
|
||||
lbl.fullLabel = component.getText();
|
||||
lbl.color = component.getColor();
|
||||
lbl.field_146172_j = true;
|
||||
lbl.id = component.getID();
|
||||
lbl.x = GuiCustom.guiLeft + component.getPosX();
|
||||
lbl.y = GuiCustom.guiTop + component.getPosY();
|
||||
lbl.width = component.getWidth();
|
||||
lbl.height = component.getHeight();
|
||||
lbl.setScale(component.getScale());
|
||||
if (component.hasHoverText()) {
|
||||
lbl.hoverText = component.getHoverText();
|
||||
|
||||
@@ -60,7 +60,8 @@ public class Dialog implements ICompatibilty, IDialog {
|
||||
else
|
||||
showWheel = true;
|
||||
disableEsc = compound.getBoolean("DialogDisableEsc");
|
||||
|
||||
darkenScreen = compound.getBoolean("DialogDarkenScreen");
|
||||
|
||||
NBTTagList options = compound.getTagList("Options", 10);
|
||||
HashMap<Integer,DialogOption> newoptions = new HashMap<Integer,DialogOption>();
|
||||
for(int iii = 0; iii < options.tagCount();iii++){
|
||||
@@ -91,6 +92,7 @@ public class Dialog implements ICompatibilty, IDialog {
|
||||
compound.setBoolean("DialogHideNPC", hideNPC);
|
||||
compound.setBoolean("DialogShowWheel", showWheel);
|
||||
compound.setBoolean("DialogDisableEsc", disableEsc);
|
||||
compound.setBoolean("DialogDarkenScreen", darkenScreen);
|
||||
|
||||
if(sound != null && !sound.isEmpty())
|
||||
compound.setString("DialogSound", sound);
|
||||
@@ -134,6 +136,7 @@ public class Dialog implements ICompatibilty, IDialog {
|
||||
dialog.hideNPC = hideNPC;
|
||||
dialog.showWheel = showWheel;
|
||||
dialog.disableEsc = disableEsc;
|
||||
dialog.darkenScreen = darkenScreen;
|
||||
|
||||
for(int slot : options.keySet()){
|
||||
DialogOption option = options.get(slot);
|
||||
|
||||
@@ -139,7 +139,7 @@ public class FactionController implements IFactionHandler {
|
||||
}
|
||||
|
||||
public void saveFaction(Faction faction) {
|
||||
|
||||
|
||||
if(faction.id < 0){
|
||||
faction.id = getUnusedId();
|
||||
while(hasName(faction.name))
|
||||
@@ -157,23 +157,12 @@ public class FactionController implements IFactionHandler {
|
||||
}
|
||||
|
||||
public Faction create(Faction faction) {
|
||||
String name = faction.getName();
|
||||
int color = faction.getColor();
|
||||
|
||||
for(faction = new Faction(); this.hasName(name); name = name + "_") {
|
||||
}
|
||||
|
||||
faction.name = name;
|
||||
faction.color = color;
|
||||
this.saveFaction(faction);
|
||||
return faction;
|
||||
}
|
||||
|
||||
public Faction create(String name, int color) {
|
||||
Faction faction;
|
||||
for(faction = new Faction(); this.hasName(name); name = name + "_") {
|
||||
}
|
||||
|
||||
Faction faction = new Faction();
|
||||
faction.name = name;
|
||||
faction.color = color;
|
||||
this.saveFaction(faction);
|
||||
|
||||
Reference in new issue
Block a user