r/ComputerCraft • • Mar 13 '24
peripheral.find("minecraft:chest:") returns with nil
I don't know if I'm just stupid or something else but I just copy and pasted this simple code from the wiki and it won't even run. I tried a couple of different types of inventories and it returns nil unless its from the cc: tweaked mod.
1
Upvotes
4
u/[deleted] Mar 13 '24
i made a spelling error in the post i meant minecraft:chest instead of minecraft:chest: but in the code its minecraft:chest
5
u/CommendableCalamari Mar 13 '24
Just to confirm, are you on a semi-recent version of Minecraft? I believe the generic peripherals were only added around Minecraft 1.14.
If so, can you run the "peripherals" program and post the output? That should list all attached peripherals.
1
u/f-lux Mar 13 '24
Are you using a wired modem?
1
u/9551-eletronics Computercraft graphics research Mar 13 '24
The peripheral is called just "chest" not "minecraft:chest"
1
u/LionZ_RDS Mar 13 '24
I believe it's peripheral.find("inventory", "minecraft:chest")