Create

Create

86M Downloads

Add block tag to make blocks unbreakable by Create Machinery (drills, etc.)

Lightman314 opened this issue ยท 2 comments

commented

Describe the Suggestion

I make a currency/trading mod that adds owner-protected trading machines, such that only the trading machines owner is capable of breaking them, however your drills are able to bypass this protection. I've looked through your code, but aside from making the block unbreakable by any means (set hardness to -1), there doesn't appear to be any method of flagging a block as unbreakable by the drills.
All I really ask for is for the addition of a block tag ("create:unbreakable", "create:non_breakable", or something else along those lines) and have that be checked in the various isBreakable functions before breaking the blocks, etc.

Screenshots and Videos

No response

Additional Context

No response

commented

It would also be nice if a maximum harvest level could be set. Right now, a player can mine every block that isn't hardness = -1 as soon as they get a Mechanical Bearing. A pack developer would have to change the recipes of bearings and drills to require whatever pickaxe has the highest harvest level in the pack, or simply not use harvest levels as a gating mechanic at all.

The maximum harvest level config could be combined with additional drills that are identical to the default but mine blocks faster and have (by default) higher harvest levels. For example, Iron Mechanical Drill, Diamond Mechanical Drill, Netherite Mechanical Drill, etc. These could be more Create-themed by being based on the casing -- Brass Mechanical Drill, Sturdy Mechanical Drill, etc.

commented

Minor note that this tag should apply to all mechanical block breakers (drills, saw, ploughs, harvesters) and entities that are made of blocks when they become blocks again (minecart contraptions, windmills, gantries, pistons, bearings).

It could also be useful to separate this into two tags, one that causes block breakers to stop when the block is encountered (create:unbreakable), and one that they pass through without mining (create:mechanical_breaker_ignored, or something). This distinction would only apply to block breakers, entities become blocks would respect both lists (breaking the blocks that were part of the entity instead).