CitizensDev / Citizens2

Citizens - the premier plugin and API for creating server-side NPCs in Minecraft.
https://citizensnpcs.co
Open Software License 3.0
590 stars 313 forks source link

NPC skins turning into Steve/Alex #1632

Closed Scabista closed 4 years ago

Scabista commented 5 years ago

The output of command /version on my server is: https://imgur.com/jXJ6XD3 The output of command /version citizens on my server is: https://imgur.com/a/P3bNGeG

mcmonkey4eva commented 5 years ago

Both your Spigot jar and your Citizens jar are a bit outdated. Should probably update them both to start.

Some info on this wiki page might be relevant: https://wiki.citizensnpcs.co/Skins But if I understand correctly it sounds like you're encountering an issue we've had in the past but that hasn't been reported in a while. I don't know offhand if it was ever completely fixed.

Scabista commented 5 years ago

I'm running a 1.12.2 server, not 1.13+. We use over 100 plugins, and some do not work yet with 1.13. I was sure I updated to the correct version of citizens, for that, no?

mcmonkey4eva commented 5 years ago

Run latest Citizens and latest Spigot 1.12.2

I didn't say update Minecraft, that's not required at the moment (1.13 is still new and is a tough change so we fully dual-support 1.12.2 and 1.13.2)

Citizens2 latest: http://ci.citizensnpcs.co/job/Citizens2/ Spigot latest: https://www.spigotmc.org/wiki/buildtools/ (java -jar BuildTools.jar --rev 1.12.2)

axemwa commented 5 years ago

I get this problem aswell in current latest dev/jenkins builds of citizens in 1.13.2 and I have to use /citizens reload to fix the skins. Sometimes the skins will fix them selves when either facing them at a certain angle or leaving and reentering the chunk

LeafyMitsuwa commented 5 years ago

I have encountered this issue as well on a small lobby I happened to be OP in.

The lobby itself is approx 12 chunks in width. In the center of this lobby, is an NPC with a santa skin.

I've seen it happen where, by simply idling, the skin of this NPC would revert to Steve, and moments later, would be back to the intended skin -- without reloading citizens.

These changes always happen when I do not see the NPC itself, it simply comes into field of view with either its skin, or the Steve skin, and a few loops later, usually has its original skin back.

The server is running bungee. The Lobby uses viaforward, and I am usually on there using a 1.13.2 client.

/version of the lobby. This server is running CraftBukkit version git-Spigot-dcd1643-e60fc34 (MC: 1.12.2) (Implementing API version 1.12.2-R0.1-SNAPSHOT) This is a final build for 1.12.2. Please see https://www.spigotmc.org/ for details about upgrading.

/citizens =====[ Citizens v2.0.22-SNAPSHOT (build 1487) ]===== -- Written by fullwall and aPunch -- Source Code: http://github.com/CitizensDev -- Website: http://www.citizensnpcs.co

I'll update to latest citizens, and see if issue persists.

mcmonkey4eva commented 5 years ago

@LeafyMitsuwa you're running a version of Citizens that's about 1.5 years old now.

axemwa commented 5 years ago

This is what it's doing for me https://youtu.be/T7hmV-yu6LY

Scabista commented 5 years ago

As far as I can tell, I'm fully updated. The issue still persists.

https://i.imgur.com/7nQJkhF.png

fullwall commented 5 years ago

What is the citizens output when debug-mode is turned on in the config

Scabista commented 5 years ago

Reload usually corrects it, at least for the person using the command, This isn't a fix though. What npcs have skin issues is player side, so some players may rarely experience the problem, while others get it more often. A player may see a npc with their skin, while another will see the same npc with a Steve/Alex skin. Seems plenty of people have this issue, not just myself.

axemwa commented 5 years ago

Here's my latest log of server start and stop with debug enabled. The next time the NPC skins aren't showing I will update the latest.log link The link below just shows the output after starting and stopping the server

https://pastebin.com/xYwYdVQA

axemwa commented 5 years ago

