Advanced Peripherals

Advanced Peripherals

29M Downloads

[Feature] Allow Computers to read block entity NBT values for data collection.

MrVintage710 opened this issue ยท 5 comments

commented

Describe your feature idea
When computers use the peripheral api on an unsupported block entity, it instead return a table that contains get methods for getting each value in that nbt table. These functions would not allow you to edit the nbt data. That way you can still collect data from mods that might not be supported.

Describe alternatives you've considered if you've any
There could also be a different api that wraps this behavior, but I believe that peripheral api would make the most sense.

Additional context
I think this was a feature in one of the many peripheral mods back it the day, because I distinctly remember using it with redpower 2 to get the energy levels in batteries.

commented

Added in 0.7a

commented

I do not really understand what exactly do you want, it's already possible to get energy levels from every Energy Storage Block in 1.16. You can do wrap an Energy Container(e.g. Energy Cube From Mekanism, Battery Box from Silents mechanisms, ...) and get the stored energy.

image

commented

I will close this for now to reduce the issues. I will reopen it if you respond to my question.

commented

Sorry for the late response. I guess I should clarify the mechanic: Allow computers to read NBT Data from and block entities. Just like how a player can use the /data command to get nbt data from a block, so to could the computer using the peripheral api. The battery was just an example. Using this you could get the contents of a book in an adjacent lectern or the pattern of an adjacent banner. It would make getting information easier, because if the data is saved in the nbt, then you have access to it.

Hope that make sense!

commented

Sorry, I did not see your response. I will reopen this issue!