[Suggestion] EnderIO Conduit Facades and Industrial Craft Construction Foam (CF) blocks should be paintable
r4j4h opened this issue ยท 6 comments
These blocks, once hardened with sand or self-dried, would be nice to be able to be painted for aesthetic purposes.
References to related files BlockCanvas SyncableBlock TileEntityCanvas
Conduit Facades would be as handy if not moreso. They are more interesting as a technical problem because they already support a form of appearance through the enderio painting machine.
From the files in the conduit/facade folder
Block facadeID = PainterUtil.getSourceBlock(itemStack);
int facadeMeta = PainterUtil.getSourceBlockMetadata(itemStack);
seems pretty similar to how OpenBlocks is storing things with Canvas.
The key difference that I am noticed at first glance is that Canvas blocks assimilate the metadata into themselves, while enderIO's stores it in a separate variable. I could be wrong.
I am seeing the usefulness for a middle proxy-block API that all of these mods could be utilizing. It would need to support nesting, so that we could chisel a painted enderio-painted conduit facade, but if done properly that should work just fine. Combining colors/textures from the variety of painting/texture mods would be awesome.
Currently canvases cannot paint TileEntities (As a canvas is it's own TE), which these blocks are. Meaning they cannot be a machine/functional block of any sort, only cosmetic.
As for the facade code you referenced, it takes an item and renders the texture of that item, there is no means of implementing a hook here to render our own logic over top (Paint colours, stencils etc).
This suggestion would require the coordination of both mods to work, EnderIO would need to provide an API that would allow us to recolour the blocks.
A rendering API that mods could utilize to share custom render functionality is a lovely idea but I don't foresee one any time soon. I'm going to leave this suggestion open for any other developers to drop their opinion on.
GregTech recently added support for being able to paint all its machines in the full 24-bit color range. Greg has the following suggestions so that he'd be able to have the OpenBlocks paint brush paint his machines.
- Instead of having the
applyPaint
method be a function onTileEntityCanvas
itself, have an interface inOpenModsLib
with anapplyPaint
function, and inonItemUse
forItemPaintBrush
check for that interface instead of the class. - Have
applyPaint
return a boolean to indicate whether painting was successful so that blocks that implement the interface can still opt out of being paintable.