Jump to content

I think of updating my (very) old mod to 1.9. I need you guys' opinion on this


xerca

Recommended Posts

Hello fellow modders. I used to run a server with my friends and had a custom mod along with it. It had a shit load of items with different uses, blocks, projectiles, particles, all kinds of random stuff. Now we are playing again and I thought of updating the mod to the current version, however the last surviving source of the mod is from 1.4.6. I installed Forge and when I copied the old source (expectedly) literally every single class were filled with errors. I thought maybe I should make it from scratch, but I can't seem to find any comprehensive documentation or tutorial on currently what works how in Forge.  I figure this is normal because it hasn't been very long since 1.9 came (and I think there still is not a stable 1.9 Forge version). There are a few tutorials but they are from 1.8.9, which also apperantly has some differences, so I don't want to waste time on learning that.

 

So, my question to you is, what is the best thing to do: Wait until a comprehensive documentation is written, try to figure things out by myself, or just give up

 

I don't know if there ever will be a good doc, because I don't know how things work around here. I'm talking about one that explains what each function that Forge provides does, how/where to use each function/construct/feature/etc. Or at least a tutorial series that explain basic things clearly like creating and registering items, blocks, rendering things, how the resources work (my old version has a spritesheet), etc. If these will be written at some point, how long do you think that would take?

 

Trying to do it by myself seems pretty hard since my java knowledge is quite rusty and the game code looks a lot different than what I remember. Also, if it turns out to be too time/effort consuming I am inclined to just give up, as it isn't that important anyways.

 

Would it be somehow easier to update it incrementally instead of making it from scratch? For example using guides like "Updating from 1.x to 1.(x+1)" one by one. That seems like a crappy idea.

Link to comment
Share on other sites

1.9+ is not much different from 1.8.9. There has been changes in advanced rendering (models) and Entity stuff (new off-hand and action classes/enums), but that's it mostly.

 

So yeah, rendering and models you can be learn from 1.8+

TileEntities and most Entity tutorials are cool even with 1.7.10, only registration changed a bit.

 

Also, new versions have java docs, if that is not enough - you can just read code.

 

And I ddon't belive you looked hard enough when you say you can't find any tuts. There are plenty.

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

1.9+ is not much different from 1.8.9. There has been changes in advanced rendering (models) and Entity stuff (new off-hand and action classes/enums), but that's it mostly.

 

So yeah, rendering and models you can be learn from 1.8+

TileEntities and most Entity tutorials are cool even with 1.7.10, only registration changed a bit.

 

Also, new versions have java docs, if that is not enough - you can just read code.

 

And I ddon't belive you looked hard enough when you say you can't find any tuts. There are plenty.

 

Learning the unchanged parts from different versions is a good idea. So I can use the old tutorials for most things. I did find tuts but they were all for old versions so I didn't want to waste effort on upgrading old code into less old code. Thanks for the tips.

Link to comment
Share on other sites

I think it will be much easier to rewrite your mod in the current version. Updating it through each version would make the code sloppy and you can add more abstractions to make it easier to expand on later. For the complicated stuff, you can copy-paste stuff from the old version over with a little bit of tweaking.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

First of all, if you and your friends are playing again, you need to decide whether to play in your old, comfortable world or start a new adventure in a brand spanking new world created from scratch. If you want to preserve your old world, then you're done. Just fire it up and run it as is.

 

On the other hand... if you'd like to experience all of the new features added to MC over the last several years since you all went into your caves, then you're going to start a new world from scratch. For this project, I recommend the following:

 

1) Your end goal is to launch a pristine new world running in a recommended Forge build for MC 1.9.2. This does not exist yet, so you have time to play catch-up with your mod.

 

2) Download and install the latest Forge 1.9 decompiled workspace. Don't mess with intermediate versions; some of what you would struggle to learn is stuff that you would immediately need to unlearn. Copy in your mod's source. Don't be put off by the errors.

 

3) There are many threads covering each of your issues. Google is your friend (it indexes our forum better than the forum's own search function). Attack each error, passing the confusing in favor of the "low hanging fruit". In this you will sense patterns that will make each successive step easier. With the easy stuff (mostly SRG -> meaningful naming) fixed, the semantic changes stand out. Google Google Google.

 

4) Read about JSON model and texture handling, especially the Forge alternate blockstates format.

 

5) When you have reduced your error list to the one corner case not covered by dozens of repetitive, redundant, duplicative threads, then write here again. If you believe you have more than one, then it is usually best to write each problem as a separate thread because different forum participants respond to different subjects (use specific subject lines to draw their attention).

 

6) By the time that's all cleaned up, Forge should have a recommended build for 1.9.2. Install the decomp workspace and the server and the client for that recommended build. Clean up what few issues arise in Eclipse. Then you can finally tell gradlew to build you a new jar. Then test on your own client (SP) and server (disposable SMP).

 

7) When all of that is done and working, then you may finally install your mod and launch your real 1.9.2 world and send the final compiled mod jar to your friends so they can join.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Link to comment
Share on other sites

Thanks, guys. I learned the very basic things and started remaking the mod starting from the easy parts. And noticed we had waay too many foods, it's taking so long to make model json files and put textures at the right place, edit lang file, etc. and everything with the right name for each of them. Maybe I should have automated this from the begining in some way...

 

