Guidelines

This site is for tech Q&A. Please keep your posts focused on the subject at hand.

Ask one question at a time. Don't conflate multiple problems into a single question.

Make sure to include all relevant information in your posts. Try to avoid linking to external sites.

Links to documentation are fine, but in addition you should also quote the relevant parts in your posts.

0 votes
49 views
49 views

For a Minecraft world replica I'm working on I need to place tall grass on a sand block. However, Minecraft doesn't allow that even in creative mode, although it sometimes seems to generate naturally on sandy beaches.

Putting grass on a dirt block and then replacing the dirt block with sand destroys the grass on top of it, as you'd expect. Is there some other way to get (tall) grass on a sand block?

in Games
by (100)
1 13 28
edit history

Please log in or register to answer this question.

1 Answer

0 votes
 

The only way I'm aware of is the fill command (needs cheats enabled in singleplayer mode).

/fill X1 Y1 Z1 X2 Y2 Z2 NEW_BLOCK replace EXISTING_BLOCK

The command can fill a cuboid defined by the coordinates of two opposite corners with basically any type of block.

X1 Y1 Z1: the coordinates of the starting block.
X2 Y2 Z2: the coordinates of the end block (use same coordinates as starting block if you want just a single block replaced).
NEW_BLOCK: the type of block you want to be placed.
EXISTING_BLOCK. the type of the block currently existing at the given coordinates.

Example:

/fill 23 63 42 23 63 42 dirt replace sand

The above command would replace a sand block at the XYZ coordinates 23, 63, 42 with a dirt block.

Since tall grass spans two blocks, not just one, there is another thing to observe, though. You must place the upper and lower half from top to bottom, otherwise placing the upper half would destroy both halves. This works:

/fill 23 64 42 23 64 42 tall_grass[half=upper] replace air
/fill 23 63 42 23 63 42 tall_grass[half=lower] replace air

This will destroy the tall grass when replacing the second block:

/fill 23 63 42 23 63 42 tall_grass[half=lower] replace air
/fill 23 64 42 23 64 42 tall_grass[half=upper] replace air
by (100)
1 13 28
edit history
...