mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 17:19:05 +00:00
Add Insane Sync Data Control from BACK in the BROKEN 1.9 BETA >:D
This commit is contained in:
1 parent
d225122016
commit
dd7a0b7f12
25 files changed
+435
-79
No files matched your search
@@ -55,7 +55,7 @@ public class NoppesUtil {
|
||||
float height = buffer.readFloat();
|
||||
float width = buffer.readFloat();
|
||||
float yOffset = buffer.readFloat();
|
||||
|
||||
|
||||
String particle = Server.readString(buffer);
|
||||
World worldObj = Minecraft.getMinecraft().theWorld;
|
||||
|
||||
@@ -121,7 +121,7 @@ public class NoppesUtil {
|
||||
}
|
||||
|
||||
public static void clickSound() {
|
||||
Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
}
|
||||
|
||||
private static EntityNPCInterface lastNpc;
|
||||
@@ -135,7 +135,7 @@ public class NoppesUtil {
|
||||
public static void openGUI(EntityPlayer player, Object guiscreen) {
|
||||
CustomNpcs.proxy.openGui(player, guiscreen);
|
||||
}
|
||||
|
||||
|
||||
public static void openFolder(File dir){
|
||||
String s = dir.getAbsolutePath();
|
||||
|
||||
@@ -196,19 +196,19 @@ public class NoppesUtil {
|
||||
return;
|
||||
Vector<String> data = new Vector<String>();
|
||||
String line;
|
||||
|
||||
|
||||
try {
|
||||
int size = buffer.readInt();
|
||||
for(int i = 0; i < size; i++){
|
||||
data.add(Server.readString(buffer));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
((IScrollData)gui).setData(data,null);
|
||||
}
|
||||
|
||||
|
||||
private static HashMap<String,Integer> data = new HashMap<String,Integer>();
|
||||
private static HashMap<String,Integer> group = new HashMap<String,Integer>();
|
||||
|
||||
@@ -259,7 +259,7 @@ public class NoppesUtil {
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void setScrollData(ByteBuf buffer) {
|
||||
GuiScreen gui = Minecraft.getMinecraft().currentScreen;
|
||||
if(gui == null)
|
||||
@@ -291,10 +291,8 @@ public class NoppesUtil {
|
||||
NoppesUtil.openGUI(player, new GuiQuestCompletion(quest));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void openDialog(NBTTagCompound compound, EntityNPCInterface npc, EntityPlayer player){
|
||||
if(DialogController.Instance == null)
|
||||
DialogController.Instance = new DialogController();
|
||||
Dialog dialog = new Dialog();
|
||||
dialog.readNBT(compound);
|
||||
GuiScreen gui = Minecraft.getMinecraft().currentScreen;
|
||||
@@ -309,20 +307,20 @@ public class NoppesUtil {
|
||||
int x = compound.getInteger("x");
|
||||
int y = compound.getInteger("y");
|
||||
int z = compound.getInteger("z");
|
||||
|
||||
|
||||
TileEntity tile = player.worldObj.getTileEntity(x, y, z);
|
||||
tile.readFromNBT(compound);
|
||||
|
||||
|
||||
CustomNpcs.proxy.openGui(x, y, z, EnumGuiType.RedstoneBlock, player);
|
||||
}
|
||||
public static void saveWayPointBlock(EntityPlayer player, NBTTagCompound compound){
|
||||
int x = compound.getInteger("x");
|
||||
int y = compound.getInteger("y");
|
||||
int z = compound.getInteger("z");
|
||||
|
||||
|
||||
TileEntity tile = player.worldObj.getTileEntity(x, y, z);
|
||||
tile.readFromNBT(compound);
|
||||
|
||||
|
||||
CustomNpcs.proxy.openGui(x, y, z, EnumGuiType.Waypoint, player);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user