Minecraft PC IP: play.cubecraft.net
  • We're running an internal migration of all old players' stats to our new highly advanced statistics tracking backend. This means that stat changes will be a bit delayed while we ingest this huge backlog of data. Nothing is being lost, it'll just take a bit longer to show up in the in-game UIs.

DrHam

Forum Veteran
Sep 15, 2015
3,615
4,166
518
Kepler-452b
Simple code to make NPCs (which will only be seen be the player who receives the packet)
Code:
PlayerConnection pc = ((CraftPlayer) p).getHandle().playerConnection;
WorldServer world = ((CraftWorld) p.getLocation().getWorld()).getHandle();
MinecraftServer server = ((CraftServer) Bukkit.getServer()).getServer();
EntityPlayer ep = new EntityPlayer(server, world, new GameProfile(p.getUniqueId(), ""), new PlayerInteractManager(world));

ep.world = ((CraftWorld) p.getLocation().getWorld()).getHandle();
ep.setLocation(p.getLocation().getX(), p.getLocation().getY(), p.getLocation().getZ()+2, 20, 0);
pc.sendPacket(new PacketPlayOutNamedEntitySpawn(ep));
There are bunch of methods for entityplayer, so it's fairly easy to set its rotation, wether its swimming, etc

upload_2020-5-5_20-28-8.png

Result ^

I’m not a nms expert, so you’re better off asking on Spigot tbh
bai
 
  • Like
Reactions: Finixly
Members Online

Team online

Latest posts

Latest profile posts

HOTROD the 6th wrote on Daanfkyy's profile.
Congrats on bedrock helper, hope you succeed!
ItzJuan wrote on Marta's profile.
🫡 Thank you for all the hard work you've done. We'll never forget you.
HelmutRebew wrote on Alexp192's profile.
Thanks for the follow!
This place got turned into a graveyard! I didn't cause this, I witnessed this. I have 4 kills and most of them didn't happen here
1780484708293.png
IT'S SHOWTIME (again)
Top Bottom