Dude! Where's my Horse?

Dude! Where's my Horse?

1M Downloads

entity duplication and inability to find the entity

Biviho opened this issue ยท 7 comments

commented

1.12.2
sometimes i can summon an entity from at least 4 chunk, go back to where the entity was bringing the summoned entity with me, anding up having 2 of the same entity, one where it was, and the other one the summoned one.
Both entity are considered the same: if i claime one, both are claimed, but only the summoned one is teleported, the same when trying to unclame one.
If i unclame both, than kill the summoned one and claim back the original, trying to summon the original will result in an "unable to find the entity" message.

edit: also, sometimes a summoned entity with a clone that was unclaimed will disappear after dismounting if it is a horse, not tested with other creature

commented

i have managed to make the duplication bug consistent:

consider having two location far away and consider 2 chunk for each location (i will name them location-chunk: 1-1, 1-2, 2-1, 2-2)
Bring/teleport the entity in 1-1, kill, than resummon the entity in 1-1.
Now:
-go to 2-1, summon the entity and resummon it to 2-2
-go to 1-1, old entity is still there, summon the entity, a new one is created, resummon it to 1-2
-go to 2-1, the entity is still in 2-2, summon again a new one in 2-1 and summon it to 2-2
-go to 1-1, the old entity in 1-1 no longer exist, there is one in 1-2, summon the entity in 1-1, resummon it in 1-2
-from this point you can go in one 2-1, summon in 2-1, resummon in 2-2, go in 1-1, summon in 1-1, resummon in 1-2 and repeat to have one new entity in 1-2 and 2-2
until you have 4 and 4, at that point any new entity will instantly die

on superflat world is different:

-kill entity in 1-1, resummon in 1-1
-go in 2-1, summon in 2-1
-go in 1-1, the entity is still there, resummon in 1-1 or in 1-2, you now have 2 entity and you can kill them both, if you go to 2-1, the entity is no longer there and if you get back to 1-1 there is only one entity

after loading the superflat world and reloading the normal world save, all the cloned entity are gone exept for the last one

commented

Yeah, I noticed the potentially for this issue happening when I was rewriting it for 1.14. I've decided to change the way entity saving works to match the system in 1.14, I just need to get the time to sit down and do it, unfortunately. Thank you for the report! I really do appreciate it; it's nice to have some confirmation that it definitely is an issue.l

commented

no problem, i'am really enjoying the mod at the moment even with this bug.
If you need some help with testing, you can count me in!

commented

ok, i'm starting to think to add this mod to a 1.12.2 modpack that i want to create, but i think i will do this only when the bug will get fixed, i hope you will find the motivation soon, i know the struggle, also, is there any place where i can leave some suggestion for feature?

commented

Greetings! I must admit, it's more a matter of being distracted and working on 1.14.4 that has taken over my attention. I've come up with a better implementation in 1.14.4 so I just need to wipe out what exists in 1.12.2 and then back-port everything over. It will be slightly "lossy" (unfortunately) and no longer attempt to save entities from death, merely allowing for loading them from chunks.

I'm getting back into working on 1.12 mods though, so I'm hopeful that I'll have the brain power to fix this up this month.

commented

oh, is great to hear that! (and unfortunate for the lossy part, but for my personal experience is not really a problem, you can always breed more horses or other animal)
I want to ask you, if you accept suggestion and if is not too much of a problem, if it would be possible to add condition for mob specific "storage" in the ocarina:

for example, all tamed mob would be stored without any problem, for non tameable mob (like cows, rabbits, villagers...) you will have to hold an item in the other hand and an attempt to "store" the mob will consume the item with a probability of success

commented

That is actually part of the current issue with the 1.12.2 code: it attempts to "store" entities automatically (upon being unloaded or dying), and the code itself is quite messy. Honestly, though, it was when I was working on the 1.14.4 update that I realised how out of scope it had become: this is meant to be a tool for summoning pets, wherever they are, not for storing them.

There are a lot of options for storing pets if you'd prefer, golden leashes, monster balls, etc.