{"repo":"Triton365/BlockState","free":true,"listed":false,"github":"https://github.com/Triton365/BlockState","clone":"git clone https://github.com/Triton365/BlockState.git","description":"A very, very large loot-table that extracts the BlockState data of any block at given position","language":"mcfunction","stars":40,"topics":["datapack","datapack-utils","minecraft"],"license":"MIT","category":"game-templates","readme_excerpt":"한국어(Korean) BlockState This pack provides a giant loot table that extracts the blockstate data of the block at the called location. In commands, there are two vanilla tricks to get the blockstate data: summoning an arrow to get its inBlockState nbt, or using the /loot ... mine command to drop the block as item. However, both have some drawbacks. The arrow method takes 1 tick and doesn't work for blocks that don't have collision, and the loot mine method breaks when other datapacks change the vanilla loot tables, and even there are some blocks that don't/can't have their loot table. The only (near-)perfect way to do this is to hardcode all blocks and states, as is currently done in this pack. This pack gets blockstate data using a really big binary search tree with all blocks and states hardcoded. The tree itself is based on a loot table, but it does not rely on or change the vanilla loot tables. Download - JE 26.2: For older versions, see Releases. You can preview the contents of this pack at datapack-preview branch. Usage Run the blockstate:get loot table (with /loot command) at the block you want to extract the blockstate from. For example, to print the blockstate data of the block @s is stepping on, The returned item's minecraft:custom data component itself is the blockstate data, and usually structured like this: Each states won't be omitted even though they have default values. For example, a grass block whose snowy state is false can omit the snowy state, but the return","default_branch":null,"files":null,"tree":[],"storefront":"/r/Triton365","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Triton365/BlockState/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}