NBT Peripheral
NBT Peripheral adds the ability to use some vanilla blocks as peripheral for computers from ComputerCraft.
All of them reads NBT tags, and give them back as Tables.
If you need support for another feature, ask it in the comment section below!
Peripherals:
OBSERVER
Commands supported:
- read_nbt - Reads NBT from the block its facing [throws exception when no NBT is present]
- has_nbt - Checks if the block has NBT tag
- read_state - Reads the state from the block [throws exception when there is no blockstate]
- has_state - Checks if the block has a block state
Note: it only can scan the block it’s facing
GOLD or IRON PRESSUREPLATE, BEACON
Commands supported:
- is_empty - Checks if there is an entity in range
- count - Counts the entities in range
- read - Reads the NBT of the entities
Currently there is no difference between iron and gold pressure plates.
Reach of the pressure plates are the same as the plate itself, not the full block.
Reach of the beacon is determined by the range it would gave the potion effects (something like ~10 blocks for each level, starting at 10 blocks range)
Custom tags when reading an entity, to make this peripheral even more powerful
- _distanceSq [distance away from the middle of the block]
- _relative [x,y,z relative from the peripheral]
- _name [name from the entity, when you scan a player, its the player his name]
- _displayName [display name from the entity]
- _team [name of the team its in, only when in a scoreboard team]
- _teamColor [name of the color, only when in a scoreboard team]