Suggestion: Support connected textures.
beringtom opened this issue ยท 19 comments
Chisel adds a lot of new and very nice blocks, some of them utilize connected textures, would it be possible to support connected textures on CB aswell? :)
I think you could look up something about Submap Managers, @Mineshopper :)
So I dug a little deeper into this today, and really found nothing that will accomplish what you guys are looking for.
Connected texture mods such as those in Optifine and MCPatcher don't provide APIs that would enable a mod like this one to return the true block type. Rather, they simply check if two adjacent blocks are equal in type and metadata. That will never work with this mod. If a method were given that enables me to return the cover's properties instead, in all likelihood it would work as expected.
EDIT: As always I gave this a little more thought. It may be possible if I can replicate some of the code in my render class. The difficulty is making the code use existing CTM resources.
Not sure why it took me so long to check your earlier posts, but I just added the IFacade API and that seems to work. Now what do you think is the best way to render CTM textures using my custom renderer? This seems like the complicated part.
Chise's Facade API is side-sensitive, so it would be possible to support CTM on full faces (like the back of slopes and stairs).
Ah, yes. You'll probably want to look into CTMLib, working with that you can probably call side-specific renders. I'm not sure exactly how, I'm on vacation for the weekend. I can be more helpful once I get home :)
I've no idea how to write mods for MC but here we go...
Assuming each carpenter's block stores the block it is mimicking in whatever block data it has...
you could create a script which detects what sides have similar carpenters' blocks on them and then set the texture the carpenter block's to the corresponding connected texture. Again, I don't actually know how you would code this, this just an explanation of a way you could do it.
Id love for connected textures to be supported, even after 4 years. I think it would add so much to many builds
I don't know how to implement them. If you can find good documentation on it, then maybe.
I found ExD source for Chisel - https://github.com/EoD/Chisel
I'm not pretending to understand moding, but you "might" find how he is doing it there :)
I also know that Extra Utilities supports connected textures (in vanilla, like Chisel - but also with FMP microblocks) - perhaps the same can be done for this?
(I also know that the current CTM uses block detection to assign the correct texture. If the block detection code is altered to suit the face of each Carpenter's Block, connected textures may be possible.)
Here's some actual help. This might only be possible with full blocks, but it is possible.
CrazyPants' EnderIO recently added this SleepyTrousers/EnderIO-1.5-1.12@8ce3b77
that works since this PR was pulled: Pokefenn/Chisel#67
Hopefully that gives some insight
Like I said, the code wod need to be tweaked for slopes. There would also have to be a way to make this work with FMP tagain, I mention ExtraUtils; the connected textured work with FMP).
Doesn't look like the code is responsible for connected textures, just merely supporting it in another context. Not to deter you guys, but implementing this kind of support is low priority right now and I won't personally look into it until at least the school term is over. But if someone happens to understand it well enough to throw together a pull request, that's absolutely a possibility.
Got something from Optifine Ultra (1.7.10).
It contains the block detection code which you may be able to replicate and tweak...
--EDIT--
I have more.
This is the main CTM properties file that has code which determines the types of blocks to respond to (so that blue stained glass blocks don't share connected textures with red glass blocks, as an example.)
There is one more file - a properties file for all vanilla glass blocks.
You may be able to use these to implement connected textures.
--SECOND EDIT--
Found Chisel's main CTM file.
Just adding in here for reference that the Steam Boiler and Iron/Steel Tanks from Railcraft as ideas for one style. When the tanks meet their criteria they change the rendering of their glass to be connected, and the boiler blocks that go on top are shrunken to have separations and join together when they meet their criteria.
Aside from the already mentioned Chisel, EnderIO provides Quite Clear Glass
which connects its border to other adjacent blocks to have only a frame around their glass.