You are browsing as a guest.
Login | Register
~ mcmonkey's simpler pastebin ~ Inspired by Hastebin ~ home page ~ Denizen help ~
click to use the normal pastebin instead ~ Click to make your own paste ~ click to duplicate and edit this paste


Title:
Type:
Date:
By:
Raw:
Other:
...
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
3200

Ride the MOVEing Chickens!
Denizen Script
2019/03/28 06:42:43 UTC-07:00
mcmonkey
Click here to view this paste as a raw text file | Or download the script


RideAllTheChickens:
  type: world
  debug: false
  events:
    on player right clicks chicken:
    - if <context.entity.has_passenger>:
        - queue clear
    - mount <player>|<context.entity> <context.entity.location>
    - adjust <context.entity> has_ai:false
    - wait 1t
    - actionbar "Press LSHIFT for TURBO SPEEEED"
    on player steers chicken:
    - define looking <player.location.direction.vector.with_y[0].div[3]>
    - define forward <def[looking].mul[<context.forward>]>
    - define sideways <def[looking].rotate_around_y[<el@90.to_radians>].mul[<context.sideways>]>
    - define speed 1
    - define upward <player.flag[RideAllTheChickens.JumpingVelocity]||0>
    - flag player RideAllTheChickens.JumpingVelocity:<def[upward].sub[0.06]>
    - if <def[upward]> <= 0 && <context.entity.location.sub[0,0.01,0].material.is_solid>:
        - flag player RideAllTheChickens.JumpingVelocity:0
        - define upward 0
        - if <context.jump>:
            - flag player RideAllTheChickens.JumpingVelocity:0.5
    - if <context.dismount>:
        - determine passively cancelled
        - define speed 10
    - define speed <tern[<context.dismount>]:10||1>
    - define velocity <def[forward].add[<def[sideways]>].mul[<def[speed]>].add[0,<def[upward]>,0]>
    - adjust <context.entity> move:<def[velocity]>
    - if <def[velocity].vector_length> > 0.01:
        - look <context.entity> <context.entity.location.add[<def[velocity]>]>