Configured Keep Inventory

Configured Keep Inventory

335k Downloads

Unconfigured Items are Deleted

IAmSneak opened this issue · 23 comments

commented

Items that are not in the keepInventory list are completely deleted instead of being dropped on the ground.

commented

I can’t get my n the computer rn so I’ll look at it tmrw. Seems strange tho this wasn’t happening in dev env. What is your config drop rate? That may be related

commented

I’ll look at it tho

commented

inventory.txt

I actually changed it to 90, seems like it might've changed it back to 100 too. I tested with this mod (first release), auto-config1u-3.2.2, and fabric api 0.22.0 build 408.

commented

If you have 1 shulker box and 2 cooked porkchops, the mod will calculate based on the stack size, so since you have it at 90 which is really high, and a small stack size the mod will round up. This means it would drop everything on the ground. Try having a stack of items and see if it works or not.

commented

If you think it should be different and round down instead
i can try to add that as a config option

commented

Well the problem I have is that the items are completely deleted, not dropped. In the most recent update the shulker boxes should be kept while the other items drop on the floor, but instead the shulker boxes drop on the floor and the other items are deleted as if they had curse of vanishing.

commented

I couldn't get this bug in a development environment, but I have redone all the code related to inventory management. I'm going to release it, and it might fix your issue.

commented

Ok Released it. Will probably get approved in 3 to 4 hours

commented

ok its approved try using it and seeing if the problem is still there

commented

The problem is still there. The items that are supposed to be kept after death are now dropped on the ground as well.

commented

Maybe try downloading the config? Don't forget to change .txt to .json5. I had 1 shulker box and 2 cooked porkchops in my inventory before dying to fall damage.

commented

Wait am I supposed to have gamerule keepInventory set to true?

commented

no u shouldnt have to
i gtg but ill come back in 30 mins

commented

Attempt 2 electric boogaloo: download the latest jar and go to the config and set roundUp to false, save it, and try again and see if it works or not

commented

Ok i think i fixed it 🤞 uploading it to curseforge

commented

Ok its uploaded check it out and see if it works or not @IAmSneak

commented

Looks like it works as expected with roundUp set to false. Is this expected behavior though?
Video
latest.log

commented

ok the log shouldnt be spammed like that lemme fix that, forgot to remove that

commented

At 14:40:46 in the logs it says "Copy Stack = 2 air" when it should be 2 oxeye_daisy. Is it dropping air instead of the stack?

commented

yea that seems to be what is happening and from your video it seems that is only a problem with roundup set to true

commented

Sorry, thought I responded. It seems to work in both cases now, nice job!

commented

Thanks, you gave me a lot of good info too for me to help