-
[1.14.4] Custom rendering
GlStateManager.pushMatrix(); GlStateManager.disableTexture(); GlStateManager.disableLighting(); GlStateManager.disableDepthTest(); GlStateManager.enableBlend(); GlStateManager.blendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0); GlStateManager.lineWidth(1); Vec3d renderPos = Utils.getInterpolatedEyePos(MC.player, event.getPartialTicks()); RenderEvent renderEvent = new RenderEvent(GeometryTessellator.getInstance(), renderPos, event.getPartialTicks()); renderEvent.resetTranslation(); MinecraftForge.EVENT_BUS.post(renderEvent); GlStateManager.lineWidth(1); GlStateManager.disableBlend(); GlStateManager.enableDepthTest(); GlStateManager.enableLighting(); GlStateManager.enableTexture(); GlStateManager.popMatrix(); GeometryTesselattor extends Tesselator and adds some helper functions. RenderEvent.resetTranslation() translates tesselators buffer by renderPos. (Passed in constructor) Utils.getInterpolatedEyePos(): public static Vec3d getInterpolated(Entity entity, double x, double y, double z) { return new Vec3d((entity.posX - entity.lastTickPosX) * x, (entity.posY - entity.lastTickPosY) * y, (entity.posZ - entity.lastTickPosZ) * z); } public static Vec3d getInterpolated(Entity entity, double ticks) { return getInterpolated(entity, ticks, ticks, ticks); } public static Vec3d getInterpolatedPos(Entity entity, double ticks) { return new Vec3d(entity.posX, entity.posY, entity.posZ).add(getInterpolated(entity, ticks)) ; } public static Vec3d getInterpolatedEyePos(Entity entity, double ticks) { return getInterpolatedPos(entity, ticks).add(0, entity.getEyeHeight(), 0); } And when I Subscribe to that event is just adds some vertices to buffer and calls tesselators draw method. If you can help me it would be awesome.
-
[1.14.4] Custom rendering
Thanks and another question, so I am interpolating players last and current position with partialTicks, it works but when I am moving its is rendering it a little bit behind the actual position. I think it is because of usage of lastPos but there must be some way to fix it.
-
[1.14.4] Custom rendering
Before I render line from one block to another I translate it with negative player position, that works fine but when I sneak the line moves up and down. How I can prevent that?
-
[1.14.4][SOLVED] Config file?
Ok thanks for the tutorial
-
[1.14.4][SOLVED] Config file?
In documentation are mentioned @Config and Configuration class but in 1.14.4 there is none. How I can do it?
-
[1.13.2] Unable to locate minecraft data on the classpath
Oh ok then, thanks for info
-
[1.13.2] Unable to locate minecraft data on the classpath
I wanted to use 1.13.2 but maybe 1.14.4 is better
-
[1.13.2] Unable to locate minecraft data on the classpath
When I set up forge and want to start minecraft it gives this error. I dont know what to do with it. latest.log
IPS spam blocked by CleanTalk.