bonsai_pot: type: item debug: false material: paper display name: <&f>Pot de bonsai lore: - - <&f>Placer une terre - <&f>une pousse d'arbre - <&f>pour commencer la culture - mechanisms: custom_model_data: 10205 dirt_bonsai_pot: type: entity debug: false entity_type: block_display mechanisms: material: dirt scale: 0.74,0.3,0.74 sapling_bonsai_pot: type: entity debug: false entity_type: item_display mechanisms: item: oak_sapling scale: 0,0,0 bonsai_pot_event: type: world Debug: true events: on player right clicks block with:bonsai_pot: - if matches yes: - if : - determine cancelled - if : - ratelimit 5t - take iteminhand quantity:1 - worldedit paste file:../../WorldEdit/schematics/bonsai_pot position: noair - playsound sound:block_wood_place - flag bonsai_pot on player breaks block location_flagged:bonsai_pot: - if matches yes: - flag bonsai_pot:! - drop bonsai_pot - if : - drop dirt - remove - flag dirtOn:! - if : - drop - remove - flag saplingType:! - flag server bonsai_pots:<-: - flag bonsai_rdy:! - determine cancelled on player right clicks block location_flagged:bonsai_pot: - determine passively cancelled - if : - if : - take iteminhand quantity:1 - playsound sound:block_grass_place - spawn dirt_bonsai_pot save:dirt - flag dirtOn: - stop - if : - if : - if : - remove - drop - flag saplingType: - flag saplingMaterial: - take iteminhand quantity:1 - spawn sapling_bonsai_pot save:sapling - define sapling - flag saplingOn:<[sapling]> - define saplingType - adjust <[sapling]> interpolation_duration:0t - adjust <[sapling]> interpolation_start:0 - adjust <[sapling]> scale:0,0,0 - adjust <[sapling]> translation:0,0,0 - playsound sound:block_cherry_sapling_place - adjust <[sapling]> item: - adjust <[sapling]> interpolation_duration:10s - adjust <[sapling]> interpolation_start:0 - adjust <[sapling]> scale:0.8,0.8,0.8 - adjust <[sapling]> translation:0,0.4,0 - wait 10s - if <[saplingType]> == : - if : - if && && : - if == oak || dark_oak: - if ].quantity[1]>: - give _log|_leaves|stick|apple]> to: - else: - playeffect at: effect:villager_angry quantity:1 offset:0 - if == spruce || birch || jungle || acacia || cherry: - if ].quantity[1]>: - give _log|_leaves|stick]> to: - else: - playeffect at: effect:villager_angry quantity:1 offset:0 - else: - playeffect at: effect:villager_angry quantity:1 offset:0 - flag server bonsai_pots:->: - if : - if : - playsound sound:block_cherry_sapling_break - remove - drop - flag saplingOn:! - flag saplingType:! - flag server bonsai_pots:<-: - stop - if : - playsound sound:block_grass_break - remove - drop dirt - flag dirtOn:! - flag server bonsai_pots:<-: - stop on player right clicks chest with:bonsai_pot: - determine cancelled on system time secondly every:10: - foreach as:bonsai: - if <[bonsai].has_flag[saplingOn]>: - define saplingType <[bonsai].flag[saplingType]> - define sapling <[bonsai].flag[saplingOn]> - adjust <[sapling]> interpolation_duration:0t - adjust <[sapling]> interpolation_start:0 - adjust <[sapling]> scale:0,0,0 - adjust <[sapling]> translation:0,0,0 - wait 1s - adjust <[sapling]> interpolation_duration:9s - adjust <[sapling]> interpolation_start:0 - adjust <[sapling]> scale:0.8,0.8,0.8 - adjust <[sapling]> translation:0,0.4,0 - wait 9s - if <[bonsai].below.advanced_matches[chest]>: - if <[bonsai].has_flag[dirtOn]> && <[bonsai].has_flag[saplingOn]> && <[bonsai].has_flag[saplingMaterial]>: - if <[bonsai].flag[saplingMaterial]> == oak || dark_oak: - if <[bonsai].below.inventory.can_fit[].quantity[1]>: - give _log|<[bonsai].flag[saplingMaterial]>_leaves|stick|apple]> to:<[bonsai].below.inventory> - else: - playeffect at:<[bonsai].center> effect:villager_angry quantity:1 offset:0 - else: - if <[bonsai].below.inventory.can_fit[].quantity[1]>: - give _log|<[bonsai].flag[saplingMaterial]>_leaves|stick]> to:<[bonsai].below.inventory> - else: - playeffect at:<[bonsai].center> effect:villager_angry quantity:1 offset:0 - else: - playeffect at:<[bonsai].center> effect:villager_angry quantity:1 offset:0