1

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

ICEThat's Avatar ICEThat2/21/19 4:58 am
1 emeralds 233 3
2/22/2019 1:22 am
Kwanatla's Avatar Kwanatla
https://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 ICEThat's Avatar
ICEThat
Level 18 : Journeyman Dragon
13

Create an account or sign in to comment.

3

2
02/21/2019 5:34 amhistory
Level 35 : Artisan Archer
Kwanatla
Kwanatla's 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 18 : Journeyman Dragon
ICEThat
ICEThat's 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 35 : Artisan Archer
Kwanatla
Kwanatla's 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

Website

© 2010 - 2024
www.planetminecraft.com

Welcome