Compare commits

...

2 Commits

5 changed files with 13 additions and 12 deletions

View File

@@ -18,7 +18,7 @@ ball_create:
- spawn slime[silent=true;size=<[size]>;has_ai=false;visible=false] <[location].with_pitch[0].with_yaw[0]> save:ball_collision
- define ball_collision <entry[ball_collision].spawned_entity>
- define size <[ball_collision].bounding_box.get[1].sub[<[ball_collision].location>].x.abs.add[0.01]>
- spawn armor_stand[invulnerable=true;has_ai=false;gravity=false;visible=false] <[location].with_pitch[0].with_yaw[0].below[<[size].add[1]>]> save:ball_display
- spawn zombie[silent=true;has_ai=false;gravity=false;visible=false] <[location].with_pitch[0].with_yaw[0].below[<[size].add[1]>]> save:ball_display
- define ball_display <entry[ball_display].spawned_entity>
- adjust <[ball_display]> equipment:<map[].with[helmet].as[<[display_item]>]>
- flag <[ball_collision]> ball:<[id]>
@@ -142,8 +142,5 @@ ball_internal_physics_update_ball:
- define next <[changes].get[1].if_null[<[next]>]>
- define velocity <[changes].get[2].if_null[<[velocity]>]>
- flag <[ball]> ball_velocity:<[velocity]>
- if <[size]> <= 2:
- teleport <[ball].flag[ball_display]> <[next].below[<[size].add[0.7]>]>
- else:
- teleport <[ball].flag[ball_display]> <[next].below[<[size].add[0.7]>]>
- teleport <[ball].flag[ball_display]> <[ball].bounding_box.get[1].add[<[ball].bounding_box.get[2]>].div[2].below[1.575].below[0.125]>
- teleport <[ball]> <[next]>

View File

@@ -20,10 +20,10 @@ compatibility_check_world:
type: world
events:
after player joins:
- if !<proc[settings_get].context[<player>|general_ignore_version_compatibility_check]>:
- if <proc[settings_get].context[<player>|general_ignore_version_compatibility_check]>:
- stop
- define player_version <player.viaversion_version.split[-].get[1].split[.].limit[3].get[1|2].separated_by[.]>
- define server_version <server.version.split[(].get[2].split[:].get[2].split[)].get[1].trim.split[.].limit[3].get[1|2].separated_by[.]>
- define player_version <player.viaversion_version.split[-].get[1]>
- define server_version <server.version.split[(].get[2].split[:].get[2].split[)].get[1].trim>
- if <proc[compatibility_check_compare_versions].context[<[player_version]>|<[server_version]>]> == -1:
- wait 5s
- if !<player.is_online>:

View File

@@ -7,7 +7,10 @@ sports_football_world:
- ratelimit <player> 10t
- if !<context.entity.has_flag[ball]>:
- stop
- if !<context.entity.flag[ball].starts_with[sports_football]>:
- define ball <context.entity>
- if <[ball].type> != slime:
- define ball <proc[ball_get].context[<[ball].flag[ball]>]>
- if !<[ball].flag[ball].starts_with[sports_football]>:
- stop
- if !<player.has_flag[sports]>:
- stop
@@ -19,13 +22,13 @@ sports_football_world:
- define min_y <player.eye_location.direction.vector.y>
- if <[min_y]> < 0:
- define min_y 0
- define velo <context.entity.flag[ball_velocity].normalize.mul[0.05]>
- define velo <[ball].flag[ball_velocity].normalize.mul[0.05]>
- define kick <player.eye_location.direction.vector.mul[0.75].with_y[<[min_y]>].add[0,0.25,0].add[<[velo]>]>
- if <player.is_sprinting>:
- define kick <player.eye_location.direction.vector.with_y[0.25].mul[1.5]>
- if !<player.is_on_ground>:
- define kick <player.eye_location.direction.vector.with_y[0.75].mul[1.5]>
- run ball_vector_add def.ball:<context.entity> def.vector:<[kick]>
- run ball_vector_add def.ball:<[ball]> def.vector:<[kick]>
## out of bounds & ball collision
on player walks:
- if !<player.has_flag[sports]>:

View File

@@ -8,7 +8,7 @@ sports_volleyball_world:
- define ball <context.entity>
- if !<[ball].has_flag[ball]>:
- stop
- if <[ball].type> == armor_stand:
- if <[ball].type> != slime:
- define ball <proc[ball_get].context[<[ball].flag[ball]>]>
- if !<[ball].flag[ball].starts_with[sports_volleyball]>:
- stop

View File

@@ -247,6 +247,7 @@ storyboard_npc_internal_auto_display_entities:
type: world
events:
after player joins bukkit_priority:high:
- wait 1t
- foreach <server.online_players.exclude[<player>]> as:target:
- define registry registry_<[target].uuid>
- define npcs <server.npcs[<[registry]>].if_null[<list[]>]>