small fix HAHAHA

This commit is contained in:
luisc committed 2025-06-03 18:18:24 -05:00
1 parent 43154bba15
commit 0b60f4b455
2 files changed
+2 -1

No files matched your search

@@ -55,6 +55,7 @@ public final class RoleGetPacket extends AbstractPacket {
NBTTagCompound compound = new NBTTagCompound();
compound.setBoolean("RoleData", true);
compound.setInteger("RoleOrdinal", npc.advanced.role.ordinal());
GuiDataPacket.sendGuiData((EntityPlayerMP) player, npc.roleInterface.writeToNBT(compound));
}
}
@@ -119,7 +119,7 @@ public class GuiNpcAdvanced extends GuiNPCInterface2 implements IGuiData {
@Override
public void setGuiData(NBTTagCompound compound) {
if (compound.hasKey("RoleData")) {
npc.advanced.setRole(compound.getByte("RoleData"));
npc.advanced.setRole(compound.getInteger("RoleOrdinal"));
if (npc.roleInterface != null)
npc.roleInterface.readFromNBT(compound);