Skip to content

Commit bab7a4c

Browse files
committed
🐛 Fix cameras in versions below 1.21.5 using outdated tech
1 parent 0afc8e7 commit bab7a4c

File tree

4 files changed

+16
-12
lines changed

4 files changed

+16
-12
lines changed

src/systems/datapackCompiler/1.20.4/animation.mcb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ dir <%export_namespace%> {
548548
type=<%locator.config.entity_type%>, \
549549
tag=<%TAGS.NEW()%>, \
550550
tag=<%TAGS.PROJECT_LOCATOR_NAMED(export_namespace, locator.storage_name)%>, \
551-
distance=..<%locator.max_distance + 1%> \
551+
distance=..<%Math.ceil(locator.max_distance)%> \
552552
] \
553553
run block as_locator/<%locator.path_name%> {
554554
# run block ../as_locator/<%locator.path_name%> {
@@ -582,9 +582,10 @@ dir <%export_namespace%> {
582582
type=minecraft:item_display, \
583583
tag=<%TAGS.NEW()%>, \
584584
tag=<%TAGS.PROJECT_CAMERA_NAMED(export_namespace, camera.storage_name)%>, \
585-
distance=..<%camera.max_distance + 1%> \
585+
distance=..<%Math.ceil(camera.max_distance)%> \
586586
] \
587-
run block ../as_camera/<%camera.path_name%> {
587+
run block as_camera/<%camera.path_name%> {
588+
# run block ../as_camera/<%camera.path_name%> {
588589
tag @s remove <%TAGS.NEW()%>
589590
function *global/internal/gu/convert_uuid_array_to_string
590591
tp @s \

src/systems/datapackCompiler/1.20.5/animation.mcb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ dir <%export_namespace%> {
548548
type=<%locator.config.entity_type%>, \
549549
tag=<%TAGS.NEW()%>, \
550550
tag=<%TAGS.PROJECT_LOCATOR_NAMED(export_namespace, locator.storage_name)%>, \
551-
distance=..<%locator.max_distance + 1%> \
551+
distance=..<%Math.ceil(locator.max_distance)%> \
552552
] \
553553
run block as_locator/<%locator.path_name%> {
554554
# run block ../as_locator/<%locator.path_name%> {
@@ -582,9 +582,10 @@ dir <%export_namespace%> {
582582
type=minecraft:item_display, \
583583
tag=<%TAGS.NEW()%>, \
584584
tag=<%TAGS.PROJECT_CAMERA_NAMED(export_namespace, camera.storage_name)%>, \
585-
distance=..<%camera.max_distance + 1%> \
585+
distance=..<%Math.ceil(camera.max_distance)%> \
586586
] \
587-
run block ../as_camera/<%camera.path_name%> {
587+
run block as_camera/<%camera.path_name%> {
588+
# run block ../as_camera/<%camera.path_name%> {
588589
tag @s remove <%TAGS.NEW()%>
589590
function *global/internal/gu/convert_uuid_array_to_string
590591
tp @s \

src/systems/datapackCompiler/1.21.2/animation.mcb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ dir <%export_namespace%> {
548548
type=<%locator.config.entity_type%>, \
549549
tag=<%TAGS.NEW()%>, \
550550
tag=<%TAGS.PROJECT_LOCATOR_NAMED(export_namespace, locator.storage_name)%>, \
551-
distance=..<%locator.max_distance + 1%> \
551+
distance=..<%Math.ceil(locator.max_distance)%> \
552552
] \
553553
run block as_locator/<%locator.path_name%> {
554554
# run block ../as_locator/<%locator.path_name%> {
@@ -582,9 +582,10 @@ dir <%export_namespace%> {
582582
type=minecraft:item_display, \
583583
tag=<%TAGS.NEW()%>, \
584584
tag=<%TAGS.PROJECT_CAMERA_NAMED(export_namespace, camera.storage_name)%>, \
585-
distance=..<%camera.max_distance + 1%> \
585+
distance=..<%Math.ceil(camera.max_distance)%> \
586586
] \
587-
run block ../as_camera/<%camera.path_name%> {
587+
run block as_camera/<%camera.path_name%> {
588+
# run block ../as_camera/<%camera.path_name%> {
588589
tag @s remove <%TAGS.NEW()%>
589590
function *global/internal/gu/convert_uuid_array_to_string
590591
tp @s \

src/systems/datapackCompiler/1.21.4/animation.mcb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ dir <%export_namespace%> {
548548
type=<%locator.config.entity_type%>, \
549549
tag=<%TAGS.NEW()%>, \
550550
tag=<%TAGS.PROJECT_LOCATOR_NAMED(export_namespace, locator.storage_name)%>, \
551-
distance=..<%locator.max_distance + 1%> \
551+
distance=..<%Math.ceil(locator.max_distance)%> \
552552
] \
553553
run block as_locator/<%locator.path_name%> {
554554
# run block ../as_locator/<%locator.path_name%> {
@@ -582,9 +582,10 @@ dir <%export_namespace%> {
582582
type=minecraft:item_display, \
583583
tag=<%TAGS.NEW()%>, \
584584
tag=<%TAGS.PROJECT_CAMERA_NAMED(export_namespace, camera.storage_name)%>, \
585-
distance=..<%camera.max_distance + 1%> \
585+
distance=..<%Math.ceil(camera.max_distance)%> \
586586
] \
587-
run block ../as_camera/<%camera.path_name%> {
587+
run block as_camera/<%camera.path_name%> {
588+
# run block ../as_camera/<%camera.path_name%> {
588589
tag @s remove <%TAGS.NEW()%>
589590
function *global/internal/gu/convert_uuid_array_to_string
590591
tp @s \

0 commit comments

Comments
 (0)