Posted September 21, 201510 yr Hello everyone! I'm wondering if there is an alternative for the ISimpleBlockRenderingHandler in 1.8. I want to create a block similar to the conduits from enderIO and therefore I need a code-driven renderer, however I don't want to use a TileEntitySpecialRenderer because of efficiency. Please don't tell me to use models, for such a complicated model it would be a pain in the a** to create a model for every single possible state. Or is there a better model type? Anyway, I prefer the code driven renderer... Any Ideas, what I can do to recreate something like the ISimpleBlockRenderingHandler? Is there maybe an approach by Forge to re-implement it? http://i.imgur.com/wNvtGZw.png[/img] MODS and MODDING TUTORIALS
September 21, 201510 yr There are only 2 choices: Use TESR, or you should make some Json model. I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP) II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.
September 21, 201510 yr Author Wich class should implement IBakedModel? And what do I do with that class? I recently saw a model json file on a github by forge that used some additional features. However, I cannot find the link anymore. Is there a new Forge model file syntax or did they removed it? Because it looked kinda fancy. Another question: How much would it slow MC down if I had the TESR and about 100-200 blocks within the viewport? (OK, depends on the computer, but would it cause massive lag?) http://i.imgur.com/wNvtGZw.png[/img] MODS and MODDING TUTORIALS
September 21, 201510 yr Wich class should implement IBakedModel? And what do I do with that class? You make your implementation. And register it ofc. I recently saw a model json file on a github by forge that used some additional features. However, I cannot find the link anymore. Is there a new Forge model file syntax or did they removed it? Because it looked kinda fancy. Something like this: http://mcforge.readthedocs.org/en/latest/blockstates/forgeBlockstates/ Idk if this si official docs. Only fancy thing is that you don't need that many variants, but shorter files. Another question: How much would it slow MC down if I had the TESR and about 100-200 blocks within the viewport? (OK, depends on the computer, but would it cause massive lag?) Depending on rendering operations, it can slow a LOT. 1.7.10 is no longer supported by forge, you are on your own.
September 21, 201510 yr Author You make your implementation. And register it ofc. Sorry, how exactly can I register a model? I've only registered the model files so far (and used the normal blockstates file). Something like this: http://mcforge.readthedocs.org/en/latest/blockstates/forgeBlockstates/ Idk if this si official docs. Only fancy thing is that you don't need that many variants, but shorter files. Yes that's exactly what I meant. Is this already implemented in Forge? Because it could make things a lot easier if you have many, many state properties. (However, I still prefer code) Depending on rendering operations, it can slow a LOT. Yeah, that's what I thought as well... Could be a pain for users with a slow computer... http://i.imgur.com/wNvtGZw.png[/img] MODS and MODDING TUTORIALS
September 21, 201510 yr You make your implementation. And register it ofc. Sorry, how exactly can I register a model? I've only registered the model files so far (and used the normal blockstates file). You should register your block .JSON and blockstate like normal. After that, create an instance of your block's ModelResourceLocation and use the ModelBakeEvent to extract the IBakedModel from it. Then, again use the ModelBakeEvent to replace the ModelResourceLocation with your custom class implementing IBakedModel. Here is an example below. public void onEvent(ModelBakeEvent event) { final IBakedModel bakedmodel = event.modelManager.getModel(YOURMODELRESOURCELOCATION); final YourIBakedModelTypeClass youribakedmodeltypeclass = new YourIBakedModelTypeClass(bakedmodel); event.modelRegistry.putObject(YOURMODELRESOURCELOCATION, youribakedmodeltypeclass ); } Development of Plugins [2012 - 2014] Development of Mods [2012 - Current]
September 21, 201510 yr Something like this: http://mcforge.readthedocs.org/en/latest/blockstates/forgeBlockstates/ Idk if this si official docs. Only fancy thing is that you don't need that many variants, but shorter files. Yes that's exactly what I meant. Is this already implemented in Forge? Because it could make things a lot easier if you have many, many state properties. (However, I still prefer code) Yes, it's implemented. You can see the code behind the example in the docs here and the blockstates file and item/block models here. I created a model similar to a BuildCraft pipe using this system here. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.