Jump to content

1.3 Migration Confusion! (or, Why We're In For A Wait)


Recommended Posts

Posted

Since Forge has now released a "featured" build of its 1.3.2 branch on Jenkins, I thought I'd go ahead and start looking at it, because continuing to work on 1.2.5 modding is fine for 1.2.5, but so much infrastructure has changed that every moment spent learning it (for someone like me) will be another spent unlearning it when switching to 1.3.2.

Summary: Sweet blessed Agnira on a polka-dotted mule...

So far, from tutorials all across the 'net, I'm swimming in a chunky mixture of pre-Modloader, ModLoaderMP, pre-1.3 Forge, and post-1.3 Forge, and I can make neither heads nor tails out of it. Forge, in particular, gave itself a root canal: ModLoader support now is legacy-only, and the actual FML isn't even in net.minecraft.src and uses compiler annotations and an event bus instead of overrides and hooks.

My current plan is to just abandon the tutorials and start grokking the Forge sources. In the mean time, if anybody can provide a sort of vague outline of the old information, like "X and Y are useful, but U and V will just confuse you, so ignore those parts", that would be rather helpful.

At least it's something to do while GW2 is down. ;-)

Posted

I'm in the process of trying to work through things myself, mainly by trying to bring my StainedGlass stuff up to date. I can already say: fuck annotations.

If I manage to get things working, I'll post what I know.

Posted

Ok, progress is being made, though it's like trying to swim through molasses, seems like. Everything appears to be similar to how it used to be, but changed so as to be completely unintuitive. There's a page on the forge wiki that I'm finding helpful. http://www.minecraftforge.net/wiki/Tutorials/Upgrading_To_Forge_for_1.3.1

It should be much the same for 1.3.2. So far the most confusing bit is the sided proxy. I have the feeling it could be really powerful, but I'm having trouble wrapping my head around it.

Anyway, I've got the glass and panes working. Haven't started on the furnace yet, but into the breach we go friends.

Posted

Aww man, I just got to the point I was satisfied with my knowledge of java, and was about to start modding... Does that mean it's a bad moment to start learning?

Posted

What's begun is soonest done. Also, check this out:

https://docs.google.com/document/d/1U1pgNbn0HIM8JY5fe1EV6Zxv20Hlo6UxkHeIU7NIMog/edit?pli=1

It's a godsend for the basic outline. What I gather about Sided Proxy:

  • Create a class ClientProxy (or whatever) that does stuff only the client should do (like register renderers, preload textures, check for client-side-only config options).
  • Create a class CommonProxy that ClientProxy extends, that has the same methods, that are just shells that do nothing.
  • Use the SidedProxy annotation to tell Forge which one is which.

It then instantiates the right one depending on which side your code is being run on, since you can't just distribute a server and client file anymore and they have to be one single file.

Posted

Ah, that does make things slightly clearer.

Xylord, go for it. Now that they've done THE GREAT CODE REDESIGN IN THE SKY, things should be stable for a while. Even when they introduce the official modding API, creating you own block class will stay the same. And of course, there's the possibility that the API won't be that nice and everyone will keep using forge anyway. :P

Posted

How is this possibly not on the modding sticky?

You're asking why a work-in-progress tutorial is not on a work-in-progress wiki for a work-in-progress release?

Posted

You're asking why a work-in-progress tutorial is not on a work-in-progress wiki for a work-in-progress release?

MC itself is still WIP, so why not? :D

Posted

The bit on metadata is a little wonky at the moment. Specifically, you still need to register a metadata block, and setRequiresSelfNotify() isn't absolutely required.

Posted

Newest build of Forge included this little gem:

Add in a convenience method for getting a class instance based on existence of another Mod. Useful for soft dependencies.

Despite the headaches, I'm starting to get a little excited about Forge's newly-accelerated direction. You know, excited...down there.

Posted

Thanks for pointing these out.

I had been starting on a small little mod of my own and had only really stumbled upon the first "Upgrading to forge 1.3.1" link.

I was using that, along with looking at sample code from IronChests and other still-obfuscated code using JD-GUI.

Posted

There's a guide to decompiling other mods around here somewhere, if you need it, so you can get de-obfuscated code. Should still be valid for MCP 7.2.

Posted

Now that I've messed with it a bit, I have to disagree with "fuck annotations". They are growing on me, and I'm actually enjoying 1.3 Forge more than any other version. These guys know what they're about.

Posted

I'm not disputing their power, but their use has a few gotchas that make them pretty annoying to use, especially if you're working in eclipse. For example, lets say you got a method signature wrong. In the old FML, this would have been a compile time error, and eclipse would have kindly pointed this out to you. Now it's a runtime error, for that's when the annotation is evaluated. Additionally, there's no easy way to check what the signature should be like you could if it was overriding a hook. There's no good way to tell anything at all about what the annotation expects, in fact, until it pukes stack all over the console.

Edit: and as ever, there doesn't seem to be any documentation.

Posted

Ah, well, I'm used to using nothing but a plain VIm text-editor and reading the source directly for info, so I don't have to go back and forth across all those layers. To me, the loss of ease most of the time is worth the loss of the gotchas too. (Plus, considering that I'm the sort of anal personality that can become obsessed with making sure there are no extra spaces at the ends of lines, having anything other than a Un*x-y text-editor that doesn't try to "help" might actually drive me nuts.)

Posted

Ah, well, I'm used to using nothing but a plain VIm text-editor and reading the source directly for info, so I don't have to go back and forth across all those layers. To me, the loss of ease most of the time is worth the loss of the gotchas too. (Plus, considering that I'm the sort of anal personality that can become obsessed with making sure there are no extra spaces at the ends of lines, having anything other than a Un*x-y text-editor that doesn't try to "help" might actually drive me nuts.)

I'm really trying to see this as a typo, but I can't see what you could have meant that looks like "anal"...

Posted

*nixes are great, aren't they? :) Hopefully, the changes in 1.4 won't be brutal. I, personally, believe they won't include the mod api in this one either. They'll say "Whoops, sorry, not ready yet. Wait for 1.5!"

Posted

You've never heard someone described as anal-retentive? It's similar to tight-assed.

Sorry, I don't speak English in my RL environment, so I'm perfectly ignorant those kinds of familiar expressions.

Posted

If they had half a brain, they'd just say Forge is the modding API and wipe their hands clean of the whole mess. They could just give the Forge team access to the source under NDA and then make Forge an artifact of Mojang's build. It'd still be decompilable Java, so it'd be as easy for us to edit at will, and it would at least lessen the "y u mean i ned forge how does i get" nonsense.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...