mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-22 16:39:49 +00:00
WE KEEPPPP ON GOING
This commit is contained in:
1 parent
4eae773f86
commit
29f9774d1f
12 files changed
+88
-55
No files matched your search
@@ -5,8 +5,12 @@ import kamkeel.npcs.controllers.SyncMaster;
|
||||
import kamkeel.npcs.network.PacketHandler;
|
||||
import kamkeel.npcs.network.PacketUtil;
|
||||
import kamkeel.npcs.network.packets.client.DialogPacket;
|
||||
import kamkeel.npcs.network.packets.client.EditNpcPacket;
|
||||
import kamkeel.npcs.network.packets.client.ParticlePacket;
|
||||
import kamkeel.npcs.network.packets.client.ScriptedParticlePacket;
|
||||
import kamkeel.npcs.network.packets.client.npc.DeleteNpcPacket;
|
||||
import kamkeel.npcs.network.packets.client.npc.EditNpcPacket;
|
||||
import kamkeel.npcs.network.packets.client.RolePacket;
|
||||
import kamkeel.npcs.network.packets.client.gui.GuiTeleporterPacket;
|
||||
import kamkeel.npcs.util.ByteBufUtils;
|
||||
import net.minecraft.command.server.CommandBlockLogic;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -359,16 +363,11 @@ public class NoppesUtilServer {
|
||||
return null;
|
||||
}
|
||||
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);
|
||||
PacketHandler.Instance.sendTracking(new ParticlePacket(entity.posX, entity.posY, entity.posZ, entity.height, entity.width, entity.yOffset, particle), entity);
|
||||
}
|
||||
|
||||
public static void spawnScriptedParticle(NBTTagCompound compound, int dimensionId){
|
||||
List<EntityPlayer> list = MinecraftServer.getServer().getConfigurationManager().playerEntityList;
|
||||
for (EntityPlayer player : list) {
|
||||
if (player.worldObj.provider.dimensionId == dimensionId) {
|
||||
BOB.sendData((EntityPlayerMP) player, EnumPacketClient.SCRIPTED_PARTICLE, compound);
|
||||
}
|
||||
}
|
||||
PacketHandler.Instance.sendToDimension(new ScriptedParticlePacket(compound), dimensionId);
|
||||
}
|
||||
|
||||
public static void playSound(int id, ScriptSound sound) {
|
||||
@@ -414,7 +413,7 @@ public class NoppesUtilServer {
|
||||
}
|
||||
|
||||
public static void deleteNpc(EntityNPCInterface npc,EntityPlayer player) {
|
||||
BOB.sendAssociatedData(npc, EnumPacketClient.DELETE_NPC, npc.getEntityId());
|
||||
PacketHandler.Instance.sendTracking(new DeleteNpcPacket(npc.getEntityId()), npc);
|
||||
}
|
||||
|
||||
public static void createMobSpawner(int x, int y, int z, NBTTagCompound comp, EntityPlayer player) {
|
||||
@@ -715,7 +714,7 @@ public class NoppesUtilServer {
|
||||
public static void setTeleporterGUI(EntityPlayerMP player){
|
||||
if(player == null)
|
||||
return;
|
||||
BOB.sendData(player, EnumPacketClient.TELEPORTER);
|
||||
PacketHandler.Instance.sendToPlayer(new GuiTeleporterPacket(), player);
|
||||
}
|
||||
|
||||
public static void setRecipeGui(EntityPlayerMP player, RecipeCarpentry recipe){
|
||||
|
||||
@@ -89,12 +89,6 @@ public class PacketHandlerClient extends PacketHandlerServer{
|
||||
return;
|
||||
NoppesUtil.openDialog(Server.readNBT(buffer), (EntityNPCInterface) entity, player);
|
||||
}
|
||||
else if(type == EnumPacketClient.DIALOG_DUMMY){
|
||||
EntityDialogNpc npc = new EntityDialogNpc(player.worldObj);
|
||||
npc.display.name = Server.readString(buffer);
|
||||
EntityUtil.Copy(player, npc);
|
||||
NoppesUtil.openDialog(Server.readNBT(buffer), npc, player);
|
||||
}
|
||||
else if(type == EnumPacketClient.QUEST_COMPLETION){
|
||||
NoppesUtil.guiQuestCompletion(player, Server.readNBT(buffer));
|
||||
}
|
||||
@@ -160,12 +154,6 @@ public class PacketHandlerClient extends PacketHandlerServer{
|
||||
NBTTagCompound compound = Server.readNBT(buffer);
|
||||
NoppesUtil.openGUI(player, new GuiNpcMobSpawnerAdd(compound));
|
||||
}
|
||||
else if(type == EnumPacketClient.CLONER){
|
||||
int x = buffer.readInt();
|
||||
int y = buffer.readInt();
|
||||
int z = buffer.readInt();
|
||||
CustomNpcs.proxy.openGui(x, y, z, EnumGuiType.Cloner, player);
|
||||
}
|
||||
else if(type == EnumPacketClient.TELEPORTER){
|
||||
CustomNpcs.proxy.openGui((EntityNPCInterface)null,EnumGuiType.NpcDimensions);
|
||||
}
|
||||
|
||||
@@ -24,10 +24,8 @@ public enum EnumPacketClient {
|
||||
VILLAGER_LIST,
|
||||
SYNCRECIPES_CARPENTRYBENCH,
|
||||
CLONE,
|
||||
CLONER,
|
||||
TELEPORTER,
|
||||
OPEN_BOOK,
|
||||
DIALOG_DUMMY,
|
||||
CONFIG,
|
||||
ISGUIOPEN,
|
||||
SCRIPT_OVERLAY_DATA,
|
||||
|
||||
Reference in new issue
Block a user