Jump to content

Trouble porting mod from 1.8.9 to 1.10


Recommended Posts

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.




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.


Link to comment
Share on other sites

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.

Link to comment
Share on other sites

If you want to change parts of the HUD use


. 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..

Link to comment
Share on other sites

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.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);

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);

Link to comment
Share on other sites

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.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.