Date: 2023/02/01 06:05:52 UTC-08:00
Type: Denizen Script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
LavaFishing:
type: world
debug: false
events:
after player fishes:
## throw hook into lava
- if <player.world.contains[nether]> && <player.is_online> && <context.hook.is_spawned>:
- waituntil rate:1t max:5s <context.hook.location.material.contains[lava]>
- define SplashLocation <context.hook.location>
# Hook entering liquid effect
- playeffect LAVA at:<[SplashLocation]> quantity:20 offset:0.3,0.1,0.3 visibility:50 velocity:0,2,0
- playeffect CAMPFIRE_COSY_SMOKE at:<[SplashLocation]> quantity:1 offset:0.3,0.1,0.3 visibility:50 velocity:0,0.01,0
- playsound ENTITY_GENERIC_EXTINGUISH_FIRE at:<[SplashLocation]>
# End of effect
# - run LavaFishingEvent
- drop HookPlaceHolder <[SplashLocation]>
- attach <context.hook> to:<[SplashLocation].find_entities.within[0.3].filter[has_flag[HookPlaceHolder]].get[1]>
- while <context.hook.is_spawned>:
- if <context.hook.location.is_liquid> && <context.hook.location.material.contains[lava]> && <context.hook.is_spawned>:
- narrate "<&7><&o>Hook in <&c><&o>LAVA<&7><&o>!"
- else:
# - run LavaFishingReelIn
- stop
- wait 5t
#LavaFishingReelIn:
# type: task
# debug: false
# - define tmpRod <player.inventory.slot[HAND]>
# - inventory set origin:<item[air]> destination:<player.inventory> slot:HAND
# - wait 1t
# - inventory set origin:<[tmpRod]> destination:<player.inventory> slot:HAND
#LavaFishingEvent:
# type: task
# debug: false
# script:
# - define TimeToCatch <util.random.decimal[5].to[60].round>s
# - wait <[TimeToCatch]>
# - animate <player> ARM_SWING
HookPlaceHolder:
type: item
material: netherite_sword
display name: <element[HookPlaceHolder].color_gradient[from=#A5F4FF;to=#3ED4E8]>
mechanisms:
custom_model_data: 1901
HookPlaceHolderFlagging:
type: world
debug: false
events:
on HookPlaceHolder spawns:
- flag <context.entity> HookPlaceHolder
on player picks up HookPlaceHolder:
- determine cancelled