OpenBlocks

OpenBlocks

56M Downloads

[Suggestion] EnderIO Conduit Facades and Industrial Craft Construction Foam (CF) blocks should be paintable

r4j4h opened this issue ยท 6 comments

commented

These blocks, once hardened with sand or self-dried, would be nice to be able to be painted for aesthetic purposes.

commented

cheers ๐Ÿ‘ ๐ŸŽจ

commented

References to related files BlockCanvas SyncableBlock TileEntityCanvas

commented

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.

commented

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.

commented

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.

  1. Instead of having the applyPaint method be a function on TileEntityCanvas itself, have an interface in OpenModsLib with an applyPaint function, and in onItemUse for ItemPaintBrush check for that interface instead of the class.
  2. 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.
commented

Thank you both for your thoughts! Coordination of mods will definitely be required, and I think that Greg has laid out a nice starting point for such a thing.