8

Up until Minecraft 1.7.10 I enjoyed playing in adventure mode, which restricts one to use the right tools to destroy or harvest blocks (to have a more realistic experience).

In this version (and before that), it was still possible to place blocks without much restrictions. But now in 1.8, sadly, I discovered that this behaviour was changed, and my favourite gamemode was "gone": I'm unable to place any blocks and cannot break any blocks even when using the proper tool (axe for trees etc.).

How can I emulate 1.7.10's adventure mode while playing the new version (1.8)? Can I define rules for every tool with the command block somehow?

(PS: i would prefer a solution without modding the game, staying with pure vanilla MC if possible)

  • 1
    Currently you have to list all the blocks that the item you are holding are allowed to break or placed on with CanPlaceOn and CanDestroy NBT and it would be very tedious to do that. Also I'm not sure if the give command will exceed the length limit. – QbsidianH20 Dec 2 '14 at 21:46
  • @QbsidianH20 You should add instructions on how to, the author may not know how. – user92092 Dec 3 '14 at 10:05
  • CanDestroy youtube.com/watch?v=_pT46pW3uL4 CanPlaceOn youtube.com/watch?v=OgbAwnCWyDw – QbsidianH20 Dec 3 '14 at 10:48
  • Sorry, currently, there isn really a way to do this. But is might be worth a feature request to include wildcards into these CanPlaceOn, CanDestroy selectors. For example CanBreak["minecraft:*"] would enable the player to place the current block on any other block. – Mystery Oct 28 '15 at 12:13
  • So it sounds like what you want is either survival mode or creative mode. – ydobonebi Oct 28 '15 at 13:29
1

Create an entitydata command that will edit your inventory. The only thing it will change is add this tag to all items in the inventory: CanPlaceOn:["minecraft:stone","minecraft:grass_block","minecraft:dirt"... putting all block IDs on. Then create an array of command blocks facing upwards. The bottom layer will be repeating command blocks with: clear @p TOOLNAME 0 1 The top layer will be chain conditional command blocks with command: give @p TOOLNAME 1 1 {CanDestroy:[in this box you put all blocks you want the tool to break]}

This will take a while. But once you are done upload map to the internet and enjoy adventure-loving people wanting to play on it!

0

Add the CanBreak or CanPlaceOn tag to items.

Example:

/give @p minecraft:stone 1 0 {CanPlaceOn:["minecraft:dirt"]} This would give the closest player a stone block that you can place on dirt.

/give @p minecraft:stone_sword 1 0 {CanDestroy:["minecraft:web"]} And this would give a stone sword that can destroy webs.

0

You could solve half the problem by switching between survival and adventure mode based on the item you are holding. However, you would still need CanBreak tags on all your tools. (Also you could break blocks when holding another block or nothing)

This is only a partwise solution, as this allows you to place blocks only when you are not holding a tool.

  • Interesting Idea, but it doesn't actually work. If you are in survival while holding a block (so you can place it), you can punch a tree with it. – MrLemon Oct 28 '15 at 16:29
  • 1
    @MrLemon I already said that in my answer in the brackets. – Mystery Oct 28 '15 at 17:48
  • 3
    So you do. That's what I get for reading your answer, moving on and only then thinking about it properly, then point out a problem I found without checking if you mentioned it. Now I feel dumb. – MrLemon Oct 28 '15 at 17:52
0

There are 2 ways to do this, both take HOURS of prep time.

1) go on survival mode, not adventure do a command block on a clock saying

/effect @p minecraft:mining_fatigue 10 100 true

place a string of command blocks with this command:

/clear @p wooden_axeBLOCKID0 with a comparator, immediately followed by a repeater

for every tool and BLOCK ID (damage) for tool.

then make it so that if ANY of the repeaters are on do /effect @a clear

2) You could create a scoreboard objective for crafting every tool, eg:

/scoreboard objectives craftWoodenAxe stat.craftItem.minecraft.stone_axe

create a redstone-block-clock facing +X, and with command blocks from lowest to highest X value do this:

/clear @a[score_craftWoodenAxe_min=1] wooden_axe 0

/give @a [score_craftWoodenAxe_min=1] wooden_axe 1 {CanBreak:["PUT A BLOCK","PUT A BLOCK","etc"]}

/scoreboard players remove @p[score_craftWoodenAxe_min=1] craftWoodenAxe 1

for every tool...

You would probaly be better off waiting to see if mojang adds this later.

  • Most unlikely, as there's already a mod that makes it so that "punching trees for wood" isn't how you start off. – aytimothy Feb 5 '15 at 8:04
  • 2
    Your answer is very hard to read, please put all the command stuff in preformat boxes. Also, there is a mistake: You can't edit commandblocks is survival mode. – Mystery Oct 28 '15 at 12:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.