How to get item positions on a transport-belt?
Posted: Sun Aug 23, 2020 9:53 pm
I would like to know the precise positions of items held by a transport belt's lane.
I couldn't find any appropriate method in LuaTransportLine, except can_insert_at(), which is a very indirect way of finding where the items might be placed. It also doesn't say what items there are.
Using the LuaTransportLine's operator[] does tell me what items there are on the lane, but I can't figure out a way to get the LuaItemStacks' positions.
I also tried find_entities() on the nauvis LuaSurface, but that only seems to find the transport belt itself, not items lying on it.
Are items lying on the belt also LuaEntities? Can I find them somehow?
I couldn't find any appropriate method in LuaTransportLine, except can_insert_at(), which is a very indirect way of finding where the items might be placed. It also doesn't say what items there are.
Using the LuaTransportLine's operator[] does tell me what items there are on the lane, but I can't figure out a way to get the LuaItemStacks' positions.
I also tried find_entities() on the nauvis LuaSurface, but that only seems to find the transport belt itself, not items lying on it.
Are items lying on the belt also LuaEntities? Can I find them somehow?