Skip to content

Calling getBuildings() for minecolonies-1.0.200-ALPHA crashes #232

@carl010010

Description

@carl010010

Descripe

Looks like some incompatibly happens when you use minecolonies-1.0.200-ALPHA and advancedperipherals-1.16.5-0.7.5r. My code that worked in minecolonies-1.0.0-RELEASE, now crashes the game. Minecolonies does recommend running the lastest alpha. Update to the latest alpha if you are not running the latest. (Alpha does not mean it’s unstable, it just means it’s a relatively small release.)

colony = peripheral.find('colonyIntegrator')

mon = peripheral.wrap("left")

function Test()
    term.redirect(mon)

    line = 1
    for k, v in ipairs(colony.getBuildings()) do
        num = k

        if num < 10 then
            num = "0" .. num
        end

        name = ''

        if v.citizens[1] ~= nil then
            for i, t in ipairs(v.citizens) do
                name = name .. ' ' .. t.name
            end
        else
            name = " Empty"
        end
        print(num .. ": " .. v.name .. ' ' .. name)

    end
end

while true do
   mon.clear()
   mon.setCursorPos(1, 1)

    Test()
    sleep(1)
end

Steps to reproduce

Have and be inside of a colony
Get peripheral colony = peripheral.find('colonyIntegrator')
Call getBuildings()
Crash to desktop

Multiplayer?

false

Version

0.7.4.1b (Latest)

Minecraft, Forge and maybe other related mods versions

Forge 36.2.19 1.16.5

Screenshots or Videos

No response

Crashlog/log

https://pastebin.com/FZzqcd1J

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions