3

I'm trying to create funny pvp maps for my friends and I. I would like to go deeper and try a lava survival map. The goal is basically to make the lava go x block up every x time/tick (or replace any air block at a given height + 1 every x time/tick)

How can I achieve this using in-game mechanics?

9
  • 3
    what do you mean with js coding? Commented May 19, 2016 at 14:40
  • 2
    You probably mean Jav (wich is completly diffrent from JavaScript) or Command block wich have kind of there own language (completly diffrent from JavaScript) Commented May 19, 2016 at 14:58
  • 1
    I gonna post an answer with command blocks in a sec :) Commented May 19, 2016 at 15:04
  • 1
    @SimonMeusel I think you mean Java ;)
    – MCMastery
    Commented May 19, 2016 at 21:02
  • 1
    @Random832: for more drama: any air block adjacent to a lava block. Slower, but allows users to panic as they see it approaching, rather than simply suddenly an entire field being covered in lava Commented May 19, 2016 at 22:44

3 Answers 3

8

You can use /fill command.

I imagine you will have something like square map , for example 50 * 50. You need to know coordinates of corners and it would be good to have it surrounded by some solid blocks (glass, stone, etc), so lava won't flow everywhere...

Then inside a map you will have some islands etc.

All you need is some control room, for example I would make it above the gameplay area, so you can have access for it and there is no problem with loading the chunks... In this area you will need some redstone.

I already mentioned /fill command, this will be useful.

/fill <x1> <y1> <z1> <x2> <y2> <z2> <TileName> <dataValue> replace [replaceTileName] [replaceDataValue]

For our use it will shrink into :

/fill <x1> Y <z1> <x2> Y <z2> minecraft:lava 0 replace minecraft:air 

Now how to setup it:

  • You need to be sure that all blocks you want to flood with lava are air ones. And be sure that flammable materials can be destroyed if you have such a settings enabled (gamerule). If careful enough, you can make even renewable arena.
  • You will need one commandblock PER each Y value (I expect you want to raise the lava by one block at time).
  • You will need to have "slowing" redstone or some timers.

Resumé:

Check the coordinates of opposite corners of arena, one will be x1,z1, second will be x2,z2. Y coordinate will be same in both parts of command, meaning the layer you want to flood.

Now the timers. You can make kinda extended redstone setup (repeaters slowing signal down, or droppers, hoppers, etc), or you can use /scoreboard.

If using redstone, all you need is to start the game by pressing some button and let redstone flow (best would be with hoppers which can slow down the current for long time, but are compact) run through the commands. Then it depends on how fast you will make the redstone.

So your commandblocks will be something like:

/fill 0 1 0 50 1 50 minecraft:lava 0 replace minecraft:air
/fill 0 2 0 50 2 50 minecraft:lava 0 replace minecraft:air 
/fill 0 3 0 50 3 50 minecraft:lava 0 replace minecraft:air 

For resetting arena, you can then use something like reverse command:

/fill 0 1 0 50 YMAX 50 minecraft:air 0 replace minecraft:lava
10
  • 1
    That's why I marked him. xD Thanks both of you that was much more easy than I thought
    – Lich4r
    Commented May 19, 2016 at 15:10
  • 1
    I just thought of a problem. I will need one commandblock for each height of my map. Let's say we can go to160 that is 100 commandblocks :O
    – Lich4r
    Commented May 19, 2016 at 15:18
  • 1
    @FromBabylon since the only way to get command blocks is in creative mode with the /give command, that shouldn't be too much of a problem.
    – user140963
    Commented May 19, 2016 at 15:20
  • 1
    @FromBabylon well the problem is that there is no thing like using variables in commandblocks....sadly. Therefore it is needed. However you still can get plugin for that, which will call commands, however it needs some knowledge of Java. Commented May 19, 2016 at 15:22
  • 1
    Also you can do bigger steps, for example flooding 3-4 blocks at time, therefore you can reduce number of commands. Commented May 19, 2016 at 15:24
4

