mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-24 21:04:27 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f9ab885ddd | ||
|
|
e0f77bdcff | ||
|
|
6ff2678f26 | ||
|
|
a1a0864692 | ||
|
|
b3098053ec |
No files matched your search
+1
-1
@@ -17,7 +17,7 @@ buildscript {
|
|||||||
|
|
||||||
apply plugin: 'forge'
|
apply plugin: 'forge'
|
||||||
|
|
||||||
version = "1.4.1"
|
version = "1.4.2"
|
||||||
group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||||
archivesBaseName = "CustomNPC-Plus"
|
archivesBaseName = "CustomNPC-Plus"
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ import noppes.npcs.entity.old.EntityNpcNagaMale;
|
|||||||
import noppes.npcs.entity.old.EntityNpcSkeleton;
|
import noppes.npcs.entity.old.EntityNpcSkeleton;
|
||||||
import noppes.npcs.scripted.wrapper.WrapperNpcAPI;
|
import noppes.npcs.scripted.wrapper.WrapperNpcAPI;
|
||||||
|
|
||||||
@Mod(modid = "customnpcs", name = "CustomNpcs", version = "1.4.1")
|
@Mod(modid = "customnpcs", name = "CustomNpcs", version = "1.4.2")
|
||||||
public class CustomNpcs {
|
public class CustomNpcs {
|
||||||
|
|
||||||
@ConfigProp(info = "Disable Chat Bubbles")
|
@ConfigProp(info = "Disable Chat Bubbles")
|
||||||
|
|||||||
@@ -560,7 +560,7 @@ public class PacketHandlerServer{
|
|||||||
else if(type == EnumPacketServer.FactionSave){
|
else if(type == EnumPacketServer.FactionSave){
|
||||||
Faction faction = new Faction();
|
Faction faction = new Faction();
|
||||||
faction.readNBT(Server.readNBT(buffer));
|
faction.readNBT(Server.readNBT(buffer));
|
||||||
FactionController.getInstance().create(faction);
|
FactionController.getInstance().saveFaction(faction);
|
||||||
NoppesUtilServer.sendFactionDataAll(player);
|
NoppesUtilServer.sendFactionDataAll(player);
|
||||||
NBTTagCompound compound = new NBTTagCompound();
|
NBTTagCompound compound = new NBTTagCompound();
|
||||||
faction.writeNBT(compound);
|
faction.writeNBT(compound);
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ public class SubGuiNpcDialogExtra extends SubGuiInterface implements ISubGuiList
|
|||||||
if(button.id == 15){
|
if(button.id == 15){
|
||||||
dialog.disableEsc = button.getValue() == 1;
|
dialog.disableEsc = button.getValue() == 1;
|
||||||
}
|
}
|
||||||
if(button.id == 15){
|
if(button.id == 16){
|
||||||
dialog.darkenScreen = button.getValue() == 1;
|
dialog.darkenScreen = button.getValue() == 1;
|
||||||
}
|
}
|
||||||
if(button.id == 13){
|
if(button.id == 13){
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ public class Dialog implements ICompatibilty, IDialog {
|
|||||||
else
|
else
|
||||||
showWheel = true;
|
showWheel = true;
|
||||||
disableEsc = compound.getBoolean("DialogDisableEsc");
|
disableEsc = compound.getBoolean("DialogDisableEsc");
|
||||||
|
darkenScreen = compound.getBoolean("DialogDarkenScreen");
|
||||||
|
|
||||||
NBTTagList options = compound.getTagList("Options", 10);
|
NBTTagList options = compound.getTagList("Options", 10);
|
||||||
HashMap<Integer,DialogOption> newoptions = new HashMap<Integer,DialogOption>();
|
HashMap<Integer,DialogOption> newoptions = new HashMap<Integer,DialogOption>();
|
||||||
@@ -91,6 +92,7 @@ public class Dialog implements ICompatibilty, IDialog {
|
|||||||
compound.setBoolean("DialogHideNPC", hideNPC);
|
compound.setBoolean("DialogHideNPC", hideNPC);
|
||||||
compound.setBoolean("DialogShowWheel", showWheel);
|
compound.setBoolean("DialogShowWheel", showWheel);
|
||||||
compound.setBoolean("DialogDisableEsc", disableEsc);
|
compound.setBoolean("DialogDisableEsc", disableEsc);
|
||||||
|
compound.setBoolean("DialogDarkenScreen", darkenScreen);
|
||||||
|
|
||||||
if(sound != null && !sound.isEmpty())
|
if(sound != null && !sound.isEmpty())
|
||||||
compound.setString("DialogSound", sound);
|
compound.setString("DialogSound", sound);
|
||||||
@@ -134,6 +136,7 @@ public class Dialog implements ICompatibilty, IDialog {
|
|||||||
dialog.hideNPC = hideNPC;
|
dialog.hideNPC = hideNPC;
|
||||||
dialog.showWheel = showWheel;
|
dialog.showWheel = showWheel;
|
||||||
dialog.disableEsc = disableEsc;
|
dialog.disableEsc = disableEsc;
|
||||||
|
dialog.darkenScreen = darkenScreen;
|
||||||
|
|
||||||
for(int slot : options.keySet()){
|
for(int slot : options.keySet()){
|
||||||
DialogOption option = options.get(slot);
|
DialogOption option = options.get(slot);
|
||||||
|
|||||||
@@ -157,23 +157,12 @@ public class FactionController implements IFactionHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Faction create(Faction faction) {
|
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);
|
this.saveFaction(faction);
|
||||||
return faction;
|
return faction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Faction create(String name, int color) {
|
public Faction create(String name, int color) {
|
||||||
Faction faction;
|
Faction faction = new Faction();
|
||||||
for(faction = new Faction(); this.hasName(name); name = name + "_") {
|
|
||||||
}
|
|
||||||
|
|
||||||
faction.name = name;
|
faction.name = name;
|
||||||
faction.color = color;
|
faction.color = color;
|
||||||
this.saveFaction(faction);
|
this.saveFaction(faction);
|
||||||
|
|||||||
Reference in new issue
Block a user