Forgery

Forgery

823k Downloads

Replace gold_tools_useful_in_nether with more generic dimensional_tools system

saltyseadoggo opened this issue ยท 8 comments

commented

Similar to my previous suggestion in #39, I would like to see a tweak to enable tools that are a part of nether_tools or, if #39 is accepted, end_tools not tagged with a new fabrication:overworld_tools tag to suffer 50x durability damage when mining blocks native to the Overworld- that is, blocks added to new fabrication:overworld_blocks or fabrication:overworld_blocks_only_in_overworld blocks tags, just as how the gold_tools_useful_in_nether tweak penalizes using non-Nether tools on Nether blocks. This would be a niche option for modpack creators, or just anyone looking for specialization-based tool mechanics.~

Edit: Edited proposed solution to use a new fabrication:overworld_tools tag to make tools exempt from the durability penalty instead of applying the penalty to anything in fabrication:nether_tools or, if #39 is accepted, fabrication:end_tools. This way, a tool can be considered as being appropriate for both the Overworld and one or both other dimensions by adding it to multiple tags. In the previous proposed solution, that would not be possible.

commented

It'd probably make the most sense to replace gold_tools_useful_in_nether with a new dimensional_tools system, configured with an INI.

commented

That sounds groovy.~

commented

Folding #39 and #40 into here for less things to juggle for me.

(If I'm going to rewrite this entire system it doesn't make sense to do #40 before that.)

commented

Sounds good.~

commented

The overengineering has begun.

; NOTICE: This file does nothing if mechanics.dimensional_tools is disabled.

; Block-to-dimension associations. Blocks that are associated with a dimension
; deal extra damage to incompatible tools. Normally, these associations only 
; apply if the block is *in* the dimension it's associated with, but if you
; suffix the dimension with a ! then the block will always apply dimensional
; effects. You can use tags by prefixing with a #; Fabrication's INI loader
; only recognizes semicolon as a comment.
[blocks.minecraft:]
gravel=the_nether
nether_bricks=the_nether
nether_brick_fence=the_nether
nether_brick_slab=the_nether
nether_brick_stairs=the_nether
nether_brick_wall=the_nether
nether_wart_block=the_nether
warped_wart_block=the_nether
#base_stone_nether=the_nether!
#nylium=the_nether!
#crimson_stems=the_nether!
#warped_stems=the_nether!
soul_sand=the_nether!
soul_soil=the_nether!
glowstone=the_nether!
shroomlight=the_nether!
nether_gold_ore=the_nether!
nether_quartz_ore=the_nether!
magma_block=the_nether!
ancient_debris=the_nether!
; Legacy tags
#fabrication:nether_blocks_only_in_nether=the_nether
#fabrication:nether_blocks=the_nether!

; Associated tools don't consider damage factors when breaking blocks that are
; associated with the same dimension. Suffixing a dimension with a ! here
; "hard-associates" the tool and makes damage factors work in reverse.
[tools.minecraft:]
golden_sword=the_nether!
golden_pickaxe=the_nether!
golden_hoe=the_nether!
golden_shovel=the_nether!
golden_axe=the_nether!
netherite_sword=the_nether
netherite_pickaxe=the_nether
netherite_hoe=the_nether
netherite_shovel=the_nether
netherite_axe=the_nether
; Legacy tags
#fabrication:gold_tools=the_nether!
#fabrication:nether_tools=the_nether

; Tools crafted with only associated items will be associated with the given
; dimension. A value of * makes the material dimension-agnostic and ignored for
; the purposes of dimensional association.
[materials.minecraft:]
stick=*
crimson_planks=the_nether
warped_planks=the_nether
blackstone=the_nether

; Only items in this list will be affected by dimensional materials crafting.
[substitutable.minecraft:]
wooden_sword=true
wooden_pickaxe=true
wooden_hoe=true
wooden_shovel=true
wooden_axe=true
stone_sword=true
stone_pickaxe=true
stone_hoe=true
stone_shovel=true
stone_axe=true

; Find-and-replace will be performed on item names for things crafted that are
; affected by the above materials section. Key is a dimension ID, followed by a
; slash, then the thing to find, then what to replace it with.
[name_substitutions.minecraft:]
the_nether/Wooden=Fungal
the_nether/Stone=Blackstone

; Assign damage factors when using tools associated with a given dimension
; on blocks associated with another. Syntax is tool dimension, then a greater
; than sign (>), then the block dimension. Either dimension, but not both, can
; be *, in which case it matches all dimensions except the one on the other
; side of the >. For example, *>the_nether matches all non-Nether tools that
; are being used on Nether blocks. overworld>* matches all Overworld tools that
; are being used on non-Overworld blocks.
[damage_factors.minecraft:]
; Using any non-Nether tools on Nether-associated blocks deals 50x damage, and
; any hard-associated tools take 1/50th damage.
*>the_nether=50
commented

Looking lovely. Can it handle modded blocks and tools?

commented

Yes, the "minecraft:" in all the sections sets the default identifier namespace. You can still specify the full identifier (like with the fabrication: tags in the sample) and it will access something from another namespace.

commented

The theory on this new impl is sound, but it's possible it has bugs I didn't find. I did a very cursory test with the gold_tools_useful_in_nether reimplementation.

Feedback on it will be much appreciated once you start getting it to do things I didn't.