Minecraft PC IP: play.cubecraft.net

DrHam

Forum Professional
Sep 15, 2015
3,615
4,166
558
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

Latest profile posts

Ok! I am done with the map, and I am about to submit it!
Sionnachh wrote on LorilambtheWcubecraftian's profile.
Happy belated birthday
m7kk7710 wrote on Verbramdt's profile.
Hi😘
Hit level 91 the other day. My goal is to get level 100 by Christmas, and I needed 4 levels this month, which I achieved, and 3 levels in all the others until Christmas. I'm getting a lot of XP, so I'm going to practice my combos in duels ( because my skill fell off when I quit last year). So I'll, be practicing until October! Hope you guys have a good day/night.
Top Bottom