mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-26 23:12:55 +00:00
Merge branch 'packet' of https://github.com/KAMKEEL/CustomNPC-Plus into packet
This commit is contained in:
commit
04fc429a53
11 files changed
+274
-56
No files matched your search
@@ -1,5 +1,7 @@
|
||||
package noppes.npcs.client.gui.player;
|
||||
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.player.SaveSignPacket;
|
||||
import noppes.npcs.NoppesUtilPlayer;
|
||||
import noppes.npcs.blocks.tiles.TileBigSign;
|
||||
import noppes.npcs.client.gui.SubGuiNpcTextArea;
|
||||
@@ -16,6 +18,6 @@ public class GuiBigSign extends SubGuiNpcTextArea{
|
||||
@Override
|
||||
public void close(){
|
||||
super.close();
|
||||
NoppesUtilPlayer.sendData(EnumPlayerPacket.SignSave, tile.xCoord, tile.yCoord, tile.zCoord, text);
|
||||
PacketClient.sendClient(new SaveSignPacket(tile.xCoord, tile.yCoord, tile.zCoord, text));
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,8 @@ package noppes.npcs.client.gui.player;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.player.SaveBookPacket;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
@@ -178,7 +180,7 @@ public class GuiBook extends GuiScreen
|
||||
this.bookObj.func_150996_a(Items.written_book);
|
||||
}
|
||||
|
||||
NoppesUtilPlayer.sendData(EnumPlayerPacket.SaveBook, x, y, z, sign, bookObj.writeToNBT(new NBTTagCompound()));
|
||||
PacketClient.sendClient(new SaveBookPacket(x, y, z, sign, bookObj.writeToNBT(new NBTTagCompound())));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package noppes.npcs.client.gui.player;
|
||||
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.player.FollowerPacket;
|
||||
import kamkeel.npcs.network.packets.player.GetNPCRole;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -31,7 +32,7 @@ public class GuiNpcFollower extends GuiContainerNPCInterface implements IGuiDat
|
||||
role = (RoleFollower) npc.roleInterface;
|
||||
closeOnEsc = true;
|
||||
|
||||
NoppesUtilPlayer.sendData(EnumPlayerPacket.RoleGet);
|
||||
PacketClient.sendClient(new GetNPCRole());
|
||||
}
|
||||
@Override
|
||||
public void initGui(){
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package noppes.npcs.client.gui.player.companion;
|
||||
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.packets.player.CompanionActionPacket;
|
||||
import kamkeel.npcs.network.packets.player.GetNPCRole;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -29,7 +31,7 @@ public class GuiNpcCompanionStats extends GuiNPCInterface implements IGuiData {
|
||||
setBackground("companion.png");
|
||||
xSize = 171;
|
||||
ySize = 166;
|
||||
NoppesUtilPlayer.sendData(EnumPlayerPacket.RoleGet);
|
||||
PacketClient.sendClient(new GetNPCRole());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -88,7 +90,7 @@ public class GuiNpcCompanionStats extends GuiNPCInterface implements IGuiData {
|
||||
public void drawScreen(int i, int j, float f) {
|
||||
super.drawScreen(i, j, f);
|
||||
if(isEating && !role.isEating()){
|
||||
NoppesUtilPlayer.sendData(EnumPlayerPacket.RoleGet);
|
||||
PacketClient.sendClient(new GetNPCRole());
|
||||
}
|
||||
|
||||
isEating = role.isEating();
|
||||
|
||||
Reference in new issue
Block a user