An item to break only SPECIFIED blocks?

An item to break only SPECIFIED blocks?

An merchandise to interrupt solely SPECIFIED blocks?

This isn’t what the unique asker meant, however since a bounty asks this, I’ll reply it anyway: How to do that for Survival mode?

The brief reply: This function doesn’t exist. And normally it’s additionally not helpful, as a result of the participant might merely change to a different instrument to have the ability to mine once more. You must take into account placing the participant into Journey mode as an alternative, possibly the Survival options you need are simpler and extra reliably reproducible with instructions. Or possibly change between Survival and Journey relying on the held instrument. The lengthy reply: Virtually something is feasible in Minecraft, so you may pretend it (with some points), if you wish to do this anyway:

Study: Easy methods to make a pickaxe that may solely break sure blocks

Firstly, you may’t use attributes (archive), as a result of they’re at all times lively when the merchandise is held, irrespective of which block the participant is making an attempt to mine. ggstore.netpeed may also not be accessible to item-caused or command-caused attribute adjustments, as a result of it’s not accessible in /attribute.

Studying: 5 Tricks to Get a Taurus Man to Chase You Endlessly

So it’s worthwhile to detect when the participant holds that merchandise with instructions. That is completed with the participant’s SelectedItem NBT tag. What precisely you wish to match is unfair, let’s say it’s a golden hoe named “Horst” that has the customized tag foo:1b (which is meaningless outdoors of this command system). Then you may choose each participant holding such an merchandise of their primary hand (offhand doesn’t matter for mining) like this:

@a[nbt={SelectedItem:{id:”minecraft:golden_hoe”,tag:{display:{Name:”{“text”:”Horst”}”},foo:1b}}}]

As common in NBT matching, the whole lot must be matched precisely, for instance minecraft: within the merchandise ID, the brackets within the title’s JSON and the byte kind of the customized subject.

Subsequent, detecting which block the participant is . This requires “raytracing”, which I’ve a solution for right here. Briefly, you should use both a dummy entity, should you use command blocks, or simply the execution place in a operate and transfer that forwards within the view route little by little till you hit a block that isn’t air or water or lava. This isn’t excellent, as a result of the participant might for instance look both at an indication or sideways previous it, however doing it completely would require doing particular calculations for a variable step measurement and to place each block hitbox into the datapack/command block system. I’ve heard that somebody may need completed that previously, however I can’t discover such a datapack on-line. Additionally observe that entities may be in the best way, which adjustments the meant consequence once more, however raytracing normally ignores these as effectively.

Studying: Query: Q: find out how to create a playlist on iPod nano gen6?

Lastly, making it unimaginable to mine: You may’t fairly stop mining fully with the Mining fatigue impact, however you may at the least gradual it down by an element of 1234.5 with an impact stage of 4 or extra (supply, archive). If you wish to stop actually devoted gamers from e.g. breaking a single carpet in over 3 minutes, you may shortly use /clone … change transfer to maneuver it someplace else after which transfer it again one tick later. Changing it with one other block doesn’t assist, as a result of the mining progress will get saved even when the block adjustments.

One downside that continues to be are instant-mineable blocks: most crops, each torches, Finish rods, fireplace, flower pots, honey, comparators, repeaters, redstone, scaffolding, slime, construction void (for some purpose), TNT, tripwire and hooks. These may be damaged immediately underneath all circumstances (besides Journey and Spectator mode), which implies that this technique doesn’t stop breaking them both repeatedly or within the brief part when the focused block is moved as written above, if the instant-mineable block is behind it. The one approach to “repair” that is by inserting it once more after the participant breaks it. The raytracing half already figures out which block it’s, so this can be utilized to position it once more as effectively. However it will probably trigger glitchy motion if it’s the block the participant is standing on and it’s even attainable to show in direction of a block client-side within the 0.05s between server ticks and break it earlier than the following tick occurs, by which case the damaged block shouldn’t be the one which the server thinks the participant focused. (That’s additionally how ggstore.internet/browse/MC-12363 occurs.) Not like placed_block, there may be additionally no development criterium for breaking an arbitrary block, so you may’t be sure to match the suitable one which manner both. That is simply a difficulty that continues to be on this system, I don’t assume it’s fixeable.

So, briefly: Detect holding the merchandise with SelectedItem in an NBT selector, then use raytracing to seek out (hopefully) the focused block, give Mining fatigue to decelerate mining quite a bit and possibly additionally transfer the block away and again each 3 minutes towards actually affected person miners. This isn’t excellent, but it surely works alright more often than not.

Extra: How To Wash Fake Fur

Leave a Reply

Your email address will not be published. Required fields are marked *