Lythom / capsule

A minecraft mod : Bring your base! Capsules can capture a region containing any blocks or machines, then deploy and undeploy at will. Inspired by Dragon Ball capsules.
MIT License
17 stars 13 forks source link

Items not available in starter capsule chest 1.20.1 V8.0.105 #115

Open MythCracker opened 3 months ago

MythCracker commented 3 months ago

Hello, I created a starter capsule hut with a diamond barrel from the Sophisticated Storage mod, and originally when I tested it out, it seemed to work just fine, spawning the hut and giving me all the items contained within without any issues. I had a friend join, and he also received all the items within the chest without issue. I recently deleted the world file and left everything else alone to do some more testing with other stuff, and had a new friend join. He joined without issue, and got the capsule as well as all the items contained within. I had joined the new world before him, so I already had my capsule, but thinking that it was fine, hadn't yet deployed it. I deployed my starter hut after he deployed his, only to find that none of the items are showing up in the chest for me. I tried deleting all of my player data in the world so that it would give me the starter capsule again, and still no items are showing up for me, even though they did for this other player who joined this world after I did. Any idea what might be going wrong? There's only 1 file in the starter capsule folder right now and I don't know what else it could be. Let me know if there's any other info you need.

Lythom commented 2 months ago

Hey ! This is indeed a bit strange and not sure what's wrong. The way it works: when a new player joins, the starterCapsule template is duplicated to create a new linked capsule that is unique to the player. The item loss might be due to an error while copying the template, maybe mod was removed or something in the world files was required so the copy of the item fails ? If this is due to an error, the error should appear in the log files just after the capsule creation when joining with a new player.

You might want to "manually" fix the player state by doing as an op :

Command doc: https://github.com/Lythom/capsule/wiki/Commands#givelinked

This while create a copy of the template for the player.

MythCracker commented 1 month ago

Hey! Thanks for the info and commands! I meant to update this earlier but forgot. I did manage to narrow down the issue to the fact that the items didn't disappear when I put them in a vanilla chest, it was only happening with the modded container. Not sure what exactly that could be, maybe when copying the template after the fact it only copies the container but isn't able to get the contents of the container? At the very least I didn't see any errors in the console after a player joined when testing. I did work around it for now be just leaving the modded container in there, but keeping the items in a vanilla chest.

I'll update again if I get the chance to test the modded container with items and using the command to give the capsule to see if it still happens or not. For clarity, the modded container was the Diamond Barrel from Sophisticated storage. And if you have any questions about any other info I could provide let me know.