Advanced Peripherals

Advanced Peripherals

29M Downloads

Array in NBT referenced by getBlockData () in Block Reader starts at 0

tetuis opened this issue ยท 1 comments

commented

Descripe

(It may be difficult to understand because it is machine translation.)
I referenced NBT in Block Reader, and the array it contains starts at 0.
lua is usually set to use arrays starting from 1, and 0 is ignored by table, ipairs, etc.

Steps to reproduce

  1. Place Botania's Gourmarylis in front of Block Reader.
  2. to feed Gourmarylis.
  3. peripheral.find ("blockReader").getBlockData().lastFoods array starts at 0
    (#peripheral.find("blockReader").getBlockData().lastFoods will be 0)

Multiplayer?

No

Version

1.16.5-0.7.7.1r (Latest 1.16)

Minecraft, Forge and maybe other related mods versions

Forge 36.2.28 Minecraft 1.16.5 Botania 1.16.5-420.2

Screenshots or Videos

No response

Crashlog/log

No response

commented

I can reproduce this partly.
But I can't fix that myself. It seems that cc does this when they parse a map to a table. You could try to start a discussion or a create a issue at https://github.com/cc-tweaked/CC-Tweaked