Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- Item: coal
- ItemName: car
- commandname: car
- displayname: setme
- command {@commandname}:
- trigger:
- give player {@Item} named "{@ItemName}"
- on rightclick with coal:
- if name of player's tool is "car":
- spawn a chicken 1 above and infront of player
- clear all pathfinder goals of spawned entity
- set silent state of spawned entity to true
- set {_uuid} to tag "UUIDMost" of nbt of spawned entity
- #Use this to get a uuid since uuid of spawned entity said <none>
- add {_uuid} to {CartsList::*}
- set display name of spawned entity to "{@displayname}"
- #add it to a list so we know whats a car and also persist through a restart
- remove coal named "{@ItemName}" from player
- on death:
- set {_uuid} to tag "UUIDMost" of nbt of victim
- if "%{CartsList::*}%" contains "%{_uuid}%":
- clear drops
- give attacker {@Item} named "{@ItemName}"
- remove {_uuid} from {CartsList::*}
- on rightclick on chicken:
- set {_target} to targeted entity
- set {_uuid} to tag "UUIDMost" of nbt of targeted entity
- if "%{CartsList::*}%" contains "%{_uuid}%":
- make player ride {_target}
- wait 5 ticks
- while vehicle of player is {_target} :
- change yaw of vehicle of player to yaw of player
- change pitch of vehicle of player to pitch of player
- set {_block} to block above player
- if {_block} is ripe wheat:
- set block at {_block} to air
- give player wheat
- #checks what block is at the player
- wait 1.5 tick
- on vehicle steer:
- #if event-button is space:
- # push vehicle of player upwards at speed 0.4
- #disabled chicken flying
- if event-button is w:
- push vehicle of player in the direction of player at speed 0.4
- if event-button is a:
- push vehicle of player to the left at speed 0.1
- if event-button is d:
- push vehicle of player to the right at speed 0.1
- if event-button is s:
- push vehicle of player backwards at speed 0.2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement