Now we can only get data from block-entitiies with "/data get block" , I think we could change the way of obtaining block data through commands.
We can categorize block data into two types :
- Writable - Block-State , BlockEntityData , CustomData (if you can , it can be copied from item when placed)
- Readonly - id , isBlockEntities , Coordinates
When a player uses a command to obtain block data, the information such as the block's position can be combined into a temporary data block and returned to the player.
Then , a read-only data layer can be used to nest writable data, players can use this command on any block, obtaining its data without affecting the block entity, thus enhancing the versatility of the command.
Players can make more complex judgments by reading data such as block-ids
Example1: A player is getting data form an iron_bar on -34 0 44
Input:
/data get block -34 0 44
Result should be :
{
id : "minecraft:iron_bars",
Location : { x: -34 , y: 0 , z: 44 },
BlockStates : {
east : false,
north : false,
south : true,
waterlogged : false,
west : true
},
is_block_entity : false
}
Example2: A player is getting data form an chest on 12 2 10
/data get block 12 2 10
Result should be :
{
id : "minecraft:chest",
Location : { x: 12 , y: 2 , z: 10 },
BlockStates : {
facing: south,
type: single,
waterlogged: false
},
is_block_entity : true,
BlockEntityData : { ... }
}Please sign in to leave a comment.
0 Comments