158
Hey everyone. today I'm going to be showing you how to make a new recipe. We are going to be making a dirt to diamond recipe.Lets get started
here is #3 http://www.planetminecraft.com/blog/modding-tutorials-3-blocks/
*DO NOT POST THIS ONE ON PLANET MINECRAFT. EASY MODS ARE NOT ALLOWED ON PMC*
getting eclipse ready to code
first open your modding folder
then go into your eclipse folder
double click on the eclipse application
when it opens click browse (or search depending on your eclipse version)
then open your modding folder,mcp,and then click once on the eclipse folder IN MCP NOT THE ACCTUAL ONE
then click on workbench (not minecraft workbench) in the top right/ hand corner
once you have chosen that you will know you did it right because a client folder and a server folder will appear.
click client, then src, then net.minecraft.src
those are all of the files that make up minecraft
then click 1 time on one of the class files
then right click
click new --> class
name it mod_YOURMODSNAME
then click finish
it should make a new class with this in it
package net.minecraft.src;
public class mod_YOURMODSNAME {
}
first thing we do is make the mod use things from the classes in modloader.
we do that by changing the third line from
public class mod_YOURMODSNAME {
to
public class mod_YOURMODSNAME extends basemod {
all mod_ classes have to have 2 methods getversion and load
getversion basically asks minecraft what version is this? and minecraft will respond.
and sorry but I'm not sure what load does, but I do know that you need it in all mod_ classes
after those are done it will look like this
package net.minecraft.src;
public class mod_YOURMODSNAME extends BaseMod{
@Override
public String getVersion() {
return null;
}
@Override
public void load() {
}
}
now that we have got all the essentials we can make the recipe
this is the acctual recipe and an explanation of it
ModLoader.addRecipe(new ItemStack(Item.diamond, 64)
this is saying hey modloader I have a new recipe for you its going to make 64 diamond
new Object[] {"000", "000", "000", Character.valueOf('0'), Block.dirt});
this is saying here is how you make the diamond. dirt= 0 and you make it by putting dirt in every square.
Here is the whole thing together
package net.minecraft.src;
public class mod_YOURMODSNAME extends BaseMod{
@Override
public String getVersion() {
return null;
}
@Override
public void load() {
ModLoader.addRecipe(new ItemStack(Item.diamond, 64), new Object[] {"000", "000", "000", Character.valueOf('0'), Block.dirt});
}
}
thanks for reading. Leave any error code in the comments along with suggestions for new tutorials. and as always diamond and subscribe!!!
also this won't be weekly anymore. Probably more like bi-tri weekly now.
here is #3 http://www.planetminecraft.com/blog/modding-tutorials-3-blocks/
*DO NOT POST THIS ONE ON PLANET MINECRAFT. EASY MODS ARE NOT ALLOWED ON PMC*
getting eclipse ready to code
first open your modding folder
then go into your eclipse folder
double click on the eclipse application
when it opens click browse (or search depending on your eclipse version)
then open your modding folder,mcp,and then click once on the eclipse folder IN MCP NOT THE ACCTUAL ONE
then click on workbench (not minecraft workbench) in the top right/ hand corner
once you have chosen that you will know you did it right because a client folder and a server folder will appear.
click client, then src, then net.minecraft.src
those are all of the files that make up minecraft
then click 1 time on one of the class files
then right click
click new --> class
name it mod_YOURMODSNAME
then click finish
it should make a new class with this in it
mod starting text
package net.minecraft.src;
public class mod_YOURMODSNAME {
}
first thing we do is make the mod use things from the classes in modloader.
we do that by changing the third line from
public class mod_YOURMODSNAME {
to
public class mod_YOURMODSNAME extends basemod {
all mod_ classes have to have 2 methods getversion and load
getversion basically asks minecraft what version is this? and minecraft will respond.
and sorry but I'm not sure what load does, but I do know that you need it in all mod_ classes
after those are done it will look like this
mod step 2
package net.minecraft.src;
public class mod_YOURMODSNAME extends BaseMod{
@Override
public String getVersion() {
return null;
}
@Override
public void load() {
}
}
now that we have got all the essentials we can make the recipe
this is the acctual recipe and an explanation of it
ModLoader.addRecipe(new ItemStack(Item.diamond, 64)
this is saying hey modloader I have a new recipe for you its going to make 64 diamond
new Object[] {"000", "000", "000", Character.valueOf('0'), Block.dirt});
this is saying here is how you make the diamond. dirt= 0 and you make it by putting dirt in every square.
Here is the whole thing together
mod finished
package net.minecraft.src;
public class mod_YOURMODSNAME extends BaseMod{
@Override
public String getVersion() {
return null;
}
@Override
public void load() {
ModLoader.addRecipe(new ItemStack(Item.diamond, 64), new Object[] {"000", "000", "000", Character.valueOf('0'), Block.dirt});
}
}
thanks for reading. Leave any error code in the comments along with suggestions for new tutorials. and as always diamond and subscribe!!!
also this won't be weekly anymore. Probably more like bi-tri weekly now.
Tags |
826794
6
Create an account or sign in to comment.