Closed sylv256 closed 1 year ago
Using NBT explained here: wiki, any item can be a valid fabric square with any texture from the blocks/items atlas.
Fabric-api has a client event to allow you to stitch arbitrary images into the texture atlas.
Scarves has an entrypoint, called "scarves", which you can receive with a class which implements ScarvesIntegration. Inside its integrateWithScarves
method, you can safely call FabricSquareRegistry.register(block, identifier)
where identifier is the same id as the texture in the block's model. Or do anything else that's only safe to classload if Scarves is present.
If there's something specific that you need that's not part of the above, let's talk about adding it.
I'm referring to survival mode.
Are you asking for a designer for individual squares, or for the scarf as a whole?
For the scarf as a whole, you start with an empty Scarf, and the Scarf Stapler block. It will staple blocks or items to the end of the left or right tail (including any color wool), and build up a completely custom scarf in survival that way.
For additional colors, after the con I'll finish the serger. That will give you control over the arbitrary RGB tints, so you could take a bunch of white wool and make color patterns not present in wool. I'd also like to see if there are any fabric mods with RGB dye I could integrate with.
For individual square patterns, that's much trickier. For technical reasons it needs to be an existing texture in the blocks/items atlas, and only an 8x8 section of that. Those kind of flexibilities and constraints are easy to expose to modders and hard to expose to players.
It looks like the planned Scarf Serger will dovetail with end-to-end stapling very nicely and give you almost exactly the pattern editing you're looking for, so I'm going to close this out for now and keep my eyes open for more ways to enable customization for survival players.
See Also
3