Skip to content

Commit

Permalink
fix friendliness-pellet-ring AJ model not exporting custom NBT (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAfroOfDoom authored Dec 13, 2023
1 parent 7846cb6 commit 63a78b9
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
summon minecraft:item_display ~ ~ ~ {id:"minecraft:item_display",Tags:["aj.new","aj.friendliness_pellet_ring.rig_entity","aj.friendliness_pellet_ring.bone","aj.friendliness_pellet_ring.bone.root","aj.new","aj.friendliness_pellet_ring.rig_entity","aj.friendliness_pellet_ring.root","aj.rig_root"],transformation:[-4f,0f,4.898587196589413e-16f,0f,0f,4f,0f,0.9375f,-4.898587196589413e-16f,0f,-4f,0f,0f,0f,0f,1f],interpolation_duration:1,item_display:"head",item:{id:"minecraft:white_dye",Count:1b,tag:{CustomModelData:26}},CustomName:"[{\"text\":\"[\",\"color\":\"gray\"},{\"text\":\"AJ\",\"color\":\"aqua\"},\"] \",[\"\",{\"text\":\"friendliness_pellet_ring\",\"color\":\"light_purple\"},\".\",{\"text\":\"bone\",\"color\":\"white\"},\"[\",{\"text\":\"root\",\"color\":\"yellow\"},\"]\"]]",height:16f,width:48f}
summon minecraft:item_display ~ ~ ~ {CustomName:"\"Friendliness Pellet Ring\"",Tags:["omega-flowey-remastered","hostile","omega-flowey","attack","friendliness-pellets","friendliness-pellet-ring","friendliness-pellet-ring-new","aj.new","aj.friendliness_pellet_ring.rig_entity","aj.friendliness_pellet_ring.bone","aj.friendliness_pellet_ring.bone.root","aj.new","aj.friendliness_pellet_ring.rig_entity","aj.friendliness_pellet_ring.root","aj.rig_root"],id:"minecraft:item_display",transformation:[-4f,0f,4.898587196589413e-16f,0f,0f,4f,0f,0.9375f,-4.898587196589413e-16f,0f,-4f,0f,0f,0f,0f,1f],interpolation_duration:1,item_display:"head",item:{id:"minecraft:white_dye",Count:1b,tag:{CustomModelData:26}},height:16f,width:48f}
execute as @e[type=minecraft:item_display,tag=aj.friendliness_pellet_ring.root,tag=aj.new,limit=1,distance=..0.1] run function animated_java:friendliness_pellet_ring/zzzzzzzz/summon/as_root
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ scoreboard players add .aj.last_id aj.id 0
scoreboard players set $aj.loop_mode.loop aj.i 0
scoreboard players set $aj.loop_mode.once aj.i 1
scoreboard players set $aj.loop_mode.hold aj.i 2
scoreboard players set aj.friendliness_pellet_ring.export_version aj.i -622530110
scoreboard players set aj.friendliness_pellet_ring.export_version aj.i 122295690
scoreboard players reset * aj.friendliness_pellet_ring.rig_loaded
execute as @e[type=minecraft:item_display,tag=aj.friendliness_pellet_ring.root] run function animated_java:friendliness_pellet_ring/zzzzzzzz/on_load
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"animated_java:tv_screen/zzzzzzzz/tick",
"animated_java:projectile_star/zzzzzzzz/tick",
"animated_java:friendliness_pellet/zzzzzzzz/tick",
"animated_java:friendliness_pellet_ring/zzzzzzzz/tick",
"animated_java:dentata_snake_ball/zzzzzzzz/tick",
"animated_java:nose/zzzzzzzz/tick",
"animated_java:upper_eye/zzzzzzzz/tick",
"animated_java:lower_eye/zzzzzzzz/tick",
"animated_java:pipe_upper_eye/zzzzzzzz/tick",
"animated_java:homing_vine_blinking_lane/zzzzzzzz/tick",
"animated_java:homing_vine/zzzzzzzz/tick"
"animated_java:homing_vine/zzzzzzzz/tick",
"animated_java:friendliness_pellet_ring/zzzzzzzz/tick"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ scoreboard players operation @s attack.d-phi /= @s attack.bullets.total
# Set group ID
function entity:group/set

# Store `group.id` for blinking-ring
execute store result storage group id int 1 run scoreboard players get @s group.id

# Summon blinking-ring
function animated_java:friendliness_pellet_ring/summon
# TODO shouldn't need this custom tag adding stuff. fix when Blockbench exports custom tags correctly..
tag @e[tag=aj.friendliness_pellet_ring.root,tag=!friendliness-pellet-ring-initialized] add groupable
execute store result storage group id int 1 run scoreboard players get @s group.id
execute as @e[tag=aj.friendliness_pellet_ring.root,tag=!friendliness-pellet-ring-initialized] run function entity:group/copy with storage group
tag @e[tag=aj.friendliness_pellet_ring.root,tag=!friendliness-pellet-ring-initialized] add friendliness-pellet-ring
tag @e[tag=aj.friendliness_pellet_ring.root,tag=!friendliness-pellet-ring-initialized] add friendliness-pellet-ring-initialized

# Initialize blinking-ring
execute as @e[tag=friendliness-pellet-ring-new] run function entity:hostile/omega-flowey/attack/friendliness-pellets/indicator/initialize/friendliness-pellet-ring

# Randomize initial yaw
execute store result entity @s Rotation[0] float 0.01 run random value 0..35999
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Add tags
tag @s add groupable

# Copy parent indicator's group id to blinking-ring
function entity:group/copy with storage group

# Remove tags
tag @s remove friendliness-pellet-ring-new
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Play eye sheen particles
# TODO: this should be summoned at a specific position relative to the eye model (TBD where exactly)
# TODO: make better expanding-sheen model with transparency (see todo in `scratch.txt`)
particle minecraft:explosion ~ ~ ~ 0 0 0 10 1 force

playsound omega-flowey:attack.x-bullets.start hostile @a ~ ~ ~ 3 1 1
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Play eye sheen particles
# TODO: this should be summoned at a specific position relative to the eye model (TBD where exactly)
# TODO: make better expanding-sheen model with transparency (see todo in `scratch.txt`)
particle minecraft:explosion ~ ~ ~ 0 0 0 10 1 force

playsound omega-flowey:attack.x-bullets.start hostile @a ~ ~ ~ 3 1 1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# TODO remove these `unless entity @e[tag=boss]`/`if entity @e[tag=boss]` checks when boss fight is fully setup
# TODO remove these `unless entity @e[tag=boss_fight]`/`if entity @e[tag=boss_fight]` checks when boss fight is fully setup
# we have it here for development so that the boss entity (omega-flowey)
# does not need to exist for attacks to damage.
# `by @e[tag=boss,limit=1]` is needed to have proper damage knockback + death messages ("killed by Omega Flowey")
$execute unless entity @e[tag=boss] as @a[distance=..$(radius),team=player] run damage @s $(damage) minecraft:mob_projectile
$execute if entity @e[tag=boss] as @a[distance=..$(radius),team=player] run damage @s $(damage) minecraft:mob_projectile by @e[tag=boss,limit=1]
# `by @e[tag=boss_fight,limit=1]` is needed to have proper damage knockback + death messages ("killed by Omega Flowey")
$execute unless entity @e[tag=boss_fight] as @a[distance=..$(radius),team=player] run damage @s $(damage) minecraft:mob_projectile
$execute if entity @e[tag=boss_fight] as @a[distance=..$(radius),team=player] run damage @s $(damage) minecraft:mob_projectile by @e[tag=boss_fight,limit=1]
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"animated_java:tv_screen/zzzzzzzz/load",
"animated_java:projectile_star/zzzzzzzz/load",
"animated_java:friendliness_pellet/zzzzzzzz/load",
"animated_java:friendliness_pellet_ring/zzzzzzzz/load",
"animated_java:dentata_snake_ball/zzzzzzzz/load",
"animated_java:nose/zzzzzzzz/load",
"animated_java:upper_eye/zzzzzzzz/load",
"animated_java:lower_eye/zzzzzzzz/load",
"animated_java:pipe_upper_eye/zzzzzzzz/load",
"animated_java:homing_vine_blinking_lane/zzzzzzzz/load",
"animated_java:homing_vine/zzzzzzzz/load"
"animated_java:homing_vine/zzzzzzzz/load",
"animated_java:friendliness_pellet_ring/zzzzzzzz/load"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"animated_java:datapack_exporter": {
"datapack_mcmeta": "G:\\Coding\\omega-flowey-minecraft-remastered\\datapacks\\omega-flowey\\pack.mcmeta",
"outdated_rig_warning": true,
"root_entity_nbt": "{CustomName:'\"Friendliness Pellet Ring\"',Tags:[\"omega-flowey-remastered\",\"hostile\",\"omega-flowey\",\"attack\",\"friendliness-pellets\",\"friendliness-pellet-ring\",\"friendliness-pellet-ring-new\"]}",
"root_entity_nbt": "{}",
"include_variant_summon_functions": true,
"include_apply_variant_functions": true,
"include_uninstall_function": true,
Expand Down Expand Up @@ -763,7 +763,7 @@
"name": "root",
"origin": [0, 15, 0],
"color": 0,
"nbt": "{}",
"nbt": "{CustomName:'\"Friendliness Pellet Ring\"',Tags:[\"omega-flowey-remastered\",\"hostile\",\"omega-flowey\",\"attack\",\"friendliness-pellets\",\"friendliness-pellet-ring\",\"friendliness-pellet-ring-new\"]}",
"uuid": "fe3de117-90dc-15fc-ef82-10f07f5095a1",
"export": true,
"mirror_uv": false,
Expand Down Expand Up @@ -798,39 +798,53 @@
"folder": "",
"namespace": "",
"id": "0",
"width": 1,
"height": 2,
"uv_width": 16,
"uv_height": 16,
"particle": false,
"layers_enabled": false,
"sync_to_project": "",
"render_mode": "default",
"render_sides": "auto",
"frame_time": 1,
"frame_order_type": "loop",
"frame_order": "",
"frame_interpolate": false,
"visible": true,
"mode": "bitmap",
"internal": false,
"saved": true,
"uuid": "ef720afa-3971-8de2-93f4-3da52c803b61",
"relative_path": "../../../../../../../animated_java/textures/item/attacks/friendliness-pellet-ring-blinking.png",
"source": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAAXNSR0IArs4c6QAAABJJREFUGFdjeHlzwn+GhYZG/wEdZwVV8K9IvQAAAABJRU5ErkJggg=="
"source": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAAXNSR0IArs4c6QAAABJJREFUGFdjeHlzwn+GhYZG/wEdZwVV8K9IvQAAAABJRU5ErkJggg==",
"mode": "bitmap"
},
{
"path": "G:\\Coding\\omega-flowey-minecraft-remastered\\resourcepack\\assets\\animated_java\\textures\\item\\attacks\\friendliness-pellet-ring-finished.png",
"name": "friendliness-pellet-ring-finished",
"folder": "",
"namespace": "",
"id": "1",
"width": 1,
"height": 1,
"uv_width": 16,
"uv_height": 16,
"particle": false,
"layers_enabled": false,
"sync_to_project": "",
"render_mode": "default",
"render_sides": "auto",
"frame_time": 1,
"frame_order_type": "loop",
"frame_order": "",
"frame_interpolate": false,
"visible": true,
"mode": "bitmap",
"internal": false,
"saved": true,
"uuid": "559ff8c8-97ad-3b90-6075-35c83858b441",
"relative_path": "../../../../../../../animated_java/textures/item/attacks/friendliness-pellet-ring-finished.png",
"source": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAA1JREFUGFdjOL9/x38AB+0DRs8e5HYAAAAASUVORK5CYII="
"source": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAA1JREFUGFdjOL9/x38AB+0DRs8e5HYAAAAASUVORK5CYII=",
"mode": "bitmap"
}
]
}

0 comments on commit 63a78b9

Please sign in to comment.