Slymask3's I love your tutorials. Can we get one on modifying existing blocks to do new things? I.E. Having grass drop something in addition to seeds or making stone harder to break.
And can we also have a tutorial on creating new mobs?
By the way SLYMASK3...Love your tutorials only ones that worked for me :biggrin.gif: and 1.8.1 :biggrin.gif: :biggrin.gif:
but next could you please make a tutorial on how to make tools?
I really need to know how :biggrin.gif:
I will give you :Diamond:'s
i can teach you that. pm me and i can send a message back with coding for it. also if you have something like skype that helps much more as i can show you the code myself.
Also so people know slymask3 isnt responding as he has taken a break from the tuts. i will still check and can help with every thing he currently has and more.
Here's what I did: I made my files in the src folder in mcp, then I opened up the .jar (I hadn't recompiled or anything, it was right after I had put my files in), then I put im my folder. When I recompiled there was a small error I think about one of my file, and then it couldnt find bin files for the client when I reobfuscated. Here's my code:
mod_DirtCraft.java
package net.minecraft.src;
public class mod_DirtCraft extends BaseMod
{
public static final Block dirtBrick = new BlockDirtBrick(ID, 256).setBlockName("dirtBrick").setHardness(1F).setResistance(5F);
public String Version()
{
return "1.0";
}
public mod_MODNAME ()
{
dirtBrick.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/DirtCraft/DirtBrick.png");
ModLoader.RegisterBlock(dirtBrick);
ModLoader.AddName(dirtBrick, "Dirt Brick");
}
}
DirtBrick.java
package net.minecraft.src;
public class BlockDirtbrick extends Block
{
protected BlockDirtbrick(int i, int j)
{
super(i, j, Material.ground);
}
}
Here's the recompiling error:
warning: [options] bootstrap class path not set in conjunction with -source 1.6
src/minecraft/net/minecraft/src/mod_DirtCraft.java:12: error invalid method declaration;
return type required public mod_MODNAME ()
Is my error that I put MODNAME? Lol.
EDIT: More errors... Is there a file that has them, because I'm writing them word for word from the cmd...
first you need your class to use for the new material.
open up EnumToolMaterial.java it should read
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
package net.minecraft.src;
public enum EnumToolMaterial
{
WOOD("WOOD", 0, 0, 59, 2.0F, 0),
STONE("STONE", 1, 1, 131, 4F, 1),
IRON("IRON", 2, 2, 250, 6F, 2),
EMERALD("EMERALD", 3, 3, 1561, 8F, 3),
GOLD("GOLD", 4, 0, 32, 12F, 0);
/*
public static EnumToolMaterial[] values()
{
return (EnumToolMaterial[])allToolMaterials.clone();
}
public static EnumToolMaterial valueOf(String s)
{
return (EnumToolMaterial)Enum.valueOf(net.minecraft.src.EnumToolMaterial.class, s);
}
*/
private EnumToolMaterial(String s, int i, int j, int k, float f, int l)
{
harvestLevel = j;
maxUses = k;
efficiencyOnProperMaterial = f;
damageVsEntity = l;
}
public int getMaxUses()
{
return maxUses;
}
public float getEfficiencyOnProperMaterial()
{
return efficiencyOnProperMaterial;
}
public int getDamageVsEntity()
{
return damageVsEntity;
}
public int getHarvestLevel()
{
return harvestLevel;
}
/*
public static final EnumToolMaterial WOOD;
public static final EnumToolMaterial STONE;
public static final EnumToolMaterial IRON;
public static final EnumToolMaterial EMERALD;
public static final EnumToolMaterial GOLD;
*/
private final int harvestLevel;
private final int maxUses;
private final float efficiencyOnProperMaterial;
private final int damageVsEntity;
// private static final EnumToolMaterial allToolMaterials[]; /* synthetic field */
/*
static
{
WOOD = new EnumToolMaterial("WOOD", 0, 0, 59, 2.0F, 0);
STONE = new EnumToolMaterial("STONE", 1, 1, 131, 4F, 1);
IRON = new EnumToolMaterial("IRON", 2, 2, 250, 6F, 2);
EMERALD = new EnumToolMaterial("EMERALD", 3, 3, 1561, 8F, 3);
GOLD = new EnumToolMaterial("GOLD", 4, 0, 32, 12F, 0);
allToolMaterials = (new EnumToolMaterial[] {
WOOD, STONE, IRON, EMERALD, GOLD
});
}
*/
}
Then make a new Java file called EnumToolMaterialExample.java where example is the name for the mod name. Copy this code into your new file. To make your own types change the public and private sections to the new type of name. For example
package net.minecraft.src;
public enum EnumToolMaterialpc
{
WOOD("WOOD", 0, 0, 59, 2.0F, 0),
STONE("STONE", 1, 1, 131, 4F, 1),
IRON("IRON", 2, 2, 250, 6F, 2),
EMERALD("EMERALD", 3, 3, 1561, 8F, 3),
GOLD("GOLD", 4, 0, 32, 12F, 0);
/*
public static EnumToolMaterial[] values()
{
return (EnumToolMaterial[])j.clone();
}
public static EnumToolMaterial valueOf(String s)
{
return (EnumToolMaterial)Enum.valueOf(net.minecraft.src.EnumToolMaterial.class, s);
}
*/
private EnumToolMaterialpc(String s, int i, int k, int l, float f, int i1)
{
// super(s, i);
harvestLevel = k;
maxUses = l;
efficiencyOnProperMaterial = f;
damageVsEntity = i1;
}
public int getMaxUses()
{
return maxUses;
}
public float getEfficiencyOnProperMaterial()
{
return efficiencyOnProperMaterial;
}
public int getDamageVsEntity()
{
return damageVsEntity;
}
public int getHarvestLevel()
{
return harvestLevel;
}
/*
public static final EnumToolMaterial WOOD;
public static final EnumToolMaterial STONE;
public static final EnumToolMaterial IRON;
public static final EnumToolMaterial EMERALD;
public static final EnumToolMaterial GOLD;
*/
private final int harvestLevel;
private final int maxUses;
private final float efficiencyOnProperMaterial;
private final int damageVsEntity;
// private static final EnumToolMaterial j[]; /* synthetic field */
/*
static
{
WOOD = new EnumToolMaterial("WOOD", 0, 0, 59, 2.0F, 0);
STONE = new EnumToolMaterial("STONE", 1, 1, 131, 4F, 1);
IRON = new EnumToolMaterial("IRON", 2, 2, 250, 6F, 2);
EMERALD = new EnumToolMaterial("EMERALD", 3, 3, 1561, 8F, 3);
GOLD = new EnumToolMaterial("GOLD", 4, 0, 32, 12F, 0);
j = (new EnumToolMaterial[] {
WOOD, STONE, IRON, EMERALD, GOLD
});
}
*/
}
It Ready to use; but you want your new material type dont you? to do that add a line of code like this:
PAPER("PAPER", 0, 0, 200, 2.5F, .5);
but dont forgot to change the semicolon on the gold to a slash
use the ints and their uses in the class to make the new type and its strength and all that. To use your new type you need to make a new sword.
public static Item PaperSword;
static
{
papersword = (new ItemSword(PaperSwordID, EnumToolMaterialpc.PAPER)).setItemName("PaperSword");
I also used the props thing i posted a tut for on the last page. To use the new type look at:
EnumTollMaterialpc.PAPER
this is the key piece of code. To use it take the name of your EnumToolMaterialExample and put that name in the first part of it then the actual material in all caps. Then Add the other things for the item like name, texture, ect. After that add your texture, recompile, and test it.
Here's the recompiling error:
warning: [options] bootstrap class path not set in conjunction with -source 1.6
src/minecraft/net/minecraft/src/mod_DirtCraft.java:12: error invalid method declaration;
return type required public mod_MODNAME ()
Is my error that I put MODNAME? Lol.
EDIT: More errors... Is there a file that has them, because I'm writing them word for word from the cmd...
..... you change modname to your modname, meaning change it to public mod_DirtCraft()
Here's the recompiling error:
warning: [options] bootstrap class path not set in conjunction with -source 1.6
src/minecraft/net/minecraft/src/mod_DirtCraft.java:12: error invalid method declaration;
return type required public mod_MODNAME ()
Is my error that I put MODNAME? Lol.
EDIT: More errors... Is there a file that has them, because I'm writing them word for word from the cmd...
More errors... Is there a file that has them, because I'm writing them word for word from the cmd...
Slymask3's I love your tutorials. Can we get one on modifying existing blocks to do new things? I.E. Having grass drop something in addition to seeds or making stone harder to break.
And can we also have a tutorial on creating new mobs?
i can make a tut if you have anything specific in mind to change. after knowing the base i can add to what i tell. i know a couple types of things you can do, like making creepers survive their explosions, them just not exploding, ice not melting, making mobs stronger or faster, making blocks speed you up and many more types. just mention something specific
Hey I checked out your tutorials. They're good but I was wondering something. I'm working on a mod where I need to used different color dyes in a crafting recipe. I saw something mentioned about it in the Shapeless Recipes section. But would the code look like this:
ModLoader.AddRecipe(new ItemStack(purpleRecord, 1), new Object[]{
" X ","XOX"," X ", Character.valueOf('X'), Item.dyePowder, 5, Character.valueOf('O'), blankRecord
});
What I did was. since I needed purple dye, I used Character.valueOf('X'), Item.dyePowder,5
since 5 is the damage value for purple. I'm not sure if this is right though.
And can we also have a tutorial on creating new mobs?
recompiling makes the code usable by the test client and reobing makes the java files into class files
I shall send Crawlers after you!
i can teach you that. pm me and i can send a message back with coding for it. also if you have something like skype that helps much more as i can show you the code myself.
I shall send Crawlers after you!
I shall send Crawlers after you!
Here's the recompiling error:
warning: [options] bootstrap class path not set in conjunction with -source 1.6
src/minecraft/net/minecraft/src/mod_DirtCraft.java:12: error invalid method declaration;
return type required public mod_MODNAME ()
Is my error that I put MODNAME? Lol.
EDIT: More errors... Is there a file that has them, because I'm writing them word for word from the cmd...
first you need your class to use for the new material.
open up EnumToolMaterial.java it should read
Then make a new Java file called EnumToolMaterialExample.java where example is the name for the mod name. Copy this code into your new file. To make your own types change the public and private sections to the new type of name. For example
It Ready to use; but you want your new material type dont you? to do that add a line of code like this:
but dont forgot to change the semicolon on the gold to a slash
use the ints and their uses in the class to make the new type and its strength and all that. To use your new type you need to make a new sword.
I also used the props thing i posted a tut for on the last page. To use the new type look at:
this is the key piece of code. To use it take the name of your EnumToolMaterialExample and put that name in the first part of it then the actual material in all caps. Then Add the other things for the item like name, texture, ect. After that add your texture, recompile, and test it.
I shall send Crawlers after you!
there should be no changes to this type of modding.
I shall send Crawlers after you!
..... you change modname to your modname, meaning change it to public mod_DirtCraft()
I shall send Crawlers after you!
More errors... Is there a file that has them, because I'm writing them word for word from the cmd...
Help!
ok, thanks...I don't need help with the tools anymore I followed MadcrazyDraumas Tut for it :biggrin.gif:
(sorry if i spelled his name wrong)
If I helped you press the little green plus.
i just told you how to fix em.
I shall send Crawlers after you!
i can make a tut if you have anything specific in mind to change. after knowing the base i can add to what i tell. i know a couple types of things you can do, like making creepers survive their explosions, them just not exploding, ice not melting, making mobs stronger or faster, making blocks speed you up and many more types. just mention something specific
I shall send Crawlers after you!
I fixed the MODNAME one...
I'm not stupid.
I'm getting like 5 errors now.
I don't want to type them letteer by letter.
Help
please
cant help without error list.
I shall send Crawlers after you!
Yes I'm double posting, but what?
What I did was. since I needed purple dye, I used Character.valueOf('X'), Item.dyePowder,5
since 5 is the damage value for purple. I'm not sure if this is right though.