apace100 / origins-fabric

MIT License
175 stars 167 forks source link

Config to disable water protection spawning #661

Closed sisby-folk closed 3 months ago

sisby-folk commented 1 year ago

This is just a simple addition of a configuration option that, when disabled, prevents water protection books from being added to loot tables, prevents water protection from being rolled at an enchanting table, and prevents water protection from being rolled on enchanted treasure gear.

It doesn't actually de-register the enchantment, just prevents it from appearing in the game naturally.

Credit - the mixin is based on Yttr

The reasoning behind this addition is that it's very easy to create a datapack or modpack that doesn't include hydrophobic damage whatsoever - but before this point it's not so easy to remove the (in that case useless) enchantment from table chances and random loot.

If for whatever reason you'd prefer water protection to be a pure book-treasure enchantment regardless of the config option, I'm happy to remove the config guard in the mixin!

Infinidoge commented 1 year ago

It would be a good idea to try and undo the whitespace changes. The changes in whitespace makes the diff much larger than it needs to be. (100 added lines and 71 removed lines vs 29 added lines.)

sisby-folk commented 1 year ago

ugh, intellij, why, yeah I'll get it one sec

Infinidoge commented 1 year ago

Well, actually, the 29 isn't accurate. That 29 would ignore indenting the if block, so that large diff is unavoidable. However the mixins.json would only need to be a 1 line addition.

sisby-folk commented 1 year ago

Intellij refused to not change indentation like five times but I got it, don't worry!

sisby-folk commented 1 year ago

And hilariously our force push broke the diff again. Just.. just squash this one.