First of all, if you and your friends are playing again, you need to decide whether to play in your old, comfortable world or start a new adventure in a brand spanking new world created from scratch. If you want to preserve your old world, then you're done. Just fire it up and run it as is.

 

On the other hand... if you'd like to experience all of the new features added to MC over the last several years since you all went into your caves, then you're going to start a new world from scratch. For this project, I recommend the following:

 

1) Your end goal is to launch a pristine new world running in a recommended Forge build for MC 1.9.2. This does not exist yet, so you have time to play catch-up with your mod.

 

2) Download and install the latest Forge 1.9 decompiled workspace. Don't mess with intermediate versions; some of what you would struggle to learn is stuff that you would immediately need to unlearn. Copy in your mod's source. Don't be put off by the errors.

 

3) There are many threads covering each of your issues. Google is your friend (it indexes our forum better than the forum's own search function). Attack each error, passing the confusing in favor of the "low hanging fruit". In this you will sense patterns that will make each successive step easier. With the easy stuff (mostly SRG -> meaningful naming) fixed, the semantic changes stand out. Google Google Google.

 

4) Read about JSON model and texture handling, especially the Forge alternate blockstates format.

 

5) When you have reduced your error list to the one corner case not covered by dozens of repetitive, redundant, duplicative threads, then write here again. If you believe you have more than one, then it is usually best to write each problem as a separate thread because different forum participants respond to different subjects (use specific subject lines to draw their attention).

 

6) By the time that's all cleaned up, Forge should have a recommended build for 1.9.2. Install the decomp workspace and the server and the client for that recommended build. Clean up what few issues arise in Eclipse. Then you can finally tell gradlew to build you a new jar. Then test on your own client (SP) and server (disposable SMP).

 

7) When all of that is done and working, then you may finally install your mod and launch your real 1.9.2 world and send the final compiled mod jar to your friends so they can join.

 

I thought maybe I should just leave it but your post gave me a feeling that I can do it, so I'm doing it. We already started playing the latest version (vanilla) in a new world by purchasing a realm. After the realm's time ends, we will upload it to some other host (hopefully with the mod) and continue.

 

I just couldn't handle the sheer amount of errors when I paste the whole code, so I'm copying and fixing it (and writing some of them from scratch) piece by piece. Also it would be pretty bad not to be able to compile it until I remove all the errors, lol. I learned about the json model and texture stuff, seemed a bit laboury at first but now I like the new system. I love how I can change how an item renders just by changing a text file. I didn't touch the blockstates yet, though. It scares me a bit, heard all the metadata is gone out the window now.

 

I do believe in google, but sometimes it just returns so many outdated or irrelevant results. Maybe I'm just bad at searching. Definitely better than the forum's search though, that's right. For some reason all forums have a shitty search function. I usually try to solve problems by reading the code but some of the code is always spagetthi like field_328 p_432432890_3_ without any doc. And sometimes the difference is too subtle to notice, like I pasted the old crafting recipes and everything that has a vanilla item in it referenced like "Item.stick" gives an error. So I check google and find a 1.8 guide that shows it the same way like me, so I say it should have been changed in 1.9 and no one wrote anything about it and tried using "Item.getByNameOrId("minecraft:stick")" until I realize that the 1.8 guide used "Items" instead of "Item". Dammit.

 

Thank you for the long answer.

Link to comment
Share on other sites

Yeah the new json stuff can be pretty painful.. If you want I can share my automation script for making jsons and stuff (it works for items, blocks need a bit of fixing right now)

 

Try making the mod part by mod. If the mod is big try splitting it into smaller parts and try to finish one so u have a success sometimes with finishing of a part :) Helps a lot with staying motivated!

If you have any questions just ask!

Link to comment
Share on other sites

Yeah the new json stuff can be pretty painful.. If you want I can share my automation script for making jsons and stuff (it works for items, blocks need a bit of fixing right now)

 

Oh god, link that somewhere.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

I do believe in google, but sometimes it just returns so many outdated or irrelevant results.

 

Look to the upper-right and then click on "Search Tools". It's really just a handful of advanced search criteria like "age". Filtering to within a year helps. For something really recent, cut results to a month.

 

For some reason all forums have a shitty search function.

 

Except when it's an embedded Google search with "site: ..." hidden in it. That's what I did for the one commercial web site I designed, and it worked like a charm (and testing it even helped me with my SEO).

 

I usually try to solve problems by reading the code but some of the code is always spaghetti like field_328 p_432432890_3_ without any doc.

 

Those are SRG names. Rather than "spaghetti" (which means tangled), you should call those "obfuscated" (meaning SRG-encoded).

 

If/when you see those names in or close to code you're modding (since 1.8), it usually means you're straying from the well worn paths of simple modding. Either your mod is more advanced, or else you should probably be elsewhere. If you want to do advanced mods, then you had better enjoy the puzzle-game aspect of deciphering SRG names. Eclipse's functions for showing usage etc are useful there.

 

And sometimes the difference is too subtle to notice, like I pasted the old crafting recipes and everything that has a vanilla item in it referenced like "Item.stick" gives an error. So I check google and find a 1.8 guide...

 

Before going to a guide, try to find a vanilla example to imitate. Then try to find a thread in this forum that shows (or links to) a working example. Fall back to "tutorials" and guides as a last resort, and then gravitate toward those written by names you recognize from good advice seen in this forum.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

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.

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

Announcements



×
×
  • Create New...

Important Information

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