Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPCs Not Spawning #97

Open
EazyFTW opened this issue Jun 29, 2020 · 5 comments
Open

NPCs Not Spawning #97

EazyFTW opened this issue Jun 29, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@EazyFTW
Copy link

EazyFTW commented Jun 29, 2020

Describe the bug
NPCs don't always spawn.

NPCLib usage option
3

NPCLib JAR name
npclib-plugin-2.8-SNAPSHOT.jar

Server version
This server is running CraftBukkit version git-Spigot-ad703da-e2403a3 (MC: 1.16.1) (Implementing API version 1.16.1-R0.1-SNAPSHOT) (latest at the time of posting this)

To Reproduce
Steps to reproduce the behavior:
Try to spawn NPCs. Using example 1 as an example:

    @EventHandler
    public void onPlayerToggleSneak(PlayerToggleSneakEvent event) {
        if (event.isSneaking()) {
            return;
        }

        NPC npc = npcLib.createNPC();
        npc.setLocation(event.getPlayer().getLocation());
        npc.create();
        npc.show(event.getPlayer());
    }

Also, it seems to work even less if you try to make the NPC be on fire.

Expected behavior
A NPC spawns every time.

Screenshots
I tried getting a mp4 of the issue, but couldn't.

Sometimes after a while it just stops working.

Additional context
Add any other context about the problem here.

@EazyFTW EazyFTW added the bug Something isn't working label Jun 29, 2020
@EazyFTW
Copy link
Author

EazyFTW commented Jun 29, 2020

I managed to get a clip off the issue with NPCs on fire. But the same thing happens with normal NPCs except after a while they don't work at all.

https://i.eazyftw.com/5JyU75h.mp4

@EazyFTW
Copy link
Author

EazyFTW commented Jun 29, 2020

Figured out it only works when you're looking down. (30+ pitch)

@EazyFTW
Copy link
Author

EazyFTW commented Jun 29, 2020

Could be related/similar or the same as #96

@Mooselk
Copy link
Contributor

Mooselk commented Jul 3, 2020

I've had a somewhat similar issue when spawning in an NPC while not looking at it causes it to not load properly. However, after spawning properly it continues to work fine. Canceling the NPCHideEvent if the plugin tries to hide it automatically fixed the problem.

Edit: Having this issue on all versions 1.8.3 to 1.16.1

@Cryptite
Copy link

Came across this today as well. It's pretty common for players to spawn NPCs at their location and to have them trip out and be invisible is odd. Might be worth a one-off check in this specific scenario as I wouldn't call this an edge case.

Took some debugging to figure out I needed to really not spawn it on top of me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants