Mrbysco / Spoiled

Spoiling the end of your food supply since 2020
https://www.curseforge.com/minecraft/mc-mods/spoiled
MIT License
7 stars 5 forks source link

[Bug]: Food isn't spoiling in most cases #27

Closed Answordy closed 1 year ago

Answordy commented 2 years ago

General Info

Forge version

40.1.19 also 40.1.25, 30, 31

Mod version

1.5.4.3

Java version

First Java 8 update 321 then updated to 333

Issue Description

What i do:

  1. On a fresh install of forge I install Spoiled and create a new singleplayer world
  2. Give myself a chest and two apples (anything will work) in creative mode
  3. Switch to survival mode put down the chest down an place 1 apple inside, the other remains in may hand
  4. Both start to spoil normally, showing fresh (or precentage if I turn that on) everything is fine!
  5. Switch back to creative fly a few hundred blocks away
  6. Repeat the same thing and suddenly the apple in the chest doesn't spoil anymore but the one in my hand does, i waited an hour doing other things away from my pc and it still didn't spoil while the one in my hand turned into rotten flesh. Tried to move it, replace it, create a new chest next to it and a whole bunch of things but nothing changed.
  7. I flew back to spawn repeated the process within 50-100 blocks of the first chest and it worked, so it feels like its not time but distance, maybe chunk based but its such a chore to test, and i've already been testing it for a few days since originally the problem arised in a big modpack and I was binary searching what could it be and I just realised that it was the mod itself or I don't know.. I just don't understand this bug at all. Also, I can replicate this over and over creating new worlds, it's always the same. I have no way to test this in multiplayer however as I'm not experienced in that.

Additional Information

No response

Mrbysco commented 2 years ago

If the chunk gets unloaded the food can't spoil

Answordy commented 2 years ago

Yeah but i'm standing next to the chest, in both 3. and 6. i wait until the food spoils (or in this case it doesn't) and only after that i move to another location.

Mrbysco commented 2 years ago

I'll look into it. Also I believe you filled in the wrong java, as Minecraft 1.18 requires at least java 17

Answordy commented 2 years ago

Yeah, you are right, It displays 17.0.3.1-64 bit ingame.

Mrbysco commented 2 years ago

I placed a bread in a chest at spawn and saw it spoil, then teleported 10k blocks away did the same and it still worked

Answordy commented 2 years ago

Hmm, what could cause the problem in my case then? (I use curseforge client) https://youtu.be/BLgpeivxbxI - here is what happens for me in nutshell, it's just easier to show, ofc this doesn't represent how much time i actually spent testing/waiting for the spoiling. Also here I use java 17.0.1 since its the curseforge builtin, however i also tested with 17.0.3.1 as i mentioned above.

Mrbysco commented 2 years ago

Have you waited an extra minute at the second location? As it only checks once every X seconds so there's a chance it checked right before you even placed the chest meaning it waits another cycle to check

Answordy commented 2 years ago

I did earlier wait until the apple in my hand turned into a rotten flesh but the one in the chest next to me remained a simple apple without any nbt, i just didn't want to capture all that on a video.

Edit: So I was lucky today and could test this on two different pcs and the same thing happened in both cases (i was wondering if something is wrong with my pc hehe..) In all cases I used forge 40.1.19 as that seems to be the version you used for spoiled 1.5.4.3 Tested with both builtin 17.0.1 java and jdk 17.0.3.1 64x Pcs had different specs, some amd some intel, nvidia. Used curseforge client on two pcs, and on the third I used vanilla client, on that pc minecraft, java and all that was installed for the first time, totally fresh. In all cases I was able to reproduce the problem consistently in single player. The way I tested was represented in the video the only difference being the time a spent waiting next to the chests. That was around 10-15 mins on both pcs so it should be quite accurate.

So in the end either you aren't testing in a similar environment or I'm messing up something every single time. Either way, I'm sorry if I'm wasting your time with this, the reason I'm spending so much time with this is because I like the mod, and want to make it work. So whatever will be the resolution thank you for helping and maintaining the mod.

Answordy commented 2 years ago

Ok tested 1.16.5 spoiled 1.5.0 it works seamlessly. 1.18 spoiled 1.4.4 works too. 1.18.2 spoiled 1.5.0 however has the same problem as the newest version. In case I tested multiple 1.18.2 versions and all seem to have this problem. No matter what the forge version or the spoiled version. Tested: spoiled 1.4.6.1 1.5.0 1.5.4.3, forge 40.1.0 40.1.19 40.1.25 40.1.30 40.1.31 Some were only brief tests but at this point I kinda know when it works and when it doesn't.

Lonemind commented 2 years ago

I'd like to confirm this issue. I'm using version 1.5.4.3 with Java 17, Forge 40.1.54.

Items don't spoil in chests but do fine in my inventory. Perhaps something wrong with ticking in a chest? I didn't think ticking took place inside a chest.

If I may suggest, perhaps a system similar to Enviromine would work out. I think EM would timestamp the food and then later when the food received a tick it would update the spoil amount. I often would forget food in a chest, pick it out later and watch as it transformed as I held it.

Mrbysco commented 1 year ago

Can you reproduce the issue with 1.5.6