Jump to content

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

[Modding][ModLoader][Forge API] Jotamota's Tutorials!!!


  • Please log in to reply
64 replies to this topic

#1

Jotamota
    Jotamota

    Diamond Miner

  • Members
  • 746 posts
  • Location: Brasil
  • Minecraft: Jotamota

Posted 08 January 2012 - 07:21 PM

*
POPULAR

Intro!!!

So, I'm not a experienced modder, I must say, BUT I have some experience with Java and mostly codding Minecraft. I've been a coder on Minecraft for 2 months, and I've learned SO MUCH. Since I'm not the MASTER OF ALL CODES I'll only teach what I REALLY know. Meaning I'll try only to teach what I can back up.
I try also to explain things so people won't just copy and paste, but really understand what I do and why did I do it.

So, lets get on shall we?


Table of Contents


ModLoader Tutorials!!!

Tutorial I:How to make metadata-Items! (like ItemDye!!!)
Difficulty: Begginer

Spoiler:

Tutorial II:How to generate structures(using loops and not line-by-line generation)!
Difficulty: Intermediate

Spoiler:

More tutorials on their way!!!

Forge Tutorials!!!

Tutorial I:How to index infinite texture and how to smelt metadata items! (like ItemDye!!!)
Difficulty: Begginer

Spoiler:

Tutorial II:How to multi-texture a block with Forge's infinite indexing of sprites!
Difficulty: Begginer
Spoiler:

More Tutorials to come!!!
Posted Image

Register or log in to remove.

#2

callofcrafters

Posted 08 January 2012 - 08:18 PM

i know your not 'advanced' but you say


to make the item we use this:

(code)


try explaining why you use this, it will help you and people reading it
Posted Image

#3

Jotamota
    Jotamota

    Diamond Miner

  • Members
  • 746 posts
  • Location: Brasil
  • Minecraft: Jotamota

Posted 08 January 2012 - 10:15 PM

Forge Tutorials!!!

Tutorial III:How to create multi-blocks using the same ID with metadata and Forge's texture indexing!
Difficulty: Begginer

Spoiler:

More tutorials on their way!

Posted Image

#4

KMeister
    KMeister

    Diamond Miner

  • Members
  • 829 posts
  • Location: Somewhere in South America...
  • Minecraft: KMEISTER

Posted 09 January 2012 - 03:38 AM

These look really good!

#5

Jotamota
    Jotamota

    Diamond Miner

  • Members
  • 746 posts
  • Location: Brasil
  • Minecraft: Jotamota

Posted 10 January 2012 - 12:58 PM

I'm thinking about doing a Intermediate tutorial for BlockRendering. I must first study a bit over it to prevent any bugs that are quite common when working with that. :) Stay tuned for more!
Posted Image

#6

KMeister
    KMeister

    Diamond Miner

  • Members
  • 829 posts
  • Location: Somewhere in South America...
  • Minecraft: KMEISTER

Posted 10 January 2012 - 10:32 PM

You should make an EPIC OUTRO! :D

#7

Jotamota
    Jotamota

    Diamond Miner

  • Members
  • 746 posts
  • Location: Brasil
  • Minecraft: Jotamota

Posted 10 January 2012 - 11:03 PM

View PostKMeister, on 10 January 2012 - 10:32 PM, said:

You should make an EPIC OUTRO! :D

The only reason I'm not already doing the RenderBLocks tutorial is that I'm having some bugs and I don't wanna teach people the wrong thing.
Posted Image

#8

KMeister
    KMeister

    Diamond Miner

  • Members
  • 829 posts
  • Location: Somewhere in South America...
  • Minecraft: KMEISTER

Posted 10 January 2012 - 11:20 PM

View PostJotamota, on 10 January 2012 - 11:03 PM, said:

The only reason I'm not already doing the RenderBLocks tutorial is that I'm having some bugs and I don't wanna teach people the wrong thing.
Cool!

PS: do you know how to install forge on a mac?

#9

bioxx
    bioxx

    Redstone Miner

  • Members
  • 524 posts

Posted 11 January 2012 - 05:05 PM

might be a good idea to use a switch in getIconFromDamage instead of if/elseif blocks since it increases readability. Not everyone may know about switches if they are new to programming. It's personal preference I suppose, but it seems like a good idea to me :)
Posted Image

