I'm trying to code a Minecraft Spigot Plugin using NMS. I want to create and spawn an NPC. The code I wrote for creating the EntityPlayer
, GameProfile
and for sending the packets works fine, but I can't figure out how to set the EntityPlayer
metadata in 1.18.1. I've tried doing the same thing in 1.15 and it worked perfectly.
md_5
remapped a lot of methods. For example, to get the DataWatcher
of an EntityPlayer
, I used to do npc.getDataWatcher();
, but now I have to use npc.ai();
. I can't seem to find a solution on the internet that works in 1.18.1 without any other APIs such as Citizens.
I think I figured out all the methods counterparts, but it still doesn't work.
So, how did the way you set Metadata of an EntityPlayer
change in 1.18.1?