Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Is it bad to reuse Minecraft's code in my mod?


Recommended Posts

Hello!

 

I've been making a mod that seeks to change how chat is displayed, allowing for a better chat screen.

 

I've got to the point using reflection where the game uses my NewChatGUI rather than vanilla's one, but still I need to reuse a lot of the functionality from the existing NewChatGUI, such as the rendering, meaning I have to copy some of the read-only Minecraft code. Some methods will change but some will stay exactly the same (jibberish names and all)

 

Is that bad? If I'm redistributing code that I didn't write (though edited large parts of it), is this against the ethos of modding? Is this frowned upon by modders?

 

Note, I'm not able to render over the existing chat GUI, it's gotta be fundamentally changed.

 

Hopefully this makes sense, if not I should be able to put the code onto github

Link to post
Share on other sites

Thank you for your guidance! Took me a little while to figure out the access transformers but got there in the end. This thread really helped:

but took me a while to work out I had to DM the MCPBot http://mcpbot.bspk.rs/help and have it tell me what line to put into the accesstransformers.cfg

 

However, is that enough? What I mean is that when I want to override a certain function, like rendering or the one that splits up the line, after changing it to protected I still have to copy the entire method to perhaps only make a change to like one line, keeping every other line in the function just a copy of Mojang's code.

 

Is this still ok? I suppose there's not much else I can do so I hope so haha

Link to post
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.

Guest
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 Privacy Policy.