#10

Jotamota
    Jotamota

    Diamond Miner

  • Members
  • 746 posts
  • Location: Brasil
  • Minecraft: Jotamota

Posted 11 January 2012 - 05:14 PM

View Postbioxx, on 11 January 2012 - 05:05 PM, said:

might be a good idea to use a switch in getIconFromDamage instead of if/elseif blocks since it increases readability. Not everyone may know about switches if they are new to programming. It's personal preference I suppose, but it seems like a good idea to me :)


I'll use the switch method on my next tutorial. THanks for the tip!
Posted Image

#11

KMeister
    KMeister

    Diamond Miner

  • Members
  • 829 posts
  • Location: Somewhere in South America...
  • Minecraft: KMEISTER

Posted 11 January 2012 - 06:27 PM

The multi textured block didn't work for me :( the normal sides were right but the top and bottom were wood and grass. *facealm*

I forgot to implement ITextureProvider. Will try again now

#12

KMeister
    KMeister

    Diamond Miner

  • Members
  • 829 posts
  • Location: Somewhere in South America...
  • Minecraft: KMEISTER

Posted 11 January 2012 - 07:35 PM

It now works :D

#13

Kazemc95

Posted 13 January 2012 - 03:04 PM

Are you going to continue making tutorials? If yes, please, make advanced - pro tutorials !!
If I helped please be thankful and press the awesom " + " button :D

#14

Jotamota
    Jotamota

    Diamond Miner

  • Members
  • 746 posts
  • Location: Brasil
  • Minecraft: Jotamota

Posted 14 January 2012 - 01:15 PM

View PostKazemc95, on 13 January 2012 - 03:04 PM, said:

Are you going to continue making tutorials? If yes, please, make advanced - pro tutorials !!

Well, what tutorial would you like to see?

I may do a HOW TO GENERATE STRUCTURES soon enough. It will be INTERMEDIATE.
Posted Image

#15

KosmosPrime
  • Minecraft: p4x989

Posted 15 January 2012 - 07:15 AM

Ok i have the problem that if i make 2 item classes and use private String[] names, i have to use different strings for the names. (NOT just private String[] names = new String[]{"0", "1", "2", "3"}; every time)
Is there a way to avoid this? (like setting the name to itemId + damage toString)

#16

Jotamota
    Jotamota

    Diamond Miner

  • Members
  • 746 posts
  • Location: Brasil
  • Minecraft: Jotamota

Posted 15 January 2012 - 05:29 PM

View PostEmpirion, on 15 January 2012 - 07:15 AM, said:

Ok i have the problem that if i make 2 item classes and use private String[] names, i have to use different strings for the names. (NOT just private String[] names = new String[]{"0", "1", "2", "3"}; every time)
Is there a way to avoid this? (like setting the name to itemId + damage toString)

You need to comment the line that says the damage. As in my code, that line is not supposed to be runned with the rest of code. I've putted that there for quick reference to each item's damage instead of counting it everytime. Comment that line and you should be fine.
Posted Image

#17

KMeister
    KMeister

    Diamond Miner

  • Members
  • 829 posts
  • Location: Somewhere in South America...
  • Minecraft: KMEISTER

Posted 16 January 2012 - 12:55 AM

That generation tutorial looks pretty neat. I've always wondered how to generate structures with loops.

#18

WildYojimbo
  • Location: In the Wild, carpentering...
  • Minecraft: WildYojimbo

Posted 16 January 2012 - 07:25 PM

These tutorials helped a ton. Thanks!
Posted Image

#19

lightOfDay

Posted 17 January 2012 - 05:23 PM

Is there a reason to use set/get Metadata or damage instead of just a private variable?

#20

Kazemc95

Posted 17 January 2012 - 07:58 PM

View PostJotamota, on 14 January 2012 - 01:15 PM, said:

Well, what tutorial would you like to see?

I may do a HOW TO GENERATE STRUCTURES soon enough. It will be INTERMEDIATE.

Easy... Could you explain, and i said EXPLAIN how to make a custom furnace with multiple outputs/ inputs ?
You will make me happy ;)
If I helped please be thankful and press the awesom " + " button :D