Furnaces seem to stop cooking when players are far away #533
Labels
No Label
#P1 CRITICAL
#P2: HIGH
#P3: elevated
#P4 priority: medium
#P6: low
#Review
annoying
API
bug
code quality
combat
commands
compatibility
configurability
contribution inside
controls
core feature
creative mode
delayed for engine release
documentation
duplicate
enhancement
environment
feature request
gameplay
graphics
ground content conflict
GUI/HUD
help wanted
incomplete feature
invalid / won't fix
items
looking for contributor
mapgen
meta
mineclone2+
Minecraft >= 1.13
Minecraft >= 1.17
missing feature
mobile
mobs
mod support
model needed
multiplayer
Needs adoption
needs discussion
needs engine change
needs more information
needs research
nodes
non-mob entities
performance
player
possible close
redstone
release notes
schematics
Skyblock
sounds
Testing / Retest
tools
translation
unconfirmed
mcl5
mcla
Media missing
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: VoxeLibre/VoxeLibre#533
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What I think is happening is that when the furnaces are unloaded, they do not save the fractional fuel left over properly. This is perhaps most evident when leaving the furnace with, say, 4 coal and 32 material, and when the furnace is done cooking, end up with 3 material left over.
If this is the case, then I suggest that when a furnace gets loaded back in, it simulate the amount of cooking that would have been done had it been loaded the entire time.
It looks like this was fixed in minetest_game upstream by https://github.com/minetest/minetest_game/pull/1988
When you fall asleep to skip the night, furnace doesn't "continue the job" and 'do' some weird thing - something like a 'fall asleep together with you' :)
In original MC you always find it successfully finished its job on the morning.
Same thing seems to be when you disconnect for a while and you was the latest player.
I think it needs an on-click checking of in-game time, but unfortunatelly don't know how difficult it for implementation at the moment...
I took minetest_game's commit @DeltaF1 mentioned above and adapted it to MineClone2 (
edf9cfba4f
) to test on my server.It seems, 'skip the night' feature (when all players go to beds) still can't affect the furnace :(
But when I went far away, left the furnace full of rocks and coal and then came back - I found the job finished properly. It's great!
I tried to use game time instead of general to make furnaces work during the nights skipped in bed,
1d7732503d
It seems to work at first glance, but not smooth, sometime melting process stops for several seconds :((( I need to get in-game analog of timers but it looks like it doesn't exists?
Dear @Wuzzy and @Rootyjr, maybe you know the way how to make more smooth long process which can consider the change of the date in Minetest? ... Maybe I better need to open an issue in Minetest repo? :) Sorry, sorry, I'm just not very sure if I'm on the right way.
I explored Minetest API and it was a big surprize for me that we couldn't just set desired time... And I forgot to commit the changes of mcl_beds as well, to make furnaces work... As we need to really skip the nights, day counter must be incremented, the change is considering that:
26bbe63620
4128725a98
I was wrong about the time, correct multiplier is 72 not 180 (24 hour * 3 20-min intervals), it's now smooth almost as before.
And sometimes 1 second for
after
wasn't enough, furnaces didn't produce anything to the morning, I increased it to 1.2.And very sorry, I was wrong about the day counter, it automatically increases when new time less than current:
5146086a64/src/environment.cpp (L68)
. It was no reason for me to patchmcl_beds.skip_night()
, so I reverted it its to original state (df90c51769
)... But then I can't realize why it sometimes work somtimes not, maybe the problem is in the algorythm offurnace_node_timer()
.Seems I need to stop for a while with some 'beta' result,
b4037ea0d6
Smothness is lost again: when timer passes 1 second - in-game time floats from 0.15 to 6.15 (with 2 players connected). But at whole it seems to work now. IDK how to imporve it further, so I'm going to go to sleep to skip the night...
P. S. For saving your time there's a summary commit fixing bed counters and furnaces in the alternate fork:
6d3f37ff8a
I rewrote and simplified a lot
furnace_node_timer()
, now I hope anyone can understand its logic and make further fixes if I missed a something,cf976dbbb7
But it is now smooth, it can skip the night, it takes not so much CPU.
So strange, I posted a link to my commit but don't see my comment now :(
So I post it again - summary change of furnaces to compare whith upstream:
f1c01e2785
@Wuzzy Would you please merge it?
I don't like to accept code that has an open FIXME in it, especially if it causes weird platform-depending bugs.
Also, this code scans
time_speed
only at launchtime. But it's common to changetime_speed
at runtime. So when the admin changestime_speed
at runtime, the furnace calculation will break.This commit needs more work.
No, it doesnt cause since float changed to string with tonumber/tostring conversion. But as I hope platform dependency for float shall gone some day I marked the code by FIXME.
Maybe this isnt a dependency. Under Linux my day counter is significally greater than in a fresh world in windows sandbox. These two FIXME comments for set/get string instead of float are only because the code now contain wrap around which... works absolutely, it might be kept as is forever without fixing. It is just not right, not as it must be, but as it must be it didnt work, so... ... ... Maybe you have better idea?
One more FIXME is about long-term calculation. It means when you for example use hopper to load furnace source slot and you consider that during the skipped night hopper+furnace shall work as usual, this line is breaking it at all. I very sorry about that but, first of all, before this patch it wasnt work too, and if we remove the line and leave the furnace for long time and then change the source slot (load it with something) it would cook it at one second which would be absolutely wrong too. I dont know how to resolve it quickly. Maybe we have to consider the hopper as a special case. In my game progress I still never crafted the hoppers and more mechanics so maybe I can fix it later, for now I'm just happy that furnace works when you leave it, when you dosconnect and when you skipping the night. We may remove FIXME but it would make the life a bit harder in future... But who knows maybe you have the way better again?
I didnt know about the way how to change game speed at run time, I thought of it as a constant that's why read it only once, but it might be easily moved into the beginning of timer handler itself.
Thank you for revising the changes. Would you like to move the reading of time_speed yourself or wait for me to add next commit?
My code has no copyright, no need to keep my authority, I deleted the fork kay2777/MineClone2 and created it again, maybe now its unusable unless removing and adding the 'other link' back, but here is no pull request so I do what I can by two repos, my operational fork is kay27/MineClone2, kay2777 is for temporary purposes to show you some diffs. As a player I just would be happy if the problem would solved not only in my forks but in the upstream too. This code is tested many times, but I still didnt test the special recipe :(
Consider
time_speed
change at runtime:252c7c501e
BTW found a problem when cooking blocked by wrong/full dst and you remove dst - it doesn't start right after that, and then if you reload fuel it starts with incorrect offset of time, I'm thinking how to fix it
@Wuzzy seems it now match your wishes: I changed
FIXME
toTODO
for working with meta data (it is actually more correct), and accumulated game time now resets on any inventory manipulations, so one moreFIXME
removed.Hope I didn't miss something more in new version of my patch, this time I think I checked the everything including special recipe (but as usual when I made 3 buckets of water by furnace with coal, empty bucket and wet sponge, I could stack only 2 and 1 but not 3, as it described in Wuzzy/MineClone2#745 ).
649da8bb15
Alright, I need to test this later.
BTW: The super-sneaky ultra top secret MiB Agent Smith hidden way to change
time_speed
or any other setting is with the/set
chat command.@Wuzzy What do you think about adding this to master for everyone can check? Several weeks of testing on my server are passed with no problems. I found a small error in my code which Lua forgives, with function parameter, of course I'll fix it, but that's all...
Alright, let's do this! Feel free to commit and push this.
Thanks!
Fixed,
c424b036b2