
[1.20.1] Crush on call getWorkOrderResources or getBuilderResources
DarkOutX opened this issue ยท 1 comments
Describe the bug
Any method to get resources crushes game
To Reproduce
Steps to reproduce the behavior:
- Create clear wolrd (I used plain)
- Create a colony
- Claim Town Hall
- Claim Builder's Hut
- Give spade to builder (to complete all NPC's requests)
- Build a computer with monitor
- Try to request resources with getWorkOrderResources or getBuilderResources
So I have 2 plans: Town Hall and Builder's Hut. Only plans, no buildings. And I ordered Builder's Hut to start building, so NPCs created build requests
My code example:
local monitor = peripheral.wrap("top")
monitor.clear()
local orders = colony.getWorkOrders();
local row = 1
monitor.setCursorPos(1, row);
for i=1, #orders do
local order = orders[i]
if order.type=="building" then
row = i + row
monitor.setCursorPos(0, row)
monitor.write(" | " .. order.type .. " | " .. order.claimedByBuilding.x .. " | " .. order.claimedByBuilding.y .. " | " .. order.claimedByBuilding.z .. " |")
local resources = colony.getWorkOrderResources(order.id)
end
end
Expected behavior
resources = colony.getWorkOrderResources(order.id)
should return table of resources (but it just crushes game)
Versions:
- Minecraft: 1.20.1
- Minecolonies: 1.1.461-BETA
- Colony4cc: 2.6.2
Additional context
crash-2024-02-14_02.32.35-server.txt
luaCode.txt