Paste #67203: Edit of P#67052 - Silk Spawners

Date: 2020/04/09 08:05:19 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15


Silk_Spawners:
    type: world
    debug: false
    events:
        on player breaks spawner with *pickaxe:
            - if !<player.item_in_hand.enchantments.contains[silk_touch]>:
                - stop
            - define Type <context.location.spawner_type.entity_type.to_titlecase>
            - determine <context.material.item.with[display_name=<[Type]><&sp>Spawner;nbt=key/<[Type]>]>
        on player places spawner:
            - if !<context.item_in_hand.has_nbt[key]>:
                - stop
            - define Type <context.item_in_hand.nbt[key]>
            - wait 1t
            - adjust <context.location> spawner_type:<[Type]>