Posted August 13, 20232 yr Hi, So I've been wanting to try and find out how to have a custom block renderer without having to use a block entity (for optimization purposes). My actual block does not actually use anything block entity related (like saving and loading data). It's really only a block entity for the custom renderer. If normal blocks can have their own custom renderer without needing a block entity then how would I go about doing this? To be more in depth on what I'm actually doing; I have GLSL shaders and I'm basically wanting to render the shader as simple block (Here is my utility class that draws the block). Thanks
August 13, 20232 yr If what you are drawing is relatively static, i.e. doesn't depend upon dynamic data beyond things like the block properties in the BlockState, then you can create your own model loader: https://docs.minecraftforge.net/en/1.20.x/rendering/modelloaders/ This basically lets you setup most things at resourcepack loading time during the model bake. At runtime it will ask you for your quads (you should have prebaked these for each BlockState of your block): https://docs.minecraftforge.net/en/1.20.x/rendering/modelloaders/bakedmodel/#getquads https://github.com/MinecraftForge/MinecraftForge/blob/1.20.x/src/main/java/net/minecraftforge/client/model/IDynamicBakedModel.java#L35 This is not something I have ever done myself. I just know it exists. So I can't really help you with the details. Forge has a builtin OBJ model loader: https://github.com/MinecraftForge/MinecraftForge/tree/1.20.x/src/main/java/net/minecraftforge/client/model/obj and I know immersive engineering uses some custom models: https://github.com/BluSunrize/ImmersiveEngineering/tree/1.19.2/src/main/java/blusunrize/immersiveengineering/client/models Edited August 13, 20232 yr by warjort Boilerplate: If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one. If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install Large files should be posted to a file sharing site like https://gist.github.com You should also read the support forum sticky post.
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.