Posted March 13, 20169 yr I have an entity which I want to render as a sphere. Just like this: It is a little hard to tell but there is three spheres, The inner purple/blue, the middle dark purple/black and the outer red haze. How would I achieve this?
March 13, 20169 yr You will have to figure out how to draw that using regular OpenGL (maybe a tesselator) and then hook into @SubscribeEvent(receiveCanceled=false) public void onEvent(RenderGameOverlayEvent.Pre event) { and call your draw method. Current Project: Armerger Planned mods: Light Drafter | Ore Swords Looking for help getting a mod off the ground? Coding | Textures
March 13, 20169 yr Author You will have to figure out how to draw that using regular OpenGL (maybe a tesselator) and then hook into @SubscribeEvent(receiveCanceled=false) public void onEvent(RenderGameOverlayEvent.Pre event) { and call your draw method. I would like to render it as 3D not a 2D Image. The image is an example of how I would like it to look.
March 13, 20169 yr You'll still need to figure out how to render it using OpenGL(maybe tesselator) but you will be tying it to the entity instead. This will be more help than me. Current Project: Armerger Planned mods: Light Drafter | Ore Swords Looking for help getting a mod off the ground? Coding | Textures
March 14, 20169 yr Author I have figured it out thanks to one of Jabelar's tutorials, albeit a few issues. One, the entity does not render correctly. It renders the color incorrectly, depending on the side/angle viewed. Two, when looking at the entity it causes the item/block that is in the players hand and items on the floor to turn blue/black. Client Proxy: https://github.com/LogicTechCorp/SoulMagic/blob/master/src/main/java/soulmagic/proxy/ClientProxy.java Render Class: https://github.com/LogicTechCorp/SoulMagic/blob/master/src/main/java/soulmagic/client/render/entiy/SoulRenderFactory.java
March 14, 20169 yr I ha this exact same problem when i was trying to do something similiar. Mine was a fun project though so i gave up. The author of the tutorial probably is the one who can give you a solution, but wait for possible fixes from the more experienced programmers of this community. What i would like to tell you though is that you shouldn't be rendering 2 spheres (4 technically, outer sphere inside and outside and inner sphere inside and outside). Render just one sphere and apply a texture to it to make it look like there's another sphere inside it. This is just for better performance. If there are around 100 of these spheres in the same area some computers will struggle to keep up. Well i am not quite sure how minecraft renders objects but a sphere is a complex one. It's made up with a lot of vertexes.
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.