Date: 2019/11/24 08:26:30 UTC-08:00
Type: Denizen Script
custom_blocks_handler_events:
type: world
debug: false
events:
on player places sponge:
- if <player.item_in_hand.script.yaml_key[is_custom_block]||false>:
- determine passively cancelled
- wait 1t
- spawn armor_stand[custom_name=customBlock_<player.item_in_hand.scriptname>;equipment=air|air|air|<player.item_in_hand.scriptname>;gravity=false;visible=false] <context.location.center.below[1.66]>
- modifyblock <context.location> cracked_stone_bricks
- adjust <context.location> spawner_type:<entity[dropped_item]>
on player breaks cracked_stone_bricks:
- define customBlockStands:<context.location.center.below[1.66].find.entities[armor_stand].within[0.1].filter[custom_name.contains[customBlock]]>
- if <[customBlockStands].size||0> >= 1:
- determine passively <[customBlockStands].get[1].as_entity.equipment.head.script.yaml_key[custom_block_drop].as_item||<[customBlockStands].get[1].as_entity.custom_name.after[_].as_item>>
- wait 1t
- remove <[customBlockStands].get[1]>