Code Monkey home page Code Monkey logo

Comments (9)

saharNooby avatar saharNooby commented on July 21, 2024

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)

from lead-wires.

Andre601 avatar Andre601 commented on July 21, 2024

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.

from lead-wires.

saharNooby avatar saharNooby commented on July 21, 2024

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).

from lead-wires.

saharNooby avatar saharNooby commented on July 21, 2024

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.

from lead-wires.

Andre601 avatar Andre601 commented on July 21, 2024

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?

from lead-wires.

Andre601 avatar Andre601 commented on July 21, 2024

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.

from lead-wires.

saharNooby avatar saharNooby commented on July 21, 2024

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.

from lead-wires.

Andre601 avatar Andre601 commented on July 21, 2024

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...

from lead-wires.

saharNooby avatar saharNooby commented on July 21, 2024

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.

from lead-wires.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.