forum Forumsplay_arrow Minecraft fiber_manual_record Help

1

[Command Blocks] Changing block states relative to what already exists

1 emerald3 replies63 views
created 02/21/2019 4:58 am by ICEThat
last reply 02/22/2019 1:22 am
imgur.com/jJwT60R " rel="nofollow" target="_blank">imgur.com/jJwT60R


This might be a little hard to explain. As you can see in the image above, I have a pad with snow of different levels. minecraft:snow[layers=5] etc. What I'm wanting to do is decrease the layers value by one. I could individually /setblock every bit of snow, but I'm wondering if it's possible for me to use something like a fill or execute command that will decrease the layer value by one relative to what's already there. Did that come across okay? Thanks
Posted by avatar
ICEThat
Level 16 : Journeyman Dragon
11

3 replies

2
02/21/2019 5:34 am
Level 12 : Journeyman Archer
Kwanatla
avatar
Hm, not sure about this, but It might work when you first do a execute testfor block to check how many layers, than if layers equal 2, setblock snow layers 1? May require multiple command blocks, is complicated, and doesn't necessarily work, I just thought of this...
If I may ask, what are you trying to do with that?
Good luck
1
02/22/2019 12:47 am
Level 16 : Journeyman Dragon
ICEThat
avatar
How does the execute testblock command work? Can it check across a large area? Such as in my example image above, would I be able to have one command block that checks and changes all layers=2 into layers=1?

What I'm trying to do is create a melting effect. I'm making a "the ground is lava" thing. Over time, the amount of layers of snow will decrease until the player is touching the green terracotta, upon which they will be killed. The reason I'm wanting to decrease layers in this weird way is so that players enter a normal looking room, but their available moving space will decrease as the snow melts.
1
02/22/2019 1:22 am
Level 12 : Journeyman Archer
Kwanatla
avatar
I myself am new to the test for block, but I think it works across an area. I recommend minecraft.gamepedia.com
You can look all sorts of stuff up on there!
Good luck!

Planet Minecraft

Browse

Site

© 2010 - 2019
planetminecraft.com

Welcome