Advanced Peripherals

Advanced Peripherals

29M Downloads

Colony Integrator Error

Karma-Fox opened this issue ยท 18 comments

commented

Descripe

When trying to use getRequest(), e NullPointer Exception is thrown. This is on 15b.

image

Steps to reproduce

Create code using getRequest()
Run Code
Read Error.

Multiplayer?

Yes

Version

1.18.2-0.7.14b (Latest 1.18)

Minecraft, Forge and maybe other related mods versions

Forge 40.1.47 Minecraft 1.18.2

Screenshots or Videos

See above

Crashlog/log

https://pastebin.com/L1MnDb68

commented

oh boy
I love minecolonies

commented

Providing an update here. This error seems to be getting caused if ANY hut has a minimum stock set. Removing minimum stock from all huts removes this error and allows the block to work.

commented

thank you, this helps me a lot

commented

Further note. This same error also occurs if you use the Postbox to request something.

commented

Also seeing this error, But it only started today not been able to connect it to postbox or min stock though

commented

advancedperipherals-1.18.2-0.7.15b.zip

Hey, could you try it again with this version? It will probably not work, but I need the new generated (crash)log
Unzip the file before using

commented

Still getting the same error with your edited file

Error from latest.log
https://pastebin.com/EJY46wV5

commented

advancedperipherals-1.18.2-0.7.15b.zip
I now know what the issue is. And I think I got it fixed.
Free to test ๐Ÿ˜‰

commented

The exception looks to be fixed, but now getting an error in my Lua

error:
attempt to index global 'target' (a nil value)

Lua snippet:

local colony = peripheral.find("colonyIntegrator")

workRequests = colony.getRequests()

for w in pairs(workRequests) do

        target = workRequests[w].target

        for word in target:gmatch("%S+") do  --This line
            table.insert(target_words, word)
            target_length = target_length + 1
        end
end
commented

This is an issue at the end of minecolonies. I contacted them and I now wait for an answer

Explanation
The exception throws when the requester of a request is not a citizen - like a restaurant
I'll send more updates about this in the next days. In the meanwhile, target will be nil if the requester is not a citizen

commented

Soo. I just found out. One of the other players had set some min stock levels in the restaurant. I removed them and it fixed the nil error.

So I agree with your diagnosis. It looks to be min stock requests (i.e. non citizen requests) that are causing this

commented

Fixed in
ldtteam/minecolonies#8501
Do you want to test it with 1.18.2-0.7.15b?

commented

That link is for 1.16.5 and I don't see that change being listed in any of the 1.18.2 files.

commented

Just to be certain, which mine colonies version?

commented

That link is for 1.16.5 and I don't see that change being listed in any of the 1.18.2 files.

Yeah, 1.18.2-1.0.883-ALPHA contains the fix. The changelog only shows the newest commit.

commented

I'll close this now since it's an issue with minecolonies which got fixed