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

Wires don't appear even with enableWireResend enabled #1

Open
Andre601 opened this issue Jun 22, 2020 · 9 comments
Open

Wires don't appear even with enableWireResend enabled #1

Andre601 opened this issue Jun 22, 2020 · 9 comments

Comments

@Andre601
Copy link

The issue

I encounter the issue, where wires set aren't appearing (silverfish don't spawn and no lead is visible).
Even having enableWireResend set to true doesn't fix this issue.

Context and steps

The wires, in particular, are saved in a separate world that I have to teleport to first (will change in the future).
The world is called spawn and here's the content of the wires.txt

c4b58297-e39a-4157-9436-fa60d492e32a,spawn,68.5,29.5,174.5,71.5,31.5,174.5
74d56ed0-b880-4a98-a891-a300d23aa877,spawn,62.5,36.5,160.5,65.5,38.5,160.5
4ad2a47c-5620-4ce1-bb2e-09ff62e6113d,hub,-13.5,69.5,-26.5,-17.5,70.5,-26.5
b819bc1b-51a7-44a5-9dd8-12cacfe51212,hub,-21.5,69.5,-26.5,-17.5,70.5,-26.5
6d702981-e8a5-4ed2-94e2-a04ad6537cf8,spawn,115.5,30.5,183.5,117.5,31.5,185.5
732c67bb-efe4-4616-a277-84e41a6226be,spawn,59.5,36.5,160.5,62.5,36.5,160.5
2edd246d-accd-43f8-a3a1-30a1563066fe,spawn,68.5,29.5,174.5,65.5,31.5,174.5
fd35ada5-74d0-4a94-ae2f-76b6938f5eec,spawn,62.5,36.5,156.5,59.5,36.5,156.5
f8535f45-5c1a-4a64-bbc4-6a9fb21e4503,spawn,59.5,36.5,156.5,56.5,38.5,156.5
57e783f4-4b8a-4a5f-b818-069f88c51bf1,spawn,115.5,30.5,183.5,117.5,31.5,180.5
62871461-94a5-4108-83d8-17169543a4f1,spawn,68.5,29.5,178.5,65.5,31.5,178.5
5d5979ec-3b4b-4b86-b61f-d09cf4c8740b,spawn,62.5,36.5,156.5,65.5,38.5,156.5
074c5ce7-042c-4738-b229-2e291b920013,spawn,68.5,29.5,178.5,71.5,31.5,178.5
be94323a-fe6e-4cf7-96a2-e1aacd08f4a8,spawn,59.5,36.5,160.5,56.5,38.5,160.5

All wires in hub are perfectly fine.

Steps to reproduce (I guess):

  • Have a separate world where you aren't by default.
  • Teleport to it.
  • Create wires
  • Teleport to another world or restart the server.
  • Go back to the world.

Info

  • Server: PaperMC git-Paper-334 (MC: 1.15.2)
  • Plugin: 1.1.1
  • Other Plugins:
    • AdvancedTabOverlay
    • Animatronics
    • ArmorStandTools
    • BKCommonLib
    • CinematicUI
    • Citizens
    • DeluxeChat
    • DeluxePlugins
    • DiscordSRV
    • Essentials
    • EssentialsSpawn
    • HeadDatabase
    • HelpPagePlus
    • HolographicDisplays
    • InfoHeads
    • InteractiveBoard
    • LeaderBalloons
    • LeadWires
    • LightAPI
    • LuckPerms
    • MailMe
    • Maplands
    • MessageAnnouncer
    • Multiverse-Core
    • OpenAudioMc
    • PlaceholderAPI
    • PowerPlugins
    • ProtocolLib
    • QuickShop
    • ServerListPlus
    • StatusNPC
    • SurveyPlus
    • Train_Carts
    • Vault
    • VoidGenerator
    • WarpSystem
    • WorldEdit
    • WorldGuard
@saharNooby
Copy link
Owner

I would like to get a minimal server which reproduces the issue.

If it is possible, you need to copy your server and start removing everything one by one (datapacks, plugins, etc.), except LeadWires. That way you either will find which plugin may cause problems, or get a minimal server bundle, and send it to me.

If you don't want to send a server bundle, I can debug with you in real time in Discord, but that way I can not guarantee that I will have time soon to do this.

Also, info required:

  • which plugin is used to create worlds
  • how exactly are you teleporting (portal or command)

@Andre601
Copy link
Author

I can't really provide a "minimal" server setup here. I could - at most - give the domain so that you could join and see it yourself.

To answer some of your questions:

  • I use Multiverse-Core for managing worlds
  • I updated my world to be the new one, but before that did I always teleport to it using Multiverse's /mvtp command.

Even with the world now changed does the issue appear at random.
Could it by any chance be a problem with WorldGuard, as I deny mob-spawning (Spawnings caused by plugins however are enabled in WorldGuard's config.

It also seems to happen that the Silverfish don't appear at all or they do appear but with no leash attached to them.

@saharNooby
Copy link
Owner

saharNooby commented Jun 26, 2020

Could it by any chance be a problem with WorldGuard

No, LW constructs and sends packets by itself, the spigot (and therefore other plugins) don't know about these entities.

the Silverfish don't appear at all or they do appear but with no leash attached to them

Looks like the client is ignoring packets, either entity spawn packet or entity attach packet.

I will try to reproduce the issue with Multiverse plugin, but most likely I will fail to reproduce it. Then I implement a command to resend wires to player, so you can test, whether a resend fixes the problem. If it does, I will implement another workaround like continious resend (respawn all wires every sec lol).

@saharNooby
Copy link
Owner

I could't reproduce the issue with Multiverse plugin.

Anyway, I've implemented /respawn-wires [player name] command. You need to enter this command (specifying your player name) and check whether the wires appear. Also, this command will print some info (wire and chunk counts), which will be useful for me to see.

If the command works, I will implement some workaround like continous respawn, as I said earlier.

To get new version of the plugin, you can build it from this repo (instructions are available in README.md). Until this issue is resolved, modified plugin will not be available on SpigotMC.

If you can't build the plugin, I can give you prebuilt version.

@Andre601
Copy link
Author

The command does make the wires appear again.

How do you actually track if players are near a leads (spawn) location to display/respawn the lead?

@Andre601
Copy link
Author

Andre601 commented Jun 27, 2020

Forgot to provide what the plugin is telling when using the command:
image

The wire count makes sense. It's 12 wires I currently have set.

@saharNooby
Copy link
Owner

How do you actually track if players are near a leads (spawn) location to display/respawn the lead?

The plugin listens for outgoing chunk send/chunk unload packets to track chunks that are visible (loaded) to a player. When a new chunk loads, the plugin checks any wires that will become visible (wire is visible, when both of its ends are in visible chunks), and sends them.

On chunk unload the plugin detects wires that became invisible and despawns them.

Since the plugin correctly shows chunk count and respawn command works, the problem is not with chunk visibility tracking. I think the client may be ignoring entity spawn or entitiy attach packets, because chunk is not yet processed by the client somehow (LW sends entity packets immediately after chunk packet). This may explain why I can't reproduce the issue on my local server, where worlds are simple and there is no network lag, but that's not the case on production servers (yours and other guy, who had the same problem).

Anyway, exact cause is unknown to me. Since the command is working, I will implement wire respawn timer and an option to enable it in config.

@Andre601
Copy link
Author

Hmmm okay.
There's another plugin - TCCoasters - that also uses leashes for things and it seems that it doesn't have any disappearing ones there. It's also on the packet level according to the dev.
You could perhaps check how they do it...

@saharNooby
Copy link
Owner

I've impemented respawn timer.

Add this to config.yml:

continiousRespawn:
  enabled: true
  # Respawn interval in ticks (1 tick = 1 / 20 of a sec).
  interval: 100

If it works, I will release this plugin version on SpigotMC.

Also, I will implement wire view distance somewhere in the future, because it looks like spawning anything in chunks on the edge of player view distance is a bad idea. This may fix all problems with wires disappearing and remove need for ugly workarounds like respawn timer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants