mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-20 01:49:40 +00:00
Still going
This commit is contained in:
1 parent
d91d4668d6
commit
4eae773f86
13 files changed
+110
-74
No files matched your search
@@ -295,7 +295,7 @@ public class NoppesUtilServer {
|
||||
return;
|
||||
}
|
||||
else{
|
||||
BOB.sendDataChecked((EntityPlayerMP)player, EnumPacketClient.GUI, gui.ordinal(), i, j, k);
|
||||
PacketUtil.openGUI((EntityPlayerMP)player, gui, i, j, k);
|
||||
}
|
||||
ArrayList<String> list = getScrollData(player, gui, npc);
|
||||
if(list == null || list.isEmpty())
|
||||
@@ -317,7 +317,7 @@ public class NoppesUtilServer {
|
||||
return;
|
||||
}
|
||||
else{
|
||||
BOB.sendDataChecked((EntityPlayerMP)player, EnumPacketClient.GUI, gui.ordinal(), i, j, k);
|
||||
PacketUtil.openGUI((EntityPlayerMP)player, gui, i, j, k);
|
||||
}
|
||||
ArrayList<String> list = getScrollData(player, gui, npc);
|
||||
if(list == null || list.isEmpty())
|
||||
@@ -358,7 +358,7 @@ public class NoppesUtilServer {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static void spawnParticle(Entity entity,String particle,int dimension){
|
||||
public static void spawnParticle(Entity entity,String particle, int dimension){
|
||||
BOB.sendAssociatedData(entity, EnumPacketClient.PARTICLE, entity.posX, entity.posY, entity.posZ, entity.height, entity.width, entity.yOffset, particle);
|
||||
}
|
||||
|
||||
@@ -673,7 +673,7 @@ public class NoppesUtilServer {
|
||||
|
||||
NBTTagCompound compound = option.writeNBT();
|
||||
compound.setInteger("Position", pos);
|
||||
BOB.sendData((EntityPlayerMP)player, EnumPacketClient.GUI_DATA, compound);
|
||||
PacketUtil.sendGuiData((EntityPlayerMP)player, compound);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -709,7 +709,7 @@ public class NoppesUtilServer {
|
||||
public static void setClonerGui(EntityPlayerMP player, int x, int y, int z){
|
||||
if(player == null)
|
||||
return;
|
||||
BOB.sendData(player, EnumPacketClient.CLONER, x, y, z);
|
||||
PacketUtil.openGUI(player, EnumGuiType.Cloner, x, y, z);
|
||||
}
|
||||
|
||||
public static void setTeleporterGUI(EntityPlayerMP player){
|
||||
@@ -726,14 +726,13 @@ public class NoppesUtilServer {
|
||||
|
||||
ContainerManageRecipes container = (ContainerManageRecipes) player.openContainer;
|
||||
container.setRecipe(recipe);
|
||||
|
||||
BOB.sendData(player, EnumPacketClient.GUI_DATA, recipe.writeNBT());
|
||||
PacketUtil.sendGuiData((EntityPlayerMP)player, recipe.writeNBT());
|
||||
}
|
||||
|
||||
public static void sendBank(EntityPlayerMP player,Bank bank) {
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
bank.writeEntityToNBT(compound);
|
||||
BOB.sendData(player, EnumPacketClient.GUI_DATA, compound);
|
||||
PacketUtil.sendGuiData((EntityPlayerMP)player, compound);
|
||||
|
||||
if(player.openContainer instanceof ContainerManageBanks){
|
||||
((ContainerManageBanks)player.openContainer).setBank(bank);
|
||||
@@ -759,14 +758,14 @@ public class NoppesUtilServer {
|
||||
}
|
||||
|
||||
public static void sendGuiError(EntityPlayer player, int i) {
|
||||
BOB.sendData((EntityPlayerMP)player, EnumPacketClient.GUI_ERROR, i, new NBTTagCompound());
|
||||
PacketUtil.errorGUI((EntityPlayerMP)player, i, new NBTTagCompound());
|
||||
}
|
||||
|
||||
public static void sendGuiClose(EntityPlayerMP player, int i, NBTTagCompound comp) {
|
||||
if(player.openContainer != player.inventoryContainer){
|
||||
player.openContainer = player.inventoryContainer;
|
||||
}
|
||||
BOB.sendData(player, EnumPacketClient.GUI_CLOSE, i, comp);
|
||||
PacketUtil.closeGUI(player, i, comp);
|
||||
}
|
||||
|
||||
public static Entity spawnCloneWithProtection(NBTTagCompound compound, int x, int y,
|
||||
|
||||
@@ -672,7 +672,7 @@ public class PacketHandlerServer{
|
||||
List<String> list = new ArrayList<String>();
|
||||
for(LinkedData data : LinkedNpcController.Instance.list)
|
||||
list.add(data.name);
|
||||
Server.sendData((EntityPlayerMP)player, EnumPacketClient.SCROLL_LIST, list);
|
||||
PacketUtil.sendList((EntityPlayerMP)player, list);
|
||||
}
|
||||
else if(type == EnumPacketServer.LinkedRemove){
|
||||
LinkedNpcController.Instance.removeData(Server.readString(buffer));
|
||||
@@ -680,13 +680,13 @@ public class PacketHandlerServer{
|
||||
List<String> list = new ArrayList<String>();
|
||||
for(LinkedData data : LinkedNpcController.Instance.list)
|
||||
list.add(data.name);
|
||||
Server.sendData((EntityPlayerMP)player, EnumPacketClient.SCROLL_LIST, list);
|
||||
PacketUtil.sendList((EntityPlayerMP)player, list);
|
||||
}
|
||||
else if(type == EnumPacketServer.LinkedGetAll){
|
||||
List<String> list = new ArrayList<String>();
|
||||
for(LinkedData data : LinkedNpcController.Instance.list)
|
||||
list.add(data.name);
|
||||
Server.sendData(player, EnumPacketClient.SCROLL_LIST, list);
|
||||
PacketUtil.sendList((EntityPlayerMP)player, list);
|
||||
if(npc != null)
|
||||
Server.sendData(player, EnumPacketClient.SCROLL_SELECTED, npc.linkedName);
|
||||
}
|
||||
|
||||
@@ -365,7 +365,7 @@ public class ClientProxy extends CommonProxy {
|
||||
else if (gui == EnumGuiType.RedstoneBlock)
|
||||
return new GuiNpcRedstoneBlock(x, y, z);
|
||||
|
||||
else if(gui == EnumGuiType.MobSpawner)
|
||||
else if(gui == EnumGuiType.Cloner)
|
||||
return new GuiNpcMobSpawner(x, y, z);
|
||||
|
||||
else if(gui == EnumGuiType.MobSpawnerMounter)
|
||||
|
||||
@@ -1,22 +1,17 @@
|
||||
package noppes.npcs.client;
|
||||
|
||||
import cpw.mods.fml.common.ObfuscationReflectionHelper;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.network.FMLNetworkEvent.ClientCustomPacketEvent;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.gui.achievement.GuiAchievement;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.stats.Achievement;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.village.MerchantRecipeList;
|
||||
import noppes.npcs.*;
|
||||
import noppes.npcs.client.ClientProxy.FontContainer;
|
||||
@@ -169,7 +164,7 @@ public class PacketHandlerClient extends PacketHandlerServer{
|
||||
int x = buffer.readInt();
|
||||
int y = buffer.readInt();
|
||||
int z = buffer.readInt();
|
||||
CustomNpcs.proxy.openGui(x, y, z, EnumGuiType.MobSpawner, player);
|
||||
CustomNpcs.proxy.openGui(x, y, z, EnumGuiType.Cloner, player);
|
||||
}
|
||||
else if(type == EnumPacketClient.TELEPORTER){
|
||||
CustomNpcs.proxy.openGui((EntityNPCInterface)null,EnumGuiType.NpcDimensions);
|
||||
|
||||
@@ -23,7 +23,7 @@ public enum EnumGuiType {
|
||||
SetupTransporter,
|
||||
ManageTransport,
|
||||
ManageBanks,
|
||||
MobSpawner,
|
||||
Cloner,
|
||||
SetupBank,
|
||||
ManageDialogs,
|
||||
ManageQuests,
|
||||
|
||||
Reference in new issue
Block a user