Minecraft PC IP: play.cubecraft.net

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

Members online

Latest profile posts

Is this a bug or is it intended?
1749089622388.png
Hi! I didn't do well on my trial, and it is my own fault. But I am not lying when I say that this community has been so kind and accepting to me, and I appreciate all of you. I'll still be around. ✨
GiGaGekkies wrote on Hqteful's profile.
Gefeliciteerd
BrunoScott wrote on Hqteful's profile.
Gefeliciteerd!!!!🎉🥳
BicolourSine41 🇺🇦 wrote on Hqteful's profile.
Gefeliciteerdddd!!!
Top Bottom