Kir-Antipov / sync-fabric

One mind. Many bodies.
MIT License
17 stars 13 forks source link

Ghost Shells can be used to dupe Items #13

Closed teoWei closed 2 years ago

teoWei commented 2 years ago

When no clones of your self exist and while a shell is being constructed, going into a Shell Storage and switching to the body you were switching from will instantly finish the shell that is being constructed and dupe everything in the shell you were switching from to the newly constructed shell. For while multiple shells are being constructed, I observed that it choses a random shell to dupe and once there's 2 fully constructed shell, dupe will stop working unless the shell dies until 1 remain.

Kir-Antipov commented 2 years ago

Could you provide me with some screenshots and all the actions needed to reproduce the issue, please? Because I don't quite understand what you mean by

switching to the body you were switching from

teoWei commented 2 years ago

I just did some testing again and I found out, you're not supposed to be able to switch to the shell you're currently in. Somehow the first time I tried the mod, it allowed me to switch to the shell that I'm currently inside of but have no idea how did I get to be able to do that. (In this image, I don't have any shell constructed, just the original shell that I'm inside of.) image

I'm not sure why but the dupe seems to only work with this specific shell constructor. It doesn't even need to be constructing the shell, it just needs to have your sample and the dupe would just work. I'm also not sure how did I get this specific shell constructor to have special abilities. I tried breaking and replacing it, it'll still dupe. image

But this is how I duped while being able to switch to a shell I'm currently inside of and with a shell constructor with special abilities: 1) Make sure you have no clones/shells, just the one you're currently in. image 2) Start construction of a shell in THE shell constructor.(I gave it my sample, you can't see it because it's not constructing. It doesn't need to be constructing the body to dupe, it just needs your sample.) image 3) Put yourself into a shell storage. image 4) Switch to the current body you're in. image 5) You should be in the shell storage that you were in but with you and a shell of you in it. The shell in the shell constructor should be gone and both you and the other shell should have similar inventory. image 6) You can switch off the power source to the shell storage and kill the shell, it should drop it's inventory when it dies. (It also drops the xp too.) image

Kir-Antipov commented 2 years ago

I found out, you're not supposed to be able to switch to the shell you're currently in

Yeah, that's why I was confused. Radial menu contains non-active shells only. Therefore, the main question is how did you get one of those?

Can you reproduce this behavior in any world? Or does it only work in this one with this specific shell storage?

teoWei commented 2 years ago

I'm not sure how I gotten into this predicament. Also btw, it only works with that specific shell constructor, not shell storage.

Kir-Antipov commented 2 years ago

May I ask you for a world download?

teoWei commented 2 years ago

Yea, sure. https://www.mediafire.com/file/1eysz6syjggrz5d/test+0_1_0.zip/file

Kir-Antipov commented 2 years ago

Thanks a lot, it was really handy to understand what's going there!

The problem is the shell you're trying to sync with does not really exist ("ghost shells may appear from time to time due to some unlikely events, e.g., chunk being unloaded mid-tick, server crashing, and so on. Sadly, there's not too much I can do about it"), but its presence in your radial menu allows you to initiate the syncing process with a shell at the same coords that has not been constructed yet.

The syncing process itself fails (that's why you don't move to another location), but a copy of yourself has been already stored in the shell storage by that time.

Good news are the issue is not reproducible in the latest dev builds (I've been doing a lot of refactoring lately). The syncing process will fail with the message "The selected shell cannot be found", and no duped shell will be created

teoWei commented 2 years ago

That's great!

Kir-Antipov commented 2 years ago

Has been fixed in mc1.17.1-2.0