Merge pull request 'Various bugfixes in ball.dsc lib and in storyboard_npc_tasks.dsc' (#3) from bugfix-27-12-2025 into main
Reviewed-on: #3
This commit was merged in pull request #3.
This commit is contained in:
@@ -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
|
- 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 ball_collision <entry[ball_collision].spawned_entity>
|
||||||
- define size <[ball_collision].bounding_box.get[1].sub[<[ball_collision].location>].x.abs.add[0.01]>
|
- 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>
|
- define ball_display <entry[ball_display].spawned_entity>
|
||||||
- adjust <[ball_display]> equipment:<map[].with[helmet].as[<[display_item]>]>
|
- adjust <[ball_display]> equipment:<map[].with[helmet].as[<[display_item]>]>
|
||||||
- flag <[ball_collision]> ball:<[id]>
|
- flag <[ball_collision]> ball:<[id]>
|
||||||
@@ -142,8 +142,5 @@ ball_internal_physics_update_ball:
|
|||||||
- define next <[changes].get[1].if_null[<[next]>]>
|
- define next <[changes].get[1].if_null[<[next]>]>
|
||||||
- define velocity <[changes].get[2].if_null[<[velocity]>]>
|
- define velocity <[changes].get[2].if_null[<[velocity]>]>
|
||||||
- flag <[ball]> ball_velocity:<[velocity]>
|
- flag <[ball]> ball_velocity:<[velocity]>
|
||||||
- if <[size]> <= 2:
|
- 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].flag[ball_display]> <[next].below[<[size].add[0.7]>]>
|
|
||||||
- else:
|
|
||||||
- teleport <[ball].flag[ball_display]> <[next].below[<[size].add[0.7]>]>
|
|
||||||
- teleport <[ball]> <[next]>
|
- teleport <[ball]> <[next]>
|
||||||
|
|||||||
@@ -20,10 +20,10 @@ compatibility_check_world:
|
|||||||
type: world
|
type: world
|
||||||
events:
|
events:
|
||||||
after player joins:
|
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
|
- stop
|
||||||
- define player_version <player.viaversion_version.split[-].get[1].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.split[.].limit[3].get[1|2].separated_by[.]>
|
- 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:
|
- if <proc[compatibility_check_compare_versions].context[<[player_version]>|<[server_version]>]> == -1:
|
||||||
- wait 5s
|
- wait 5s
|
||||||
- if !<player.is_online>:
|
- if !<player.is_online>:
|
||||||
|
|||||||
@@ -7,7 +7,10 @@ sports_football_world:
|
|||||||
- ratelimit <player> 10t
|
- ratelimit <player> 10t
|
||||||
- if !<context.entity.has_flag[ball]>:
|
- if !<context.entity.has_flag[ball]>:
|
||||||
- stop
|
- 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
|
- stop
|
||||||
- if !<player.has_flag[sports]>:
|
- if !<player.has_flag[sports]>:
|
||||||
- stop
|
- stop
|
||||||
@@ -19,13 +22,13 @@ sports_football_world:
|
|||||||
- define min_y <player.eye_location.direction.vector.y>
|
- define min_y <player.eye_location.direction.vector.y>
|
||||||
- if <[min_y]> < 0:
|
- if <[min_y]> < 0:
|
||||||
- define 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]>]>
|
- 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>:
|
- if <player.is_sprinting>:
|
||||||
- define kick <player.eye_location.direction.vector.with_y[0.25].mul[1.5]>
|
- define kick <player.eye_location.direction.vector.with_y[0.25].mul[1.5]>
|
||||||
- if !<player.is_on_ground>:
|
- if !<player.is_on_ground>:
|
||||||
- define kick <player.eye_location.direction.vector.with_y[0.75].mul[1.5]>
|
- 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
|
## out of bounds & ball collision
|
||||||
on player walks:
|
on player walks:
|
||||||
- if !<player.has_flag[sports]>:
|
- if !<player.has_flag[sports]>:
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ sports_volleyball_world:
|
|||||||
- define ball <context.entity>
|
- define ball <context.entity>
|
||||||
- if !<[ball].has_flag[ball]>:
|
- if !<[ball].has_flag[ball]>:
|
||||||
- stop
|
- stop
|
||||||
- if <[ball].type> == armor_stand:
|
- if <[ball].type> != slime:
|
||||||
- define ball <proc[ball_get].context[<[ball].flag[ball]>]>
|
- define ball <proc[ball_get].context[<[ball].flag[ball]>]>
|
||||||
- if !<[ball].flag[ball].starts_with[sports_volleyball]>:
|
- if !<[ball].flag[ball].starts_with[sports_volleyball]>:
|
||||||
- stop
|
- stop
|
||||||
|
|||||||
@@ -247,6 +247,7 @@ storyboard_npc_internal_auto_display_entities:
|
|||||||
type: world
|
type: world
|
||||||
events:
|
events:
|
||||||
after player joins bukkit_priority:high:
|
after player joins bukkit_priority:high:
|
||||||
|
- wait 1t
|
||||||
- foreach <server.online_players.exclude[<player>]> as:target:
|
- foreach <server.online_players.exclude[<player>]> as:target:
|
||||||
- define registry registry_<[target].uuid>
|
- define registry registry_<[target].uuid>
|
||||||
- define npcs <server.npcs[<[registry]>].if_null[<list[]>]>
|
- define npcs <server.npcs[<[registry]>].if_null[<list[]>]>
|
||||||
|
|||||||
Reference in New Issue
Block a user