From eef232d8c70399da18581f22811f411d92572c2d Mon Sep 17 00:00:00 2001 From: Rares Bozga Date: Sat, 27 Dec 2025 13:51:48 +0200 Subject: [PATCH] Various bugfixes in ball.dsc lib and in storyboard_npc_tasks.dsc --- scripts/lib/ball.dsc | 7 ++----- scripts/misc/compatibility_check.dsc | 6 +++--- scripts/sports/football/sports_football_world.dsc | 9 ++++++--- scripts/sports/volleyball/sports_volleyball_world.dsc | 2 +- scripts/storyboard/tasks/storyboard_npc_tasks.dsc | 1 + 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/scripts/lib/ball.dsc b/scripts/lib/ball.dsc index e51f63b..79c5852 100644 --- a/scripts/lib/ball.dsc +++ b/scripts/lib/ball.dsc @@ -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 - 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 - adjust <[ball_display]> equipment:]> - 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]> diff --git a/scripts/misc/compatibility_check.dsc b/scripts/misc/compatibility_check.dsc index 92515da..d1ca357 100644 --- a/scripts/misc/compatibility_check.dsc +++ b/scripts/misc/compatibility_check.dsc @@ -20,10 +20,10 @@ compatibility_check_world: type: world events: after player joins: - - if !|general_ignore_version_compatibility_check]>: + - if |general_ignore_version_compatibility_check]>: - stop - - define player_version - - define server_version + - define player_version + - define server_version - if |<[server_version]>]> == -1: - wait 5s - if !: diff --git a/scripts/sports/football/sports_football_world.dsc b/scripts/sports/football/sports_football_world.dsc index 5b97b92..260e081 100644 --- a/scripts/sports/football/sports_football_world.dsc +++ b/scripts/sports/football/sports_football_world.dsc @@ -7,7 +7,10 @@ sports_football_world: - ratelimit 10t - if !: - stop - - if !: + - define ball + - if <[ball].type> != slime: + - define ball ]> + - if !<[ball].flag[ball].starts_with[sports_football]>: - stop - if !: - stop @@ -19,13 +22,13 @@ sports_football_world: - define min_y - if <[min_y]> < 0: - define min_y 0 - - define velo + - define velo <[ball].flag[ball_velocity].normalize.mul[0.05]> - define kick ].add[0,0.25,0].add[<[velo]>]> - if : - define kick - if !: - define kick - - run ball_vector_add def.ball: def.vector:<[kick]> + - run ball_vector_add def.ball:<[ball]> def.vector:<[kick]> ## out of bounds & ball collision on player walks: - if !: diff --git a/scripts/sports/volleyball/sports_volleyball_world.dsc b/scripts/sports/volleyball/sports_volleyball_world.dsc index adb7251..3bbe04f 100644 --- a/scripts/sports/volleyball/sports_volleyball_world.dsc +++ b/scripts/sports/volleyball/sports_volleyball_world.dsc @@ -8,7 +8,7 @@ sports_volleyball_world: - define ball - if !<[ball].has_flag[ball]>: - stop - - if <[ball].type> == armor_stand: + - if <[ball].type> != slime: - define ball ]> - if !<[ball].flag[ball].starts_with[sports_volleyball]>: - stop diff --git a/scripts/storyboard/tasks/storyboard_npc_tasks.dsc b/scripts/storyboard/tasks/storyboard_npc_tasks.dsc index ed60d65..a40c4eb 100644 --- a/scripts/storyboard/tasks/storyboard_npc_tasks.dsc +++ b/scripts/storyboard/tasks/storyboard_npc_tasks.dsc @@ -247,6 +247,7 @@ storyboard_npc_internal_auto_display_entities: type: world events: after player joins bukkit_priority:high: + - wait 1t - foreach ]> as:target: - define registry registry_<[target].uuid> - define npcs ].if_null[]> -- 2.49.1