Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

[1.5] [WIP (again)] Deverion's Forge Modding Tutorials [Updated 16-03-2013] [1.5 Tutorials: 1!]

modding minecraftforge tutorial smp

  • Please log in to reply
845 replies to this topic

#1

DeverionX
  • Minecraft: DeverionZ

Posted 27 August 2012 - 05:42 PM

*
POPULAR

Deverion's Forge
Modding Tutorials:

Hey everyone, I just wanted to make this thread to help people with making mods Posted Image Enjoy these tuts and give feedback, they should be able to take you from the basics to some fairly advanced work.

PLEASE: Make sure you have at least a basic java knowledge before beginning on minecraft modding, you'll just get confused and find it hard to make interesting content. I recommend TheNewBoston, yes, it is a lot of tutorials, but he is a VERY good teacher Posted Image

To see the code used for this tutorial, visit the github, and also, don't try to change stuff, I'm a major github noob and I'll probably freak out xD

I'm not just going to solve any problems you give me, if you have a legitimate problem, ask around elsewhere on the forums, I'm not here to write your mod for you. Note that you can also ask for help at the forge forums, the community over there is cool. I will, btw, help with requests for how to add content, suggestions for tutorials, and things I should add to my tutorials.

Required programs: Content:

1.5:
  • Setting up mcp
1.4.7:
  • Setting up your mod
  • Creating your first basic item
  • Creating items with metadata
  • Recipes, smelting and custom fuel
  • Custom creative mode tabs
  • Creating your first basic block
  • Creating blocks with metadata
  • Ore generation
  • Updating past 1.4.5
  • Special item effects
  • Using the ore dictionary
  • Distributing your mod! (Make sure you have a config first)
  • Using metadata items for tab icon
  • Using the ore dictionary pt.2
  • Updating to 1.4.7
  • Using the ore dictionary pt.3
  • Making items get damaged when used in crafting
  • Creating transparent blocks
  • Creating custom swords
  • Creating custom tools
  • Making your blocks get broken by a specific tool level
  • Creating configuration files
Coming Soon:
  • Special block effects!
  • Crops!
  • Redstone interaction!
  • Basic tile entities and GUI's!
  • Custom trees!
  • Basic entities!
  • Special entity abilities!
  • Custom packets!
  • Advanced tile entities!
  • Special event hooks!
  • Custom liquids!
  • Liquid storage!
  • Liquid dictionary!
  • Custom stairs/slabs
  • ...and stuff (and things)!!
Tutorials:

1.5:

Setting up MCP:
Spoiler:

1.4.7:

Starting you mod:
Spoiler:

Creating your first basic item:
Spoiler:

Creating Metadata items:
Spoiler:

Recipes, smelting and fuel:
Spoiler:

Custom creative mode tabs:
Spoiler:

Creating your first basic block:
Spoiler:

Creating blocks with metadata:
Spoiler:

Ore Generation:
Spoiler:

Updating past 1.4.5
Spoiler:


Special item effects:
Spoiler:

Using the ore dictionary:
Spoiler:

Distributing your mod!:
Spoiler:

Using metadata items for tab icon:
Spoiler:

Using the ore dictionary, pt 2:
Spoiler:

Updating to 1.4.7
Spoiler:

Using the ore dictionary pt.3: Other methods:
Spoiler:

Making items get damaged when used in crafting:
Spoiler:

Creating transparent blocks:
Spoiler:

Creating custom swords
Spoiler:

Creating custom tools:
Spoiler:

Making your ores get broken by a specific mining level:
Spoiler:

Creating configuration files:
Spoiler:




Register or log in to remove.

#2

DeverionX
  • Minecraft: DeverionZ

Posted 27 August 2012 - 07:33 PM

On another note, I'm hoping to have at least 2-3 tutorials out per day, so keep an eye on the thread

#3

DarkElfAlbain
  • Location: U.S.A.
  • Minecraft: VenomBlood4
  • Xbox:codyak99

Posted 27 August 2012 - 07:39 PM

liiike it! Keep it up for sure!
You don't know whom you're dealing with.

#4

DeverionX
  • Minecraft: DeverionZ

Posted 27 August 2012 - 07:40 PM

View PostDarkElfAlbain, on 27 August 2012 - 07:39 PM, said:

liiike it! Keep it up for sure!

I have no plans of stopping any time soon :)

#5

