-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding new block types #35
Comments
All the block image stuff is in blockimages.cpp and .h; it's pretty well isolated. The various functions that turn the terrain tiles into isometric block images could maybe use a little cleanup or a simpler interface, but you should be able to get the hang of it. Towards the top of blockimages.h there's a general explanation of how the isometric conversion is done. There are basically three steps to adding more block images:
Plain old blocks (cubes) are trivial to add, and some of the more common variants are also pretty easy--blocks that only go up to a certain height, items like saplings where two flat images of the terrain tile are drawn in a cross-shape, etc. Anything more complicated can be a bit of a pain. But keep in mind that you can always just skip step 3 and manually draw things directly in your blocks-B.png. As far as extending to other sources than terrain.png, take a look at how fire.png and endportal.png are handled--it's pretty straightforward. (I've actually been thinking of adding a plugin system where people would be able to define custom blocks and provide .pngs for them. But that's still probably a while off.) |
qwindelzorf, if you get a custom pigmap created that works with mod blocks, I would be very interested in seeing the source. I'm running a heavily modified server and would love for my Redpower, IC2, BC2, Forestry, Railcraft and EE blocks to render correctly. |
I have gotten support for IC2 and BC2 working. I'm not real happy with the rendering of BC Pipes/Frames, but to do it correctly would require me to code up all 64 different pipe configurations for each pipe type, and that is just crazy. Engines are kind of hokey right now as well, but they seem do draw from a number of textures, and were kind of a pain, so I just put in appropriately colored engine-like objects. Results can be seen here: http://qwindelzorf.com/minecraft_map/ |
I would recommend forking pigmap, making the changes you want to make and then issuing pull requests. I would certainly be very interested in the ability to easily define custom blocks and/or plugin modules to support popular mods like RedPower, IC2, etc. |
I am forking this project to add more extensive block support. The fork can be found here: https://github.com/qwindelzorf/pigmap Once the code is reasonably stable and usable, I will issue a pull request to try to roll it back into the main Pigmap codebase. |
With the recent (apparent) demise of c10t, I have switched to pigmap. Now, I run a server running Buildcraft Industrial-Craft 2, and was previously using a custom c10t build that rendered the mod blocks correctly. Now that I have switched to pigmap, I would like them to render.
I'm willing to do the coding to make it all work. Rather than just wandering blindly through the codebase trying to figure out all the places that block rendering code lives, I figured I'd ask on here for a few pointers. Where should I start? I can pull the textures from the mod packages' assets folders, but it is not readily apparent where they should be inserted into the blocks-N.png . Also, the textures would have to undergo the needed transformations to make block images, so I would probably want to extend the system to allow for other texture sources than just terrain.png.
Am I biting off a huge task? Is this going to require a massive refactor of the whole codebase?
Thanks for any input.
The text was updated successfully, but these errors were encountered: