Date: 2020/08/29 07:04:37 UTC-07:00
Type: Denizen Script
#Script: 1.0.0
#Author: Icecapade
#Date 2020-08-29
IcecapadeBurnEntities:
type: world
debug: false
events:
on player right clicks entity with:flint_and_steel:
- if <context.entity.on_fire> || <player.is_sneaking> && <context.entity.entity_type> == creeper:
- stop
- determine cancelled passively
- ratelimit <player> 1t
- burn <context.entity> duration:7s-10s
- if !<list[survival|adventure].contains[<player.gamemode>]>:
- stop
- run IcecapadeItemDurabilityTask def:<context.item>|<context.item.durability>
IcecapadeItemDurabilityTask:
type: task
debug: false
definitions: item|durability
script:
- if <[durability].add[1]> >= <[item].max_durability>:
- inventory set slot:<player.held_item_slot> o:air
- playeffect effect:ITEM_CRACK at:<player.location.above[0.5].forward[0.4]> special_data:<[item].material.name> offset:0.2 quantity:15
- playsound <player.location> sound:ENTITY_ITEM_BREAK
- else:
- inventory adjust slot:<player.held_item_slot> durability:<[durability].add[1]>