When I started modding, back in September last year, I would watch HenryTheCoder's tutorials (I don't recommend watching them, they are quite old), and I would constantly get errors so I would, I guess you could say 'spam' the mod development forum asking for help. I learnt from the people who told me how to fix the errors.
That was back then though, now I just learn how to do things from the source code. Like just now I figured out how to use metadata when generating structures naturally with the world. I looked at the stronghold code, looked at how it uses metadata to generate mossy and cracked stone brick(I'm doing the same thing), then applied that to a method I was using. So I went from using this:
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Hey, sorry if I missed something insanely obvious (I started modding two days ago) but how do you make a block drop an item?
package net.minecraft.src;
import java.util.Random;
public class BlockExample extends Block
{
public BlockExample(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random)
{
return mod_ExampleBlock.(ITEM NAME HERE).shiftedIndex;
}
}
The main part you need is:
return mod_ExampleBlock.(ITEM NAME HERE).shiftedIndex;
Hope this helped.
Hey TechGuy, I would like to request a tutorial on how the Lever block works. I have been having a hard time trying to duplicate it and make a similar one that works just like it.
TECHGUYS i relay need help i have done exacley the same code as you i have obviously add what i need to add were you say to add it but when i load up the mod in eclips it works other than white charters but when i put my mod in my minecraft.jar file minecraft crashes and i relay relay relay need help and so far you guys are the best a explaining so can u plz help me
TECHGUYS i relay need help i have done exacley the same code as you i have obviously add what i need to add were you say to add it but when i load up the mod in eclips it works other than white charters but when i put my mod in my minecraft.jar file minecraft crashes and i relay relay relay need help and so far you guys are the best a explaining so can u plz help me
p.s i do add modloader and i do delete META-INF
Did you reobfuscate before you put it in the jar?
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
TECHGUYS i relay need help i have done exacley the same code as you i have obviously add what i need to add were you say to add it but when i load up the mod in eclips it works other than white charters but when i put my mod in my minecraft.jar file minecraft crashes and i relay relay relay need help and so far you guys are the best a explaining so can u plz help me
p.s i do add modloader and i do delete META-INF
Just wondering, before you put the mods into your minecraft.jar file, you run the re-obfuscate file in the MCP folder right?
Hey TechGuy, I would like to request a tutorial on how the Lever block works. I have been having a hard time trying to duplicate it and make a similar one that works just like it.
Added to the list
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I'd love not just a bow tutorial, but an entire gun tutorial. (Works about the same way)
I think with guns the only differences would be projectile velocity, the projectile effects (exploding...ect), and well crafting said gun and projectiles.
Alright so I made my own custom mob using Techne and I got it to work and all I even see it in game with its skin there is just one problem. He does not have a walking animation.
Put the setRotationAngles method from ModelQuadruped into your Model class, removing the old one. Then just change the names of the limbs.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
To post a comment, please login or register a new account.
That was back then though, now I just learn how to do things from the source code. Like just now I figured out how to use metadata when generating structures naturally with the world. I looked at the stronghold code, looked at how it uses metadata to generate mossy and cracked stone brick(I'm doing the same thing), then applied that to a method I was using. So I went from using this:
to using this
I am then generating cracked stone brick instead of normal stone brick.
I think it does take a bit of experience and skill to look at the source code and analyse what it does, but asking questions doesn't hurt :smile.gif:
(If I'm totally stumped on something though, I do ask a good modder for help)
together they are powerful beyond imagination."
together they are powerful beyond imagination."
package net.minecraft.src; import java.util.Random; public class BlockExample extends Block { public BlockExample(int i, int j) { super(i, j, Material.rock); } public int idDropped(int i, Random random) { return mod_ExampleBlock.(ITEM NAME HERE).shiftedIndex; } }The main part you need is:
Hope this helped.
Hey TechGuy, I would like to request a tutorial on how the Lever block works. I have been having a hard time trying to duplicate it and make a similar one that works just like it.
p.s i do add modloader and i do delete META-INF
Did you reobfuscate before you put it in the jar?
together they are powerful beyond imagination."
Just wondering, before you put the mods into your minecraft.jar file, you run the re-obfuscate file in the MCP folder right?
Added to the list
together they are powerful beyond imagination."
:biggrin.gif: Awesome. I look forward to that in the future.
yes i reovuskated it so it becomes a .class file
The problem might be with the code of your files.
Post your code please and make sure you have Java 6 AND 7 installed.
together they are powerful beyond imagination."
I think with guns the only differences would be projectile velocity, the projectile effects (exploding...ect), and well crafting said gun and projectiles.
Can you help me?
Put the setRotationAngles method from ModelQuadruped into your Model class, removing the old one. Then just change the names of the limbs.
together they are powerful beyond imagination."
Glad I could help :smile.gif:
together they are powerful beyond imagination."