Apostolique

Posted 27 August 2012 - 11:56 PM

Great tutorial so far! I managed to get your example mod to compile and I'm able to see the item in game. I did notice a couple things though that could have stopped people less experienced with Eclipse.

When I loaded the Eclipse folder for the first time, all the imports were messed up. I believe the build path variable "MCP_LOC" was not set and it defaulted to my home directory. (I'm using Linux so I'm not sure if it does that in other systems.) Since I couldn't figure out how to set the build path variable correctly, I ended up hard-coding all the relative paths to absolute ones.
(In Eclipse's Java Build Path, there is a tab named "Source" and "Libraries". Everything listed in those two tabs were not pointing to the right path.)
Posted Image
I know but one freedom, and that is the freedom of the mind. - Antoine de Saint-Exupery

#6

DeverionX
  • Minecraft: DeverionZ

Posted 28 August 2012 - 05:44 AM

View PostApostolique, on 27 August 2012 - 11:56 PM, said:

Great tutorial so far! I managed to get your example mod to compile and I'm able to see the item in game. I did notice a couple things though that could have stopped people less experienced with Eclipse.

When I loaded the Eclipse folder for the first time, all the imports were messed up. I believe the build path variable "MCP_LOC" was not set and it defaulted to my home directory. (I'm using Linux so I'm not sure if it does that in other systems.) Since I couldn't figure out how to set the build path variable correctly, I ended up hard-coding all the relative paths to absolute ones.
(In Eclipse's Java Build Path, there is a tab named "Source" and "Libraries". Everything listed in those two tabs were not pointing to the right path.)

OK, that is very strange, right now I can't do much, but I'll investigate it more later on a Linux system Posted Image

EDIT: I can't actually find an MCP_LOC...

#7

OtakuD
    OtakuD

    Coal Miner

  • Members
  • 106 posts
  • Location: South Africa

Posted 28 August 2012 - 08:35 AM

Excellent work, hope there is more soon, thanks! :D

#8

DeverionX
  • Minecraft: DeverionZ

Posted 28 August 2012 - 12:36 PM

View PostOtakuD, on 28 August 2012 - 08:35 AM, said:

Excellent work, hope there is more soon, thanks! Posted Image

Sure thing :) Putting up a tutorial now

#9

DeverionX
  • Minecraft: DeverionZ

Posted 28 August 2012 - 01:45 PM

Tutorial 4:Items with metadata is now up, take a look :)

#10

DeverionX
  • Minecraft: DeverionZ

Posted 28 August 2012 - 03:15 PM

Tutorial 5: Adding shaped recipes, shapeless recipes and smelting has been added

#11

Apostolique

Posted 28 August 2012 - 05:13 PM

I tested everything in tutorial 4 and 5 and it all works in game. Kudo for making a written tutorial that's easy to follow. Posted Image

View PostDeverionX, on 28 August 2012 - 05:44 AM, said:

OK, that is very strange, right now I can't do much, but I'll investigate it more later on a Linux system Posted Image

EDIT: I can't actually find an MCP_LOC...
Don't worry about it, it must have been an error on my part.

Edit: I was wondering, I noticed that I was able to stack Sapphire, Amethyst and Topaz in the same pile. Is that because they share the same id number? and is it the downside with "Items with Metadata"?

Also, what does "better compatibility" mean in "Metadata allows you to have multiple items/blocks in one ID, which allows for better compatibility"?
Posted Image
I know but one freedom, and that is the freedom of the mind. - Antoine de Saint-Exupery

#12

DeverionX
  • Minecraft: DeverionZ

Posted 28 August 2012 - 05:36 PM

View PostApostolique, on 28 August 2012 - 05:13 PM, said:

I tested everything in tutorial 4 and 5 and it all works in game. Kudo for making a written tutorial that's easy to follow. Posted Image


Don't worry about it, it must have been an error on my part.

Edit: I was wondering, I noticed that I was able to stack Sapphire, Amethyst and Topaz in the same pile. Is that because they share the same id number? and is it the downside with "Items with Metadata"?

Also, what does "better compatibility" mean in "Metadata allows you to have multiple items/blocks in one ID, which allows for better compatibility"?

The gems stacking is something I forgot to add in the tutorial, but I've put it in now, just add setHasSubtypes(true); in the constructor

