Find out BlockID on Cords
#6
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?
Reply
Thanks given by:


Messages In This Thread
Find out BlockID on Cords - by moiko89 - 05-14-2017, 02:08 AM
RE: Find out BlockID on Cords - by moiko89 - 05-14-2017, 03:39 AM
RE: Find out BlockID on Cords - by xoft - 05-14-2017, 03:47 AM
RE: Find out BlockID on Cords - by moiko89 - 05-14-2017, 08:59 PM
RE: Find out BlockID on Cords - by moiko89 - 05-14-2017, 07:27 PM
RE: Find out BlockID on Cords - by xoft - 05-15-2017, 05:25 AM



Users browsing this thread: 3 Guest(s)