Get NPC Role packet

This commit is contained in:
somehussar committed 2025-02-03 04:32:59 +01:00
1 parent a5c3c6768b
commit 10f12ad036
7 files changed
+65 -13

No files matched your search

@@ -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();