ZHorse

ZHorse

10.4k Downloads

Horse duplication on teleportation

RanokES opened this issue ยท 7 comments

commented

Bug report

What are you trying to do ?

Duplicate horses with /zh here and all the items they have. It works also for mules.

What is the expected behavior ?

It's expected to just teleport one horse to you, not to duplicate it.

What is the actual behavior ?

After spamming for some times /zh here, the horse/mule/whatever duplicates.

How to reproduce the bug ?

  1. Have a tamed Mule.
  2. Spam in chat /zh here
  3. After spamming for 4/5 times, the horse (Mule) is duplicated and with him, all the objects.

Console output

There is no console output.

Environment specifications

  • Operating system : Linux
  • Java version : 8
  • Server version : 1.14.4 (PaperSpigot)
  • ZHorse version : 1.8.1
  • Database : SQLite
commented

Until it gets fixed, you can avoid this by enabling Settings.use-old-teleportation-method in the config. Both methods have their own issues depending on the server: the vanilla (Bukkit) one will actually teleport the horse but may not work well in plugin-protected areas ; the new one (ZHorse) does not move the horse but deletes and re-create it from scratch at the destination location.

The custom teleportation method has several layers of checks to ensure that the old horse was indeed deleted so it may take quite some time for me to be able to reproduce this issue and figure out what is not working here.

commented

@RanokES Could you make sure that you were running the latest PaperMC build for 1.14.4 at the time those bugs happened ? I got reports from previous builds saying that there was an issue with chunks (un)loading which can impact the removal of duplicate horses.

Also, could you try to duplicate a horse again (juste enable back the new teleportation method and use /zh reload) and do the following ? :

  • Note any particular condition for the occurrence of the bug.
  • Verify if the duplicated horse is still there when you let its chunk unload and load. There is a fail-safe for the removal of duplicate horses which mark them as "to be removed" when they are loaded in a chunk.
commented

Also, I forgot to mention, you can set a cooldown on the /zh here command so that players won't be able to spam it.

commented

@Zedd7 We are testing this in the 233 build of PaperMC, so yeah, it duplicates in the latest version.

For your other questions:

  • Nothing in particular. I just execute the /zh here command multiple times. Although in some trys it duplicates the same horse/donkey/mule, others with no armour, with or without chest (And all their content), the same horse but in its baby version... Its kind of random.
  • I tried to load/unload the chunk and all the generated horses didn't disappear :s
commented

Well can't we just add a 20 seconds command cooldown to make sure this "feature" cannot be utilized at all?

commented

Well can't we just add a 20 seconds command cooldown to make sure this "feature" cannot be utilized at all?

Yes you can

commented

@Zedd7 I'm sorry... I just print some of my first impression on this topic...