Posted November 20, 20168 yr Im new in modding so I got myself open source simple mod from github and was learning from it. I could edit everything and then compile back to 1.8.9. Minecraft advanced forward so Im trying to update mod too. I updated forge, gradle but I also need to update code. I found most of class changes and fixed imports but there is few I cant find. net.minecraft.util.EnumWorldBlockLayer; net.minecraft.util.MovingObjectPosition; How I can find changes of class naming? I checked many tutorials how to port mods but didnt found anything about finding changes and correcting imports for right library. Please point me to right direction.
November 20, 20168 yr Author Thank you diesieben07, fixed everything related to these classes. One last thing I couldnt find for a while. Im trying to override showCrosshair() method. Previously it was in GuiIngame. Its still very complicated since I dont know how to properly compare codes.
November 20, 20168 yr Author If you want to change parts of the HUD use RenderGameOverlayEvent . This explanation should help. So there is no more easy understandable showCrosshair() method? I have to disable drawing/rendering of default crosshair and then with RenderGameOverlayEvent draw my own crosshair where I want? Sounds difficult as for starter..
November 21, 20168 yr Author Well, it was kinda cheat. I knew when crosshair was drew so I redrew new one and was returning false for showCrosshair(). Anyway, I got hang of RenderGameOverlayEvent and Im able to draw text etc but I have no success converting old method. WorldRenderer tessellator = Tessellator.getInstance().getWorldRenderer(); tessellator.startDrawingQuads(); tessellator.setColorRGBA_F(r, g, b, .5f); tessellator.addVertexWithUV(par1 + 0, par2 + par6, this.zLevel,(par3 + 0) * f, (par4 + par6) * f1); tessellator.addVertexWithUV(par1 + par5, par2 + par6, this.zLevel,(par3 + par5) * f, (par4 + par6) * f1); tessellator.addVertexWithUV(par1 + par5, par2 + 0, this.zLevel,(par3 + par5) * f, (par4 + 0) * f1); tessellator.addVertexWithUV(par1 + 0, par2 + 0, this.zLevel, (par3 + 0)* f, (par4 + 0) * f1); Tessellator.getInstance().draw(); What I got trying to convert it: VertexBuffer tessellator = Tessellator.getInstance().getBuffer(); tessellator.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK); tessellator.putColorRGB_F(r, g, b, (int) .5f); tessellator.pos(par1 + 0, par2 + par6, this.zLevel); tessellator.tex((par3 + 0) * f, (par4 + par6) * f1); tessellator.pos(par1 + par5, par2 + par6, this.zLevel); tessellator.tex((par3 + par5) * f, (par4 + par6) * f1); tessellator.pos(par1 + par5, par2 + 0, this.zLevel); tessellator.tex((par3 + par5) * f, (par4 + 0) * f1); tessellator.pos(par1 + 0, par2 + 0, this.zLevel); tessellator.tex((par3 + 0) * f, (par4 + 0) * f1); Tessellator.getInstance().draw();
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.