#(cthepush) Firework explosion in components_patch

29 messages · Page 1 of 1 (latest)

steep pawn
#

Hey guys, I am trying to adjust a item components_patch and it seams that is not working with multiples maps, this is my example.

- adjust def:item components_patch:<map[minecraft:item_model=string:test:default;minecraft:firework_explosion=<map[shape=string:small_ball;colors=int_array:9671495]>]>
the item model works but the color doesn't.

I am doing something wrong?

charred atlasBOT
#

(cthepush) Firework explosion in components_patch

charred atlasBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

magic carbon
#

!m firework

gleaming sableBOT
# magic carbon !m firework
Cannot Specify Searched Mechanism

Multiple possible mechanisms: ItemTag.firework, ItemTag.firework_power, EntityTag.firework_item, PlayerTag.firework_boost, EntityTag.firework_lifetime.

#
Possible Confusion

Did you mean to search for command firework?

magic carbon
#

!m itemtag.firework

gleaming sableBOT
# magic carbon !m itemtag.firework

Sets the firework's settings.
Each item in the list can be any of the following:
1: Comma-separated effect data in the format: TRAIL,FLICKER,TYPE,RED,GREEN,BLUE,RED,GREEN,BLUE
For example: true,false,BALL,255,0,0,0,255,0 would create a trailing ball firework that fades from red to green.
2: A MapTag, with "type", "color", "fade_color", "trail", and "flicker" keys.
For example: [type=ball;color=red;fade_color=green;trail=true;flicker=false]
3: A single number, to set the power.
Types: ball, ball_...

Object

ItemTag

Input

ListTag

Tags

<ItemTag.firework> Returns the firework's property value as a list, matching the non-MapTag format...
<ItemTag.firework_data> Returns the firework's property value as a ListTag of MapTags, matching th...

magic carbon
#

!m itemtag.firework_power

gleaming sableBOT
# magic carbon !m itemtag.firework_power

(Property) Sets the firework's power.
Power primarily affects how high the firework flies, with each level of power corresponding to approximately half a second of additional flight time.

Group

Properties

Object

ItemTag

Input

ElementTag(Number)

Tags

<ItemTag.firework_power> (Property) Returns the firework's power. Power primarily affects how high...

magic carbon
#

These are going to be easier than adjusting components_patch

steep pawn
#

becouse I am using the new item_model system I define the item as a diferent item than firework_star

#

and at least with this - adjust def:item firework:<map[type=small_ball;color=red]> is not working

magic carbon
#

Is def:item something in an inventory?

steep pawn
#

strange that with this definition works

_item:
  type: item
  material: paper
  display name: <white>Simple Test
  flags:
    version: 1
    uses: 1
    timer: 15s
    bonded: false
  mechanisms:
    hides: ALL
    components_patch:
      item_model: string:test:default
      firework_explosion:
        shape: string:small_ball
        colors: int_array:9671495
``` When I attempt to change only the item_model, it unexpectedly causes issues with the entire components_patch. I tried using the expression
<MapTag.with[<key>].as[<value>]>  
to update just the specific part I want, but it does not work either.
steep pawn
magic carbon
#

I mean, you're using paper as the material

steep pawn
#

yeah 🙂 but this works```_item:
type: item
material: paper
display name: <white>Simple Test
flags:
version: 1
uses: 1
timer: 15s
bonded: false
mechanisms:
hides: ALL
components_patch:
item_model: string:test:default
firework_explosion:
shape: string:small_ball
colors: int_array:9671495

magic carbon
#

The components_patch tag is really only for stuff that isn't already part of denizen

#

The two things you're using it for under firework_explosion are stuff I've linked above

#

[shape=small_ball;color=...] etc

#

MapTags in scripts are generally formatted like components_patch is though, not in a single line but in separate categories

#
    firework:
        shape: small_ball
        color: ...```
steep pawn
#

in my head some how this should work - adjust def:item components_patch:<[item].full_components_patch.with[minecraft:item_model].as[string:tessadia:test/default]> and it changes the item_model, but the color does not persist.

steep pawn
steep pawn
#

Really hoping this "feature" makes its way to Denizen — I love messing with item data, no matter the material. Until then...

jaunty inletBOT
#
Resolved

Thread closed as resolved.

#
Thread Reopened

Thread was manually reopened by @steep pawn.