1

Make stuff light up behind the player?

Denisowator's Avatar Denisowator5/14/16 6:32 am
1 emeralds 301 1
5/14/2016 7:45 am
Pepijn's Avatar Pepijn
I'm making a thing where there's no light source, so it's very hard for the player to avoid the falls and holes in the floor. So to make it easier, I want to make it so that every block within where the playing is standing, lights up.

Here's an example, since I explained that horribly.
There's a tunnel, that is 50 blocks long, and 10x10 blocks. When a player steps on any block, all the blocks in that 10x10x1 (WidthxHeightxLength) area light up, so the player can see where stuff is if they fail, so they won't die a million times.

So basically you step on a block, and all the blocks on a 1 block thick 10x10 area light up.

I would love for it to just spawn an invisible light source on every air block in that area, but I don't think you can do anything with light sources other than placing items and blocks that emit light. There's an empty 10x5 area all the way through the tunnel, so there might be a glowstone block spawned in the middle of that area.

I just don't know how to do it. I know it would be something with testfor, and setblock. But I'm not sure exactly how it would be done.
Posted by Denisowator's Avatar
Denisowator
Level 20 : Expert Warrior
12

Create an account or sign in to comment.

1

1
05/14/2016 7:45 am
Level 57 : Grandmaster Cyborg
Pepijn
Pepijn's Avatar
https://i.gyazo.com/9d5347ff50f20879b68 ... 3070b2.mp4

What I did was:

- retexture black wool to completely black
- retexture glowstone to completely white
- make a tunnel of black wool with the length in the z-direction (important!)
- Setup commands

The commands:
[Repeat mode] execute @a ~ ~ ~ /fill ~-10 ~-4 ~ ~10 ~10 ~ minecraft:glowstone 0 replace minecraft:wool 15
[Chain mode] execute @a ~ ~ ~ /fill ~-10 ~-4 ~1 ~10 ~10 ~1 minecraft:wool 15 replace minecraft:glowstone
[Chain mode] execute @a ~ ~ ~ /fill ~-10 ~-4 ~-1 ~10 ~10 ~-1 minecraft:wool 15 replace minecraft:glowstone

Make sure the commandblocks are in the right mode and that they're facing into eachother (arrow on the block shows its direction).

If you meant that the blocks should stay lit up even when the player isn't standing on that section anymore, just get rid of the 2nd and 3rd command.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome