Ruined Equipment

Ruined Equipment

273k Downloads

Support for modded tools

SylisMC opened this issue ยท 3 comments

commented

Support for some modded tools would be a really nice addition! here is a list of some popular mods you may be interested in supporting also, some placeholders would allow users to make their own using datapacks and resource packs!

commented

I believe support for this could be done fairly easily using https://github.com/Devan-Kerman/ARRP . I'm not super versed in Java, but I can take a shot at it.

If adding a dependency is too much, Fabric also has its data generation API which should be usable.

commented

Yeah, I need to investigate whether registration code is versatile enough to straight up dynamically declare items based on data & resource pack combinations. If not, I'll either have to explicitly support certain mods (less fun) or go the dummy placeholder route, which is less elegant. Thanks for the request!

commented

Not sure if this is feasible, but couldn't this be sort of done dynamically to avoid the issue of resource packs or manual compatability?

Basically detecting if an item normally breaks at 0 durability (to avoid auto-generating ruined versions of tools that use durability as "energy" or the like) then if it does, replacing the item with a copy when it breaks that has no left or right click functionality, which can then be returned to functioning with the item's designated repair material used in the anvil (and if no such material exists, the item just breaks normally instead)

If the item uses the "generated" type of model, where it's actually based on a 2d image, like most Vanilla items, it should, to my (admittedly limited) knowledge, be possible to auto-generate broken versions... Not as pleasant as your handmade sprites, but enough to work, anyway, with some manipulation of the 2d source images. Examples being you could just make a noise-map and every pixel that's a certain value is removed from the sprite, or just have the bottom-right half of the sprite not show, etc. Admittedly I don't know how you would go about this at all, but I'm sure I've seen mods dynamically mess with their item sprites before... Might be worth looking into?

Heck, if that turns out to be too much work, you don't even necessarily need the item sprites. In vanilla, while its item sprite does show as broken, the Elytra's model doesn't actually show as broken when equipped (last I checked, anyway), so it wouldn't be all that odd to have a tool that looks fine but doesn't function. This could also be the fallback for any modded tools that use an actual model such as the Trident, since those would be significantly harder (if even possible) to manipulate at runtime.