@@ -91,8 +91,8 @@ function generateLocatorPassenger(
9191 new deepslate . NbtList ( [
9292 new deepslate . NbtString ( G . TAGS . new ) ,
9393 new deepslate . NbtString ( G . TAGS . rigEntity ) ,
94- new deepslate . NbtString ( G . TAGS . locatorEntity ) ,
95- new deepslate . NbtString ( formatStr ( G . TAGS . namedLocatorEntity , [ locator . name ] ) ) ,
94+ new deepslate . NbtString ( G . TAGS . locatorOrigin ) ,
95+ new deepslate . NbtString ( formatStr ( G . TAGS . namedLocatorOrigin , [ locator . name ] ) ) ,
9696 ] )
9797 )
9898 . set (
@@ -125,12 +125,12 @@ function generateLocatorPassenger(
125125 )
126126 )
127127
128- const locatorTargetNbt = ( deepslate . NbtTag . fromString ( locator . nbt ) as NbtCompound )
128+ const locatorEntityNbt = ( deepslate . NbtTag . fromString ( locator . nbt ) as NbtCompound )
129129 . set (
130130 'Tags' ,
131131 new deepslate . NbtList ( [
132- new deepslate . NbtString ( G . TAGS . locatorTarget ) ,
133- new deepslate . NbtString ( formatStr ( G . TAGS . namedLocatorTarget , [ locator . name ] ) ) ,
132+ new deepslate . NbtString ( G . TAGS . locatorEntity ) ,
133+ new deepslate . NbtString ( formatStr ( G . TAGS . namedLocatorEntity , [ locator . name ] ) ) ,
134134 new deepslate . NbtString ( G . TAGS . new ) ,
135135 ] )
136136 )
@@ -145,7 +145,7 @@ function generateLocatorPassenger(
145145 '' ,
146146 { text : `${ G . PROJECT_NAME } ` , color : 'light_purple' } ,
147147 `.` ,
148- { text : `locatorTarget ` , color : 'white' } ,
148+ { text : `locatorEntity ` , color : 'white' } ,
149149 `[` ,
150150 { text : `${ locator . name } ` , color : 'yellow' } ,
151151 `]` ,
@@ -164,25 +164,25 @@ function generateLocatorPassenger(
164164 }
165165 internalSummonFolder
166166 . newFolder ( 'locator_' + locator . name )
167- // ANCHOR - function G.PROJECT_PATH/summon/locator_<locator_name>/as_locator
168- . chainNewFile ( 'as_locator .mcfunction' , [
169- // `say Origin`,
170- `summon ${ locator . entity_type } ~ ~ ~ ${ locatorTargetNbt . toString ( ) } ` ,
171- `execute as @e[type=${ locator . entity_type } ,tag=${ formatStr ( G . TAGS . namedLocatorTarget , [
167+ // ANCHOR - function G.PROJECT_PATH/summon/locator_<locator_name>/as_origin
168+ . chainNewFile ( 'as_origin .mcfunction' , [
169+ // `say Locator Origin`,
170+ `summon ${ locator . entity_type } ~ ~ ~ ${ locatorEntityNbt . toString ( ) } ` ,
171+ `execute as @e[type=${ locator . entity_type } ,tag=${ formatStr ( G . TAGS . namedLocatorEntity , [
172172 locator . name ,
173- ] ) } ,tag=${ G . TAGS . new } ,limit=1,distance=..0. 1] run function ${
174- G . PROJECT_PATH
175- } /summon/locator_${ locator . name } /as_target `,
173+ ] ) } ,tag=${ G . TAGS . new } ,limit=1,distance=..1] run function ${
174+ G . INTERNAL_PATH
175+ } /summon/locator_${ locator . name } /as_entity `,
176176 `data modify entity @s Owner set from storage animated_java Owner` ,
177177 `data remove storage animated_java Owner` ,
178- // `execute on origin run say locatorTarget for ${locator.name}`,
179178 ] )
180- // ANCHOR - function G.PROJECT_PATH/summon/locator_<locator_name>/as_target
181- . chainNewFile ( 'as_target.mcfunction' , [
179+ // ANCHOR - function G.PROJECT_PATH/summon/locator_<locator_name>/as_entity
180+ . chainNewFile ( 'as_entity.mcfunction' , [
181+ // `say Locator Entity`,
182182 locatorToString ( G . exportData . rig . defaultPose . find ( v => v . uuid === uuid ) ) ,
183183 `data modify storage animated_java Owner set from entity @s UUID` ,
184184 `tag @s remove ${ G . TAGS . new } ` ,
185- `function #${ G . PROJECT_PATH } /on_summon/as_locator_targets ` ,
185+ `function #${ G . PROJECT_PATH } /on_summon/as_locator_entities ` ,
186186 ] )
187187
188188 return passenger
@@ -204,8 +204,8 @@ function generateCameraPassenger(
204204 new deepslate . NbtList ( [
205205 new deepslate . NbtString ( G . TAGS . new ) ,
206206 new deepslate . NbtString ( G . TAGS . rigEntity ) ,
207- new deepslate . NbtString ( G . TAGS . cameraEntity ) ,
208- new deepslate . NbtString ( formatStr ( G . TAGS . namedCameraEntity , [ camera . name ] ) ) ,
207+ new deepslate . NbtString ( G . TAGS . cameraOrigin ) ,
208+ new deepslate . NbtString ( formatStr ( G . TAGS . namedCameraOrigin , [ camera . name ] ) ) ,
209209 ] )
210210 )
211211 . set (
@@ -238,12 +238,12 @@ function generateCameraPassenger(
238238 )
239239 )
240240
241- const cameraTargetNbt = ( deepslate . NbtTag . fromString ( camera . nbt ) as NbtCompound )
241+ const cameraNbt = ( deepslate . NbtTag . fromString ( camera . nbt ) as NbtCompound )
242242 . set (
243243 'Tags' ,
244244 new deepslate . NbtList ( [
245- new deepslate . NbtString ( G . TAGS . locatorTarget ) ,
246- new deepslate . NbtString ( formatStr ( G . TAGS . namedLocatorTarget , [ camera . name ] ) ) ,
245+ new deepslate . NbtString ( G . TAGS . cameraEntity ) ,
246+ new deepslate . NbtString ( formatStr ( G . TAGS . namedCameraEntity , [ camera . name ] ) ) ,
247247 new deepslate . NbtString ( G . TAGS . new ) ,
248248 ] )
249249 )
@@ -258,7 +258,7 @@ function generateCameraPassenger(
258258 '' ,
259259 { text : `${ G . PROJECT_NAME } ` , color : 'light_purple' } ,
260260 `.` ,
261- { text : `locatorTarget ` , color : 'white' } ,
261+ { text : `camera ` , color : 'white' } ,
262262 `[` ,
263263 { text : `${ camera . name } ` , color : 'yellow' } ,
264264 `]` ,
@@ -277,25 +277,25 @@ function generateCameraPassenger(
277277 }
278278 internalSummonFolder
279279 . newFolder ( 'camera_' + camera . name )
280- // ANCHOR - function G.PROJECT_PATH/summon/camera_<camera_name>/as_camera
281- . chainNewFile ( 'as_camera .mcfunction' , [
282- // `say Origin`,
283- `summon ${ camera . entity_type } ~ ~ ~ ${ cameraTargetNbt . toString ( ) } ` ,
284- `execute as @e[type=${ camera . entity_type } ,tag=${ formatStr ( G . TAGS . namedCameraTarget , [
280+ // ANCHOR - function G.PROJECT_PATH/summon/camera_<camera_name>/as_origin
281+ . chainNewFile ( 'as_origin .mcfunction' , [
282+ // `say Camera Origin`,
283+ `summon ${ camera . entity_type } ~ ~ ~ ${ cameraNbt . toString ( ) } ` ,
284+ `execute as @e[type=${ camera . entity_type } ,tag=${ formatStr ( G . TAGS . namedCameraEntity , [
285285 camera . name ,
286- ] ) } ,tag=${ G . TAGS . new } ,limit=1,distance=..0. 1] run function ${
287- G . PROJECT_PATH
288- } /summon/camera_${ camera . name } /as_target `,
286+ ] ) } ,tag=${ G . TAGS . new } ,limit=1,distance=..1] run function ${
287+ G . INTERNAL_PATH
288+ } /summon/camera_${ camera . name } /as_entity `,
289289 `data modify entity @s Owner set from storage animated_java Owner` ,
290290 `data remove storage animated_java Owner` ,
291- // `execute on origin run say cameraTarget for ${camera.name}`,
292291 ] )
293- // ANCHOR - function G.PROJECT_PATH/summon/camera_<camera_name>/as_target
294- . chainNewFile ( 'as_target.mcfunction' , [
292+ // ANCHOR - function G.PROJECT_PATH/summon/camera_<camera_name>/as_entity
293+ . chainNewFile ( 'as_entity.mcfunction' , [
294+ // `say Camera Entity`,
295295 cameraToString ( G . exportData . rig . defaultPose . find ( v => v . uuid === uuid ) ) ,
296296 `data modify storage animated_java Owner set from entity @s UUID` ,
297297 `tag @s remove ${ G . TAGS . new } ` ,
298- `function #${ G . PROJECT_PATH } /on_summon/as_camera_targets ` ,
298+ `function #${ G . PROJECT_PATH } /on_summon/as_camera_entities ` ,
299299 ] )
300300
301301 return passenger
@@ -527,47 +527,47 @@ export function generateFunctions(folders: IFolders) {
527527 `function #${ G . PROJECT_PATH } /on_summon/as_rig_entities` ,
528528 `execute if entity @s[tag=${ G . TAGS . boneEntity } ] run function #${ G . INTERNAL_PATH } /on_summon/as_bones` ,
529529 locatorCount > 0
530- ? `execute if entity @s[tag=${ G . TAGS . locatorEntity } ] run function ${ G . INTERNAL_PATH } /summon/as_locators `
530+ ? `execute if entity @s[tag=${ G . TAGS . locatorOrigin } ] run function ${ G . INTERNAL_PATH } /summon/as_locator_origins `
531531 : undefined ,
532532 cameraCount > 0
533- ? `execute if entity @s[tag=${ G . TAGS . cameraEntity } ] run function ${ G . INTERNAL_PATH } /summon/as_cameras `
533+ ? `execute if entity @s[tag=${ G . TAGS . cameraOrigin } ] run function ${ G . INTERNAL_PATH } /summon/as_camera_origins `
534534 : undefined ,
535535 ] )
536536
537537 if ( locatorCount > 0 )
538538 internalSummonFolder
539- // ANCHOR - function G.INTERNAL_FUNCTIONS/summon/as_locators
540- . chainNewFile ( 'as_locators .mcfunction' , [
539+ // ANCHOR - function G.INTERNAL_FUNCTIONS/summon/as_locator_origins
540+ . chainNewFile ( 'as_locator_origins .mcfunction' , [
541541 ...Object . values ( G . exportData . rig . nodeMap )
542542 . map ( locator =>
543543 locator . type === 'locator'
544- ? `execute if entity @s[tag=${ formatStr ( G . TAGS . namedLocatorEntity , [
544+ ? `execute if entity @s[tag=${ formatStr ( G . TAGS . namedLocatorOrigin , [
545545 locator . name ,
546546 ] ) } ] run function ${ G . INTERNAL_PATH } /summon/locator_${
547547 locator . name
548548 } /as_origin`
549549 : ''
550550 )
551551 . filter ( v => v ) ,
552- `function #${ G . PROJECT_PATH } /on_summon/as_locators ` ,
552+ `function #${ G . PROJECT_PATH } /on_summon/as_locator_origins ` ,
553553 ] )
554554
555555 if ( cameraCount > 0 )
556556 internalSummonFolder
557- // ANCHOR - function G.INTERNAL_FUNCTIONS/summon/as_cameras
558- . chainNewFile ( 'as_cameras .mcfunction' , [
557+ // ANCHOR - function G.INTERNAL_FUNCTIONS/summon/as_camera_origins
558+ . chainNewFile ( 'as_camera_origins .mcfunction' , [
559559 ...Object . values ( G . exportData . rig . nodeMap )
560560 . map ( camera =>
561561 camera . type === 'camera'
562- ? `execute if entity @s[tag=${ formatStr ( G . TAGS . namedCameraEntity , [
562+ ? `execute if entity @s[tag=${ formatStr ( G . TAGS . namedCameraOrigin , [
563563 camera . name ,
564564 ] ) } ] run function ${ G . INTERNAL_PATH } /summon/camera_${
565565 camera . name
566566 } /as_origin`
567567 : ''
568568 )
569569 . filter ( v => v ) ,
570- `function #${ G . PROJECT_PATH } /on_summon/as_cameras ` ,
570+ `function #${ G . PROJECT_PATH } /on_summon/as_camera_origins ` ,
571571 ] )
572572
573573 // ANCHOR - function G.PROJECT_PATH/summon/<variant_name>
0 commit comments