#I don't know why it isn't incrementing

1 messages · Page 1 of 1 (latest)

glossy plover
#

"set_block_state": { "dma:fuel_level": "query.block_state('dma:fuel_level') + 1" }
I'm trying to increment it, but it won't go past 1 for some reason. And then when I check the block state with /execute at @s if block ~~-1~ dma:smeltery_block ["dma:fuel_level"=1] run /title @s actionbar working it doesn't work. And only says it when I set it to 0.

#

I can't send the full code without this

#

It won't send at all if I have the very first { before the format

#

there

#

I don't know how to make the incrementation work

#

It just won't work

#

I don't know why it isn't incrementing

daring basin
glossy plover
#

idk what's happening

#

Could it be because I have 2 things named dma:fuel_level?

#

welp

#

Guess I will have to do it the longer way

daring basin
glossy plover
#

Bone_visibility of 16 parts which none worked

daring basin
#

Well, you can then create a sequence and go from level 0 to 1, then to 2, 3, and so on. It's longer but it will definitely work.

daring basin
glossy plover
#

that is correct

daring basin
#

Maybe the on_placed component is changing the state to 0 as soon as you change it

glossy plover
glossy plover
#

I just added the /setblock part btw

daring basin
#

Remove the event that is triggered by minecraft:on_placed

#

State 0 is applied by default, so this is not necessary

glossy plover
#

oh

#

Did not know that

#

ahh ok

#

now it works

#

thank you very much

#

appreciate it

daring basin
#

Ok, so minecraft:on_placed is activated whenever the block state changes

glossy plover
#

ye

#

which, doesn't seem right

daring basin
#

Next time try using minecraft:on_player_placing or apply some condition to the event so that it only occurs once

lucid basalt