
Tools can be made with negative Modifier Slots if a Trait is present that adds a negative amount of Modifier Slots
SilverMedal02 opened this issue ยท 4 comments
Minecraft Version
1.20.1
Modloader
Forge
Modloader Version
47.4.0
Mantle Version
1.20.1-1.11.79
Tinkers' Construct Version
1.20.1-3.10.2.92
Describe your issue
Creating a Tinkers' Construct Tool that contains a Trait that will reduce a Modifier Slot has the possibility of creating a Tool that has a negative amount of Modifier Slots. Any other operation would call you out on doing something illegal, but not this one, which I found odd. Tools with negative Modifier Slots cannot be modified or repaired, though. You can't really do much with them other than use them until they break.
Steps to reproduce
-
Create a Modifier that reduces a Modifier Slot.
tinkers-bloat-0.1.0.zip
The provided .zip file is a datapack and resource pack (can be ran as a JSON Things Thingpack) that includes a Material named Netherite. The secondary Trait is Hellforged, which takes 1 Ability Slot. -
Build a Tool in the Tinker's Station/Anvil that would create a Tool with an illegal amount of Modifier Slots.
In the provided pack, you can build a Pickaxe that's all Netherite, or Plate Armor with one Netherite Part. -
Notice the illegal amount of Modifier Slots
Crash Report
No response
Can you reproduce with just Tinkers?
I have not tried
Performance Enchancers
Rubidium/Embeddium
Other mods
No response
Searched for known issues?
I did not search
That's why traits shouldn't be messing with slots. It causes a lot of similar issues.
I pushed a commit that fixes this for the tinker station.
It does not however fix it for tool casting, which would be a lot more complicated as I have to validate before liquid is put in the table which is more expensive than I'd like. I'll have to consider whether I want to do that.
It also does not fix it for tools found in loot. Overall, I would really, really discourage granting negative modifier slots from tool materials; a tool made from only your material should be valid with default slots.
Would it be fine if it was done in such a way where it could never normally create an illegal build, i.e. having the Material only work on a Handle or Binding?
Upgrade slots are meant for the player to modify their tools beyond the materials. The materials shouldn't be choosing what you do with your upgrade slots. So design wise, I'd argue there is no way that makes materials remove upgrade slots that is a good design.
If you want to pursue that despite me saying its not a good design, the minimum is ensuring you can't craft an illegal tool as that is just a bad gameplay experience. But I still think its a bad experience when the player loses an upgrade slot for their material choices; find other ways to penalize your OP materials, or just don't do OP materials.