Paste #110439: Unnamed Denizen Script Paste

Date: 2023/05/29 09:04:01 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


kohlkopf:
    type: world
    events:
        on player right clicks coarse_dirt with:kohlkopf_samen:
        - define location <context.location>
        - take item:kohlkopf_samen quantity:1
        - spawn armor_stand[visible=false] <[location].add[0.5,-0.2,0.5]> save:kohlkopf_1
        - define kohlkopf_eins <entry[kohlkopf_1].spawned_entity>
        - flag <[kohlkopf_eins]> kohlkopf_eins:++
        - equip <[kohlkopf_eins]> head:kohlkopf1
        - adjust <[kohlkopf_eins]> gravity:false
        - wait 2m
        - define kohlda1 <player.location.find_entities[entity_flagged:kohlkopf_eins].within[2]>
        - if !<[kohlda1].is_empty>:
            - remove <[kohlkopf_eins]>
            - spawn armor_stand[visible=false] <[location].add[0.5,-0.2,0.5]> save:kohlkopf_2
            - define kohlkopf_zwei <entry[kohlkopf_2].spawned_entity>
            - flag <[kohlkopf_zwei]> kohlkopf_zwei:++
            - equip <[kohlkopf_zwei]> head:kohlkopf2
            - adjust <[kohlkopf_zwei]> gravity:false
            - wait 2m
            - define kohlda2 <player.location.find_entities[entity_flagged:kohlkopf_zwei].within[2]>
            - if !<[kohlda2].is_empty>:
                - remove <[kohlkopf_zwei]>
                - spawn armor_stand[visible=false] <[location].add[0.5,-0.2,0.5]> save:kohlkopf_3
                - define kohlkopf_drei <entry[kohlkopf_3].spawned_entity>
                - flag <[kohlkopf_drei]> kohlkopf_drei:++
                - equip <[kohlkopf_drei]> head:kohlkopf3
                - adjust <[kohlkopf_drei]> gravity:false
        on player right clicks entity_flagged:kohlkopf_drei:
        - define kohl_loc <context.entity.location>
        - remove <context.entity>
        - drop <[kohl_loc].add[0,1,0]> kohlkopf_samen quantity:1
        - ~discordmessage id:gemmeria channel:1112652558020907038 "<player.name> hat Kohlkopf geerntet bei: <[kohl_loc].formatted>"
        - random:
            - drop <[kohl_loc].add[0,1,0]> kohl quantity:1
            - drop <[kohl_loc].add[0,1,0]> kohl quantity:2

kohl:
    type: item
    allow in material recipes: false
    material: paper
    display name: <&6>Kohlkopf
    lore:
    - <&7>Perfekter Kohlkopf.
    - <&7>Kann vom Koch verarbeitet werden.


kohlkopf_samen:
    type: item
    allow in material recipes: false
    material: paper
    display name: <&6>Kohlkopf Samen
    lore:
    - <&7>R-Klick auf grobe Erde um zu pflanzen

kohlkopf1:
    type: item
    material: stick
    display name: Kohlkopf Stage 1
    mechanisms:
        custom_model_data: 2

kohlkopf2:
    type: item
    material: stick
    display name: Kohlkopf Stage 2
    mechanisms:
        custom_model_data: 3

kohlkopf3:
    type: item
    material: stick
    display name: Kohlkopf Stage 2
    mechanisms:
        custom_model_data: 4