05-15-2017, 05:25 AM
No, these won't work reliably. Once the callback given to ChunkStay finishes, Cuberite is free to unload the chunk again. Whatever processing you need to do, you need to do it in the ChunkStay's callback function. So the World:GetBlock() call in your first function may still return "chunk unloaded".
Note that naming a variable "_" in Lua basically means "drop this value, I'm not interested in it". You need to give a proper name to the variable if you want to use it.
True, I still don't know why exactly your code isn't working. If you uncomment the print() calls in the callbacks, do they print the correct values?
Note that naming a variable "_" in Lua basically means "drop this value, I'm not interested in it". You need to give a proper name to the variable if you want to use it.
True, I still don't know why exactly your code isn't working. If you uncomment the print() calls in the callbacks, do they print the correct values?