By better compatibility I mean that it will take up less ID's used by other mods, this isn't really such a big issue with items considering how many available item ID's there are, but it is a problem with the very limited number of block ID's (though forge does add 4096 block id fix, they still run out pretty quick) and also if you don't have a config file (tutorial coming soon Posted Image)

#13

Apostolique

Posted 28 August 2012 - 05:41 PM

View PostDeverionX, on 28 August 2012 - 05:36 PM, said:

The gems stacking is something I forgot to add in the tutorial, but I've put it in now, just add setHasSubtypes(true); in the constructor

That was fast! Posted Image And it works! :)
Posted Image
I know but one freedom, and that is the freedom of the mind. - Antoine de Saint-Exupery

#14

DeverionX
  • Minecraft: DeverionZ

Posted 28 August 2012 - 05:43 PM

View PostApostolique, on 28 August 2012 - 05:41 PM, said:

That was fast! Posted Image And it works! Posted Image

Posted Image No problem, I noticed a new email in my inbox and checked it out Posted Image

#15

DeverionX
  • Minecraft: DeverionZ

Posted 28 August 2012 - 07:38 PM

Part 6: Your first block with Forge's infinite sprite indexes is now up, take a look :)

#16

Apostolique

Posted 28 August 2012 - 10:47 PM

I noticed a typo in your latest tutorial ("Your first block with Forge's infinite sprite index"):

There is an extra comma after the last "new" keyword:

Quote

GameRegistry.addRecipe(new ItemStack(gemBlock,1), "ZXC","ZVC","ZXC", Character.valueOf('Z'), ruby, Character.valueOf('X'), new ItemStack(metaGem,1,1),Character.valueOf('C'), new ItemStack(metaGem,1,0), Character.valueOf('V'),new,ItemStack(metaGem,1,2));

Otherwise, everything works well and I was able to craft the block.
Posted Image
I know but one freedom, and that is the freedom of the mind. - Antoine de Saint-Exupery

#17

brennantheboss5000

Posted 29 August 2012 - 02:23 AM

Hey following your forge modding tutorials, looking great! Its great to see someone do a forge modding tutorial instead of just mod loader. 1 Question, for the meta-data tutorial, the instructions there are different than the source from tutorials 5 and 6 which have the same class's. There is no "Private string" line in the source's of tutorials 5 and 6 and a couple of other different things. Which should I follow the code from, the source from tutorials 5 and 6 or the tutorial itself, since the source from 5 and 6 is more recent than tutorial 4 i'm going to assume the source from the more recent tutorials is correct unless you reply to this.

Thanks again,
Brennan

#18

DeverionX
  • Minecraft: DeverionZ

Posted 29 August 2012 - 05:28 AM

View PostApostolique, on 28 August 2012 - 10:47 PM, said:

I noticed a typo in your latest tutorial ("Your first block with Forge's infinite sprite index"):

There is an extra comma after the last "new" keyword:


Otherwise, everything works well and I was able to craft the block.

Oops, the forum was doing weird things with displaying the code and I accidentally messed it up, will fix now


View Postbrennantheboss5000, on 29 August 2012 - 02:23 AM, said:

Hey following your forge modding tutorials, looking great! Its great to see someone do a forge modding tutorial instead of just mod loader. 1 Question, for the meta-data tutorial, the instructions there are different than the source from tutorials 5 and 6 which have the same class's. There is no "Private string" line in the source's of tutorials 5 and 6 and a couple of other different things. Which should I follow the code from, the source from tutorials 5 and 6 or the tutorial itself, since the source from 5 and 6 is more recent than tutorial 4 i'm going to assume the source from the more recent tutorials is correct unless you reply to this.

Thanks again,
Brennan

It doesn't really matter which one you do, I'll take it out of the tutorial for consistency's sake, but it doesn't really matter, I just prefer the method that I've used in the 5+6 source code  :)

#19

Veritas_somnium

Posted 29 August 2012 - 09:21 AM

View PostDeverionX, on 27 August 2012 - 07:33 PM, said:

On another note, I'm hoping to have at least 2-3 tutorials out per day, so keep an eye on the thread

this is god send, i can teach myself java and learn to mod minecraft at the same time, i'll be following your posts.

#20

Deathwind31
  • Location: Greece
  • Minecraft: Deathwind_21

Posted 29 August 2012 - 10:27 AM

Please keep up these tuts! You help me a lot!
Posted Image