https://github.com/olillin/blockstate-reader
Minecraft data pack for reading blockstates to NBT data
https://github.com/olillin/blockstate-reader
Last synced: 12 months ago
JSON representation
Minecraft data pack for reading blockstates to NBT data
- Host: GitHub
- URL: https://github.com/olillin/blockstate-reader
- Owner: olillin
- License: other
- Created: 2022-01-07T20:48:20.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-25T22:29:45.000Z (about 4 years ago)
- Last Synced: 2023-10-04T06:36:12.116Z (almost 3 years ago)
- Language: mcfunction
- Homepage:
- Size: 96.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Blockstate Reader  
A Minecraft data pack for reading blockstates to an NBT storage.
## Features
- Read all blockstates of a block to an NBT storage
- Read individual blockstates of a block to an NBT storage
- Provides block tags for every blockstate
## Usage
To read blockstates of a block you need to run the function **at the location of the block you want to check**.
### Read all blockstates of a block
Run the function `blockstate:store/all`.
This will clear **all** stored blockstate data. To preserve data run `blockstate:store/all_noclear` instead.
### Read specific blockstate of a block
Run function in `blockstate:store` corresponding to the blockstate you want to check for.
Example: `function blockstate:store/waterlogged` will read only the `waterlogged` data of the block and clear `read.waterlogged` if there is none
### Access read blockstate data
All read data is stored in the data storage `blockstate:data` in the `read` tag.
To view all blockstate data run `/data get storage blockstate:data read`
Blockstates are stored in individual tags such as `read.power`.
### Clear storage
To clear stored blockstate data run the function `blockstate:clear`
### Check if block has blockstate
All blockstates have their own tag under the `blockstate` namespace.
Using this you can for example check if a block has the `facing` blockstate: `execute if block ~ ~ ~ #blockstate:facing`