Yes, you can. Suppose you have a map/map part going up vertically, you first need to fill all the unused air blocks around the map structure, so they don't get filled by lava. Then, for each lava rise, use a separate Command block:

/fill X1 Y1 Z1 X2 Y1 Z2 minecraft:lava 0 replace minecraft:air

The command will fill a flat square of air with lava on your map - then, add a Coparator and a few Repeaters leading from the 1st (n-th) Command block (for delay), leading into the 2nd (n+1-th) Command block.

So, using n as the nujmber of repeats (depth of the lava), and X1, X2, Z1, Z2, Y as the lava fill square, you use theese Commands:

/fill X1 Yn Z1 X2 Yn Z2 minecraft:lava 0 replace minecraft:air

/fill X1 Yn+1 Z1 X2 Yn+1 Z2 minecraft:lava 0 replace minecraft:air

/fill X1 Yn+2 Z1 X2 Yn+2 Z2 minecraft:lava 0 replace minecraft:air
...
(until you reach the top)

To undo this, use:

/fill X1 Y Z1 X2 Ymax Z2 minecraft:air 0 replace minecraft:lava

Notes:

  • You use 1 Command block, 1 Comparator and as many Repeaters as youy want per lava fill step.

EDIT!:

use these command block system NEXT to the structure:

/fill ~X1 Y ~Zn ~X2 Ymax ~Z2 minecraft:air 0 replace minecraft:lava

next to it (to positive X) this:

/clone ~+1 ~ ~+3 ~+1 ~ ~+3 ~ ~+3 ~

towards positive Z place Repeaters facing towards the CMD blocks. Next to the System there should be a wall of RS blocks to power the repeaters when cloned!

3

Pros of this answer: Infinite height

  • Place Armorstand at same level at all blocks where the lava should be
  • Give yourself a cmd block

    /give @p minecraft:command_block
    
  • Tag the armorstand so we can select them later

    /scoreboard players tag @e[type=ArmorStand,r=10] add lavaMarker
    

r : Radius to the command_blocks so you only tag the nearby ones and not all you've ever made Note: You have to rerun this command when ever you playe new ArmorStand

  • Create a new scoreboard

    /scoreboard objectives add liveTime dummy
    
  • Create a repeating cmd block redstone needed

    /scoreboard players add @e[tag=lavaMarker] liveTime 1
    
  • Make your ArmorStands invisible and invincible

    /entitydata @e[tag=lavaMarker] {Invisible:1,Invulnerable:1}
    
  • Make them teleport up every x ticks with a chain command bloock after the repeating command block up there

    /execute @e[tag=lavaMarker,score_liveTime_min=40] ~ ~ ~ tp @e[tag=lavaMarker,c=1] ~ ~1 ~
    
    /scoreboard players reset @e[tag=LavaMarker,score_liveTime_min=40] liveTime
    
  • set lava at ArmorStands

    /execute @e[tag=lavaMarker] ~ ~ ~ detect ~ ~ ~ minecraft:air 0 setblock ~ ~ ~ minecraft:lava
    

To pause remove the redstone block.

To reset replace lava with air /fill and tp the armorstands down.

/execute @e[tag=lavaMarker] ~ ~ ~ tp @e[tag=lavaMarker,c=1] ~ ~-XXX ~

enter image description here

enter image description here

4
  • 1
    This is an awesome solution. But it"s really fast, get up every redstone tick. I wanted to slow it down with a 10 sec redstone delay but still very fast
    – Lich4r
    Commented May 20, 2016 at 8:38
  • If i change the first repeating to a redstone activated one tied up to a system that launch redstone signal every 10 sec it seems better
    – Lich4r
    Commented May 20, 2016 at 9:43
  • Shuld now work, change to 40 to whatever ticks you want Commented May 20, 2016 at 14:58
  • Yes indeed the reset was not working I changed it when I realized ;-) I know fully understand your trick ty :) (One ArmorStand can be enough though)
    – Lich4r
    Commented May 21, 2016 at 14:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .