lawremi / PerFabricaAdAstra

Through crafting, to the stars
http://pfaa.wikia.com/
Artistic License 2.0
17 stars 7 forks source link

Third-party Ores (with overlays) working on PFAA stone. #48

Closed PitchBright closed 9 years ago

PitchBright commented 9 years ago

I had enquired on the forums, with you… about the possibility of making ores that I've added to my mod, have overlays that will work on top of PFAA stone types. Your thoughts were as follows:

"The current design does not fully support this type of extension. The easiest thing would be for your block to extend CompositeBlock. This gives you a lot of functionaltiy, but not the search for nearby blocks to obtain the underlay texture. That part is in IntactGeoBlock, which is implemented on top of GeoMaterial. Obviously, your gems will not be in that enumeration. Admittedly, there is a failure to separate concerns, but I think you get pretty close by extending CompositeBlock and using the static IntactGeoBlock.getAdjacentBlock() and getBlocksForOre("stone") utility methods. I can move those somewhere and make them public if you want to call them."

If you could move them and make them public so we can call them, that'd be awesome!

lawremi commented 9 years ago

Do you need your mod to be independent of Geologica? Assuming yes, extending CompositeBlock is not an option. I could just add a static method somewhere, something like IIcon getIconForAdjacentStone(World world, int x, int y, int z). But please note that there is nothing specific to Geologica about that. It just looks for adjacent blocks that fall under the "stone" term in the ore dictionary and gets the icon of one of them.

PitchBright commented 9 years ago

That could work, I think. The only stone we use, is Geologica Stone (as far as I know). I can't think of any other blocks that are ore dictionary stone.

That said, the mod will always be used in tandem with Geologica, so it's not absolutely necessary for it to be independent of Geologica.