When a grass block is turned into a grass path block with a shovel, does it continue to propagate grass to adjacent dirt blocks, or is the grass then "dead"?
Minecraft – Does a grass path block spread grass to adjacent dirt blocks
minecraft-java-edition
Related Solutions
After a bit of testing, I think I have determined the cause of this bug. It actually has nothing to do with how far away you are from the block. In fact, it seems to have something to do with a bug in Minecraft which has been fixed known as "click mining".
When you mine a row of blocks the "normal" way, standing directly in front of them and holding forward, the system works properly. Say you're mining a row of dirt blocks with a diamond shovel. There is a small amount of delay between each block's destruction and the next block destruction's beginning. If this is hard to understand, basically the arm has to swing back up before the next block can get hit, so there's a small amount of delay.
Someone discovered this and introduced "click mining" to the scene. All you did was release/repress the mouse button after each block was destroyed. This instantly returned the arm to the "unswung" position, eliminating the delay between each block's destruction. Notch figured this out and introduced a small delay after you press the mouse button down, so it negated the time advantage of click mining.
However, when doing the method you described, the block is broken before you're in range of the next block. So really, there's a small period between each dirt block where no block is in range. This instantly returns the shovel to the unswung postion, so there's no delay between blocks. The click mining fix only adds a delay after mouse presses, and this is not a mouse press, you're just holding it down, so there's no delay. Essentially, you've found a way around the click mining fix.
As for tall grass, it still works with grass on top of it. However, you must be aiming for the bottom of the block, because if the tall grass gets in range, the swing delay is reintroduced, leaving you with the delay again.
Long story short, yes, it's a bug. Still, it's sorta useful in select situations, but those situations are rare, so it's not a really big problem.
This if fairly easy to do, but the command required is very long.
The way you should do this, as other answers have already pointed out, is by putting CanPlaceOn
tags onto the item. There's no easy way to do this once the items are already in the player's inventory, so instead you should do it for the dropped item entities with /data
.
CanPlaceOn
is also fairly annoying in that you need to name every single block you want to be able to place the block onto. I used the block name table from the Minecraft wiki, and wrote a script to convert the names into the right format.
Overall, the command you need to run on a fast clock is:
/data merge @e[type=Item] {Item:{tag:{CanPlaceOn:["minecraft:air","minecraft:stone","minecraft:grass","minecraft:dirt","minecraft:cobblestone","minecraft:planks","minecraft:sapling","minecraft:bedrock","minecraft:flowing_water","minecraft:water","minecraft:flowing_lava","minecraft:lava","minecraft:sand","minecraft:gravel","minecraft:gold_ore","minecraft:iron_ore","minecraft:coal_ore","minecraft:log","minecraft:leaves","minecraft:sponge","minecraft:glass","minecraft:lapis_ore","minecraft:lapis_block","minecraft:dispenser","minecraft:sandstone","minecraft:noteblock","minecraft:golden_rail","minecraft:detector_rail","minecraft:sticky_piston","minecraft:web","minecraft:tallgrass","minecraft:deadbush","minecraft:piston","minecraft:piston_head","minecraft:wool","minecraft:piston_extension","minecraft:yellow_flower","minecraft:red_flower","minecraft:brown_mushroom","minecraft:red_mushroom","minecraft:gold_block","minecraft:iron_block","minecraft:double_stone_slab","minecraft:stone_slab","minecraft:brick_block","minecraft:tnt","minecraft:bookshelf","minecraft:mossy_cobblestone","minecraft:obsidian","minecraft:torch","minecraft:fire","minecraft:mob_spawner","minecraft:oak_stairs","minecraft:chest","minecraft:redstone_wire","minecraft:diamond_ore","minecraft:diamond_block","minecraft:crafting_table","minecraft:farmland","minecraft:furnace","minecraft:lit_furnace","minecraft:standing_sign","minecraft:ladder","minecraft:rail","minecraft:stone_stairs","minecraft:wall_sign","minecraft:lever","minecraft:stone_pressure_plate","minecraft:wooden_pressure_plate","minecraft:redstone_ore","minecraft:lit_redstone_ore","minecraft:unlit_redstone_torch","minecraft:redstone_torch","minecraft:stone_button","minecraft:snow_layer","minecraft:ice","minecraft:snow","minecraft:cactus","minecraft:clay","minecraft:jukebox","minecraft:fence","minecraft:pumpkin","minecraft:netherrack","minecraft:soul_sand","minecraft:glowstone","minecraft:portal","minecraft:lit_pumpkin","minecraft:unpowered_repeater","minecraft:powered_repeater","minecraft:stained_glass","minecraft:trapdoor","minecraft:monster_egg","minecraft:stonebrick","minecraft:brown_mushroom_block","minecraft:red_mushroom_block","minecraft:iron_bars","minecraft:glass_pane","minecraft:melon_block","minecraft:pumpkin_stem","minecraft:melon_stem","minecraft:vine","minecraft:fence_gate","minecraft:brick_stairs","minecraft:stone_brick_stairs","minecraft:mycelium","minecraft:waterlily","minecraft:nether_brick","minecraft:nether_brick_fence","minecraft:nether_brick_stairs","minecraft:enchanting_table","minecraft:end_portal","minecraft:end_portal_frame","minecraft:end_stone","minecraft:dragon_egg","minecraft:redstone_lamp","minecraft:lit_redstone_lamp","minecraft:double_wooden_slab","minecraft:wooden_slab","minecraft:cocoa","minecraft:sandstone_stairs","minecraft:emerald_ore","minecraft:ender_chest","minecraft:tripwire_hook","minecraft:tripwire","minecraft:emerald_block","minecraft:spruce_stairs","minecraft:birch_stairs","minecraft:jungle_stairs","minecraft:command_block","minecraft:beacon","minecraft:cobblestone_wall","minecraft:wooden_button","minecraft:anvil","minecraft:trapped_chest","minecraft:light_weighted_pressure_plate","minecraft:heavy_weighted_pressure_plate","minecraft:unpowered_comparator","minecraft:powered_comparator","minecraft:daylight_detector","minecraft:redstone_block","minecraft:quartz_ore","minecraft:hopper","minecraft:quartz_block","minecraft:quartz_stairs","minecraft:activator_rail","minecraft:dropper","minecraft:stained_hardened_clay","minecraft:stained_glass_pane","minecraft:log2","minecraft:log2","minecraft:acacia_stairs","minecraft:dark_oak_stairs","minecraft:slime","minecraft:barrier","minecraft:iron_trapdoor","minecraft:prismarine","minecraft:sea_lantern","minecraft:hay_block","minecraft:carpet","minecraft:hardened_clay","minecraft:coal_block","minecraft:packed_ice","minecraft:double_plant","minecraft:prismarine","minecraft:barrier","minecraft:red_sandstone","minecraft:sea_lantern","minecraft:iron_trapdoor"],HideFlags:16}}}
Related Topic
- Minecraft – replace Grass blocks in super flat to red sand
- Minecraft – vanilla block like Air that wont be affected by “copy Air” being turned off in MC Edit
- Minecraft – Can minecraft endermen spawn with dirt or grass
- Minecraft – Is possible to revert a Grass Path to a Grass Block without removing it
- Minecraft – Change Block State using Command Blocks and Carrot on Stick
- Minecraft – How to use CanPlaceOn or other tags to make a block placeable only on 1 block type
Best Answer
I have run an experiment and grass path does not spread grass to dirt.
Setting the random tick speed to 1,000 meant that things like wheat growing or grass spreading in this case are a lot faster with the default being 3. I suspect this is because the two blocks are stored differently. Grass is minecraft:grass whereas path is minecraft:grass_path.