Heres a log when the npc skins weren't working/applying on NPCs https://pastebin.com/HH2dKnZT I didn't notice much difference in the log from when the skins were working/applied Leaveing and re-entering the chunk brings the skins back Another note, this is all in a WG region

axemwa commented 5 years ago

On another note when this message apppeared in console Spawned id 159 due to chunk event at [-12,15] if those are co-ordinates x & y I tp'd there and there's nothing there that looked abnormal

mcmonkey4eva commented 5 years ago

Those are chunk coordinates (not block coordinates) Which NPCs (names+skinnames+IDs) were missing skins? At what point during that log (throughout the time the server was running, or only for part of it?)

edit: please also pastebin your Citizens/saves.yml file

axemwa commented 5 years ago

Pretty sure it was ALL of the NPC's in that chunk that were missing textures for their skin.

The NPC's were

image

I thought I'd also mention that all those NPCs are inside the main "world" spawn area which chunk stays loaded (that area is also in a worldguard region called spawn)

Will link the saves.yml in a sec

axemwa commented 5 years ago

Here's my saves.yml

EDIT - Also thought I'd mention the npcs with actual player names are from the statusblock plugin and weren't made with the /npc create command

Scabista commented 5 years ago

I wonder if this issue could have anything to do with having the free version?

mergu commented 5 years ago

It doesn't. There is no 'premium' version of Citizens.

From the spigot page: This is posted as a premium resource to motivate the continued development of the plugin. If you would not like to contribute to development you are welcome to download the same versions for free here but please read 'Why premium?' below for more information.

Scabista commented 5 years ago

Just thought I'd mention this is still an issue.

mergu commented 5 years ago

So I can actually fairly reliably replicate skin loading issues in Citizens:

image

image

So seems to have something to do with players not receiving the skin if they're not directly looking at the npc when it's spawned

SlimeDog commented 5 years ago

Is probably same issue (tagging so I get updates on this one).

axemwa commented 5 years ago

A temporary fix for this could be to add a new command /citizens reload skins and an option in config to apply the command when a player joins and/or when a player is in close proximity to an NPC. Only thing is you would have to do it in a way where it doesn't temporarily show the armorstand when it's reloading which players might notice

axemwa commented 5 years ago

Or can these settings below be tweaked somehow so that NPC skins show properly most of the time?

skins: max-retries: -1 retry-delay: 120 rotation-update-degrees: 90.0 use-latest-by-default: false view-distance: 100.0

EDIT

Using these settings keeps the skins updated, doing this I didn't notice any major lag, I set retry delay to 20 so that if it fails then it will try to apply the skin every second until it is applied. Lemme know if this temp solution works for anyone else

skins: max-retries: -1 retry-delay: 20 rotation-update-degrees: 90.0 use-latest-by-default: false view-distance: 100

mergu commented 5 years ago

Please don't spam issues. If you have more to add, edit your previous post.

axemwa commented 5 years ago

Sorry was trying to discuss a possible temp solution, I edited it together

fullwall commented 5 years ago

I believe this is intended(?) albeit conservative behaviour. What happens is that when players move Citizens runs some logic to determine whether to send them new skin updates from nearby NPCs. I would be interested to see your results after lowering rotation-update-degrees.

mcmonkey4eva commented 5 years ago

I'm actually not able to replicate this while testing on 1.14, at least not via @mergu 's method (which I've previously verified to consistently produce a skin load failure in 1.13)

SlimeDog commented 5 years ago

Spigot 1.14 MC client 1.14.1-pre2 ViaVersion 2.1.0-1.14.1-pre2 Citizens 2.0.25-b1675, default configuration (in particular, retry-delay:120)

With this configuration, I am unable to replicate morgu's method, or any of my previous failure modes, including Alex at connection until player moved. Maybe this issue has been resolved.

axemwa commented 5 years ago

I getting this issue in 1.13.2 still but haven't tested in 1.14+ yet, definitely a client-side problem i reckon since it doesn't happen for everyone

richiedevs commented 4 years ago

got same issue here aswell