MC Modding Beginner Here ^.^

This forum is for anything that doesn't specifically have to do with Better Than Wolves
Post Reply
User avatar
BinoAl
Posts: 2552
Joined: Mon Jul 04, 2011 9:39 pm
Location: Everywhere.

MC Modding Beginner Here ^.^

Post by BinoAl »

Couldn't sleep at all last night, so pulled an all nighter playing with mcp. I've done a bit of visual basic, but oop in general is really new to me. I toyed around with it a bit, made coal ore drop diamonds, made reeds grow to 25 meters high (but couldnt for the life of me figure out how to make them grow quicker) and even made crafting a log into planks give me 64 wood ^.^ Any ideas of what I can try? I hate following tutorials, I like figuring things out on my own. I'm not good enough to make a whole new block, but what I've done so far is nothing more than replacing words and numbers, and won't get me anywhere.
Image
User avatar
PrivateAlpha
Posts: 20
Joined: Sun Aug 07, 2011 1:04 pm

Re: MC Modding Beginner Here ^.^

Post by PrivateAlpha »

Well basics first:
*own block type
*new type of ore
*New tools
*New fuel type
*basic overlay things: Like the time(Ingame time or real) ingame weather etc

Also are you modding with Forge api? if not, shame on you! :P
User avatar
Urian
Posts: 1691
Joined: Tue Jul 05, 2011 3:11 am
Location: Finland

Re: MC Modding Beginner Here ^.^

Post by Urian »

Try switching textures between blocks? I've never tried to make any modifications to the code myself and I only know html and some VB so you probably know more about it already than I do :)
FlowerChild: Ice in deserts is a good idea
JWA
Posts: 74
Joined: Tue Jul 05, 2011 4:34 am

Re: MC Modding Beginner Here ^.^

Post by JWA »

Well I don't know the first thing about whats possible with it, but can you make one thing behave like another? For instance make lava flow like water, obsidian fall like sand, or some other such mischief?
User avatar
BinoAl
Posts: 2552
Joined: Mon Jul 04, 2011 9:39 pm
Location: Everywhere.

Re: MC Modding Beginner Here ^.^

Post by BinoAl »

JWA wrote:Well I don't know the first thing about whats possible with it, but can you make one thing behave like another? For instance make lava flow like water, obsidian fall like sand, or some other such mischief?
Thats generally what ive been working toward. My biggest issue is i cant WRITE the actual code, but i catch on really quick modifying more and more of it, until i basically am just writing the code. Thats how i learned the admittedly small amount of vb i know :D
Image
Haidaes
Posts: 187
Joined: Sun Jul 17, 2011 9:29 am

Re: MC Modding Beginner Here ^.^

Post by Haidaes »

Maybe make your own block and try to affect the placing of it (eg. making one side always face you when placed). You could at first mess around with the north/south/east/west placing (like the forge block) then expand on it by upwards/downwards (pistons). Then maybe play around with the properties and later the properties of each of the 6 sides? From there on you should be able to do most of the interesting stuff. I guess the interaction by rightclicking on it and custom GUIs would come in handy as well.
User avatar
darahalian
Posts: 578
Joined: Mon Jul 04, 2011 9:57 pm

Re: MC Modding Beginner Here ^.^

Post by darahalian »

One of the best ways to learn is by example. There are lots of good examples in the code to let you get an idea of how things work. The only thing you can't find as an example in the code is how to use Modloader to add things like blocks and recipes without having to modify the base classes with those lists. If you don't mind looking at a quick tutorial, I found this thread on MCF to be quite useful in learning the basics of how to use Modloader for your mod, which is important to know if you want to be compatible with other mods.

A good example of directional placement code that I found is BlockPumpkin, since there isn't a whole lot of other stuff in that file to be confusing. Now that Forge is out, before you try getting into more advanced stuff, I would suggest looking at the forge code to see if it can handle some the harder stuff for you. I haven't done anything more complicated than modifying an existing block or creating a new one, though, so I don't have experience in any of the more advanced stuff or what Forge might be capable of. And I haven't done any modding recently, either, so I haven't looked at the Forge code myself yet.

But yeah, my advice would be to get familiar with Modloader, and probably Forge now as well if you want to do any serious modding. Look at existing code, even from other mods, as these examples are often the best way to learn about how things work.
FlowerChild wrote:Remain ever vigilant against the groth menace my friends. Early detection is crucial in avoiding a full-blown groth epidemic.
User avatar
HavokSCOUT
Posts: 514
Joined: Tue Jul 05, 2011 8:44 am
Location: Surrounded by creepers

Re: MC Modding Beginner Here ^.^

Post by HavokSCOUT »

Speaking of Modloader and the Forge, would you add those to the Jar before you deobfuscate it, or is there a special process to undertake?
Spoiler
Show
Brony, and proud of it
CheGiuAn wrote:ppl should have faith, not religion....
Katalliaan wrote:It's a tech shrub, more like
MagikEh wrote: D: THE SEEKRET OF SYRUPEY BEAVER NIPPLES HAS BEEN EXPOSED!!! ABORT~!~!
User avatar
sargunv
Site Admin
Posts: 557
Joined: Mon Nov 22, 2010 11:46 am
Location: Seattle, WA, USA

Re: MC Modding Beginner Here ^.^

Post by sargunv »

HavokSCOUT wrote:Speaking of Modloader and the Forge, would you add those to the Jar before you deobfuscate it, or is there a special process to undertake?
Add modloader to the jar, then use MCP to decompile and deoobfuscate. Then use the install.bat for Forge if you're on windows, or manually install the Forge patch (using terminal) if you're on Mac or Linux.
User avatar
HavokSCOUT
Posts: 514
Joined: Tue Jul 05, 2011 8:44 am
Location: Surrounded by creepers

Re: MC Modding Beginner Here ^.^

Post by HavokSCOUT »

For setting java as my path, in the path line under environments, it is entered as ";C:\Program Files\Java\jre7\bin", but when I try to run Javac in cmd, it says that javac is not recognized as a command. Is there something that I am missing?

EDIT: I ran java in the cmd for shits and giggles, and it worked, so I don't know why java will work but not javac.
Spoiler
Show
Brony, and proud of it
CheGiuAn wrote:ppl should have faith, not religion....
Katalliaan wrote:It's a tech shrub, more like
MagikEh wrote: D: THE SEEKRET OF SYRUPEY BEAVER NIPPLES HAS BEEN EXPOSED!!! ABORT~!~!
PatrickSJ
Posts: 302
Joined: Thu Jul 07, 2011 3:00 am

Re: MC Modding Beginner Here ^.^

Post by PatrickSJ »

I wouldn't use Java 7 for compiling minecraft mods. Minecraft is compiled against 1.5; most mods are 1.6; any user that doesn't have 1.7 won't be able to use your mods.

Be sure to use javac -target 1.6
User avatar
HavokSCOUT
Posts: 514
Joined: Tue Jul 05, 2011 8:44 am
Location: Surrounded by creepers

Re: MC Modding Beginner Here ^.^

Post by HavokSCOUT »

Thanks for the tip. Anyways, I solved my problem; I had installed java in program files, not the C: drive, so every tutorial assumed that it was on the C: drive, while mine was in the program folder, and I just finished the Hello World program.

Should SE 6 update 27 be appropriate for modding?
Spoiler
Show
Brony, and proud of it
CheGiuAn wrote:ppl should have faith, not religion....
Katalliaan wrote:It's a tech shrub, more like
MagikEh wrote: D: THE SEEKRET OF SYRUPEY BEAVER NIPPLES HAS BEEN EXPOSED!!! ABORT~!~!
PatrickSJ
Posts: 302
Joined: Thu Jul 07, 2011 3:00 am

Re: MC Modding Beginner Here ^.^

Post by PatrickSJ »

HavokSCOUT wrote: Should SE 6 update 27 be appropriate for modding?
Yep.
User avatar
HavokSCOUT
Posts: 514
Joined: Tue Jul 05, 2011 8:44 am
Location: Surrounded by creepers

Re: MC Modding Beginner Here ^.^

Post by HavokSCOUT »

Does anyone know how the powered creeper gets its flames from the armor? It would really help out on a mod that I am making.
Spoiler
Show
Brony, and proud of it
CheGiuAn wrote:ppl should have faith, not religion....
Katalliaan wrote:It's a tech shrub, more like
MagikEh wrote: D: THE SEEKRET OF SYRUPEY BEAVER NIPPLES HAS BEEN EXPOSED!!! ABORT~!~!
User avatar
gftweek
Posts: 674
Joined: Thu Jul 07, 2011 5:33 pm

Re: MC Modding Beginner Here ^.^

Post by gftweek »

There is a separate "charged" armour texture that is applied over creepers when they are hit by lighting, it's in the same folder as the other armours. Or did you mean how the armour overlay is applied to the creeper object from a code point of view, because I have no idea.
User avatar
HavokSCOUT
Posts: 514
Joined: Tue Jul 05, 2011 8:44 am
Location: Surrounded by creepers

Re: MC Modding Beginner Here ^.^

Post by HavokSCOUT »

Unfortunately, the second sentence is the correct one, from a code P.O.V.
Spoiler
Show
Brony, and proud of it
CheGiuAn wrote:ppl should have faith, not religion....
Katalliaan wrote:It's a tech shrub, more like
MagikEh wrote: D: THE SEEKRET OF SYRUPEY BEAVER NIPPLES HAS BEEN EXPOSED!!! ABORT~!~!
Post Reply