z Patbox, 7 miesiące temu, napisane w Plain Text.
Udostępnij
  1. function placeBlock(l: location, drop: item, b: number):
  2.         set block at {_l} to {_b}
  3.         spawn armor stand at location 0.5 below {_l}
  4.         set {_} to last spawned armor stand
  5.         add "{NoGravity:1,Small:1,Invisible:1,NoBasePlate:1,Pose:{RightArm:[360f,360f,360f]}}" to nbt of {_}
  6.         set {_head} to bedrock #with custom model data tag {_b}
  7.         set tool of {_} to {_head}
  8.         set boots of {_} to {_drop}
  9.  
  10. on place of stone:
  11.         placeBlock(event-block's location, stone, 1)
  12.  
  13. on break:
  14.         loop all entities in radius 0.1 of location 0.5 below event-block:
  15.                 if loop-entity's tool is bedrock:
  16.                         clear drops
  17.                         drop 1 of loop-entity's boots
  18.                         kill loop-entity
  19.  
  20. on piston extend:
  21.         loop moved blocks:
  22.                 loop all entities in radius 0.1 of location 0.5 below loop-block:
  23.                         if loop-entity's tool is bedrock:
  24.                                 cancel event
  25.