danielthedev / npc Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Hi!
Firstly, I want to tell you that your project is really cool! The problem is, I can't teleport or destroy a NPC.
I'm using a simple code of creation instruction, waiting (with BukkitRunnable) then teleportation/destroy instructions.
if(args[0].equalsIgnoreCase("test2")) {
NPC test = new NPC(p.getLocation(), "test");
test.spawnNPC(p);
new BukkitRunnable() {
@Override
public void run() {
test.destroyNPC(p);
p.sendMessage("§a§lDESTROYED");
}
}.runTaskLater(EldarothPlayer.instance, 20*3);
}
The NPC is created, but that's it. When I'm destroying it, I get this error:
[09:50:09 WARN]: [EldarothPlayer] Task #26 for EldarothPlayer v1.0-SNAPSHOT generated an exception java.lang.NoSuchMethodError: 'void net.minecraft.network.protocol.game.PacketPlayOutEntityDestroy.<init>(int)' at io.github.danielthedev.npc.NPC.getEntityDestroyPacket(NPC.java:319) ~[ELDAROTHPLUGIN-1.0-SNAPSHOT-shaded.jar:?] at io.github.danielthedev.npc.NPC.destroyNPC(NPC.java:113) ~[ELDAROTHPLUGIN-1.0-SNAPSHOT-shaded.jar:?] at me.funkyfight.eldarothplayer.commands.DebugCommand$1.run(DebugCommand.java:93) ~[ELDAROTHPLUGIN-1.0-SNAPSHOT-shaded.jar:?] at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[patched_1.17.1.jar:git-Paper-400] at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483) ~[patched_1.17.1.jar:git-Paper-400] at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1567) ~[patched_1.17.1.jar:git-Paper-400] at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:490) ~[patched_1.17.1.jar:git-Paper-400] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1483) ~[patched_1.17.1.jar:git-Paper-400] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1282) ~[patched_1.17.1.jar:git-Paper-400] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[patched_1.17.1.jar:git-Paper-400] at java.lang.Thread.run(Thread.java:833) ~[?:?]
Line 93 in the stacktrace refer to the .destroyNPC(player) method
Hi,
I updated your code for the 1.18.2.
You just have to change the imports and to get the entity counter field, change the "b" to "c" when you initialize the atomic integer.
More info on the mapping here: https://minidigger.github.io/MiniMappingViewer/#/mojang
Hello,
Could you update your lib to 1.18? I would need it to update one of my plugin that use it. Thanks!
Hi,
I've been testing the update of the lib and I found that the skins applied by either UUID or Name isn't working. It does work if I modify directly the GameProfile though and provide the texture and signature.
I'm using your gist of the 1.19 (updated for 1.19.1)
Hello,
Sorry to bother you. I was trying to update your lib on 1.19 but unfortunately I run into some issue with the pose. I don't really get how to make it work ^^' Looks like it needs an OptionalInt instead of the actual pose. I don't really understand what's the issue, and the little website for the remap is down so I can't really look into it ^^'. So, I was wondering if you could update the lib to 1.19. Thanks
Hi,
can you add that an NPC is sleeping?
You could then use it as a corpse.
Thanks in advance!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.