Menu

#301 Setblock command

open
nobody
None
4 days ago
5 days ago
Anonymous
No

Originally created by: hthug06

Implement setblock command with full vanilla parity

  • Updating neighbour
  • Passing blockstate
  • Passing NBT

Example

Basic example

Command : /setblock -811 64 11 dirt
https://github.com/user-attachments/assets/d82fdf25-38f6-4669-952c-cbe0b566da52

Blockstate example

Command : /setblock -805 64 8 minecraft:acacia_stairs[facing= east,half= bottom,waterlogged=false]
https://github.com/user-attachments/assets/6d7ea28c-dc1d-4204-9c58-70bd342d5633

NBT example

Command : /setblock ~ ~1 ~ barrel[facing=east]{CustomName:'{"text":"Crash Test"}',Items:[{Slot:13b,id:"minecraft:netherite_sword",Count:1b}]}
https://github.com/user-attachments/assets/dc94e017-68e0-4db8-a9e2-6a8494ec0269

Everything combined

Command : /setblock -804 64 1 oak_sign[rotation=4]{front_text:{color:"gold",messages:["Line1",'Another Line','Wait, Again?','Final Line'],has_glowing_text:1b}}
https://github.com/user-attachments/assets/3a93b48e-9c41-485b-afc1-846c96b84429

Discussion


Log in to post a comment.