I would like to request that you make a tutorial on how to make an item throwable. Also a more personal request: do you know how to give the bonemeal effect (of fertilizing) to an item.
-Thank You-
it worked thnks, can you make a tutorial on making blocks not have a collision box. (like snow)
Well, snow uses this method, so I guess it should work for all blocks. I'll test it and add it to the advanced block tutorial if it works. Let me no if it doesn't
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
{
int l = world.getBlockMetadata(i, j, k) & 7;
if (l >= 3)
{
return AxisAlignedBB.getBoundingBoxFromPool((double)i + minX, (double)j + minY, (double)k + minZ, (double)i + maxX, (float)j + 0.5F, (double)k + maxZ);
}
else
{
return null;
}
}
I would like to request that you make a tutorial on how to make an item throwable. Also a more personal request: do you know how to give the bonemeal effect (of fertilizing) to an item.
-Thank You-
Added to the list. If you look in ItemDye, at the onItemUse method on line 37, that whole method is for bonemeal. Just remove the
if (itemstack.getItemDamage() == 15)
statement and its brackets(leave everything thats inside the { }, but remove 'the brackets themselves), then put the code in your item file. If you are having trouble let me know and I'll give you a proper example.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
That piece of code makes the block bounce me away from it when i walk on it (Put a preassure plate on a fence and jump on the plates edges to achieve the same effect)
Oh, I'll keep trying a few different things and get back to you.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I need to create block almost same as leaves, but it can't decay. I tried to use code for the leaves and modify it, but whenever I place the new block, the blocks behind it don't render if placed directly next to it. Can you please post/PM how to correct it? :smile.gif:
1) Out of all the tut if seen u guys show how to make the mod but not where to put when ur done
Ex. The mod_file where do u put it and also in the src There are like lots of .java files 1 of them is the block.java and in it is all the blocks so do u have to add ur block to that file???
2) I think my code doesnt work so here plz check it
//Coded by Gamerz
package net.minecraft.src;
public class Name extends Block
{
public BlockName(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random, int j)
{
return mod_Name.Name.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}}
And the mod_file
package net.minecraft.src;
public class mod_Name extends BaseMod
{
public static final Name = (new BlockBedrockOre(1002, 0)).setHardness(3F).setResistance(5F).setStepSound(soundStoneFootstep).setBlockName("Name");
//I kept it name cuase i dont anyone knowing what mod im making
public void load()
{
Name.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Name/Name.png");
ModLoader.RegisterBlock(Namehere);
ModLoader.AddName(Name, "Name");
}
public String getVersion()
{
return "1.1";
}
}
Thx also if you could Make a tut on what to do after u have the mod files made thx
1) Out of all the tut if seen u guys show how to make the mod but not where to put when ur done
Ex. The mod_file where do u put it and also in the src There are like lots of .java files 1 of them is the block.java and in it is all the blocks so do u have to add ur block to that file???
2) I think my code doesnt work so here plz check it
//Coded by Gamerz
package net.minecraft.src;
public class Name extends Block
{
public BlockName(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random, int j)
{
return mod_Name.Name.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}}
And the mod_file
package net.minecraft.src;
public class mod_Name extends BaseMod
{
public static final Name = (new BlockBedrockOre(1002, 0)).setHardness(3F).setResistance(5F).setStepSound(soundStoneFootstep).setBlockName("Name");
//I kept it name cuase i dont anyone knowing what mod im making
public void load()
{
Name.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Name/Name.png");
ModLoader.RegisterBlock(Namehere);
ModLoader.AddName(Name, "Name");
}
public String getVersion()
{
return "1.1";
}
}
Thx also if you could Make a tut on what to do after u have the mod files made thx
You should pay more attention when reading tuts. You have a lot of mistakes there.
//Coded by Gamerz
package net.minecraft.src;
public class BlockBedrockOre extends Block
{
public BlockBedrockOre(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random, int j)
{
return mod_BlockBedrockOre.BedrockOre.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}}
And the mod_file
package net.minecraft.src;
public class mod_BlockBedrockOre extends BaseMod
{
public static final Block BedrockOre = (new BlockBedrockOre(170, 0)).setHardness(3F).setResistance(5F).setStepSound(Block.soundStoneFootstep);
I tried to correct it a bit, but I may missed some bugs, because there were A LOT of them. I'll give you some tips. First, you should realise that there is difference between Blockname and name (BlockBedrockOre and BedrockOre in this case). Second, if you don't anyone know your mod you sould first rename all variables to someting like block1,block2 etc., not to keep Name, it is then difficult to understand AND you should check your code before you post it (you had the name BedrockOre in here: "public static final Name = (new BlockBedrockOre...). Third, block id's can be only to 255, so your 1002 wouldn't work.
I hope I helped a bit, you should read more tutorials before rushing onto your first mod I guess :smile.gif:
EDIT: And you asked what to do next. Next run recompile.bat... if it succesfully compiles, then run reobfuscate.bat. It creates some .class files in reobf folder. Now put them into .zip file and you are done :smile.gif:
You should pay more attention when reading tuts. You have a lot of mistakes there.
//Coded by Gamerz
package net.minecraft.src;
public class BlockBedrockOre extends Block
{
public BlockBedrockOre(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random, int j)
{
return mod_BlockBedrockOre.BedrockOre.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}}
And the mod_file
package net.minecraft.src;
public class mod_BlockBedrockOre extends BaseMod
{
public static final Block BedrockOre = (new BlockBedrockOre(170, 0)).setHardness(3F).setResistance(5F).setStepSound(Block.soundStoneFootstep);
I tried to correct it a bit, but I may missed some bugs, because there were A LOT of them. I'll give you some tips. First, you should realise that there is difference between Blockname and name (BlockBedrockOre and BedrockOre in this case). Second, if you don't anyone know your mod you sould first rename all variables to someting like block1,block2 etc., not to keep Name, it is then difficult to understand AND you should check your code before you post it (you had the name BedrockOre in here: "public static final Name = (new BlockBedrockOre...). Third, block id's can be only to 255, so your 1002 wouldn't work.
I hope I helped a bit, you should read more tutorials before rushing onto your first mod I guess :smile.gif:
EDIT: And you asked what to do next. Next run recompile.bat... if it succesfully compiles, then run reobfuscate.bat. It creates some .class files in reobf folder. Now put them into .zip file and you are done :smile.gif:
But only to 255 arent there blocks with that id already ssame with items and stuff
cause other tut i wrote said That it needs to be above 255 also if below can u give a number for a block and an item Thx
But only to 255 arent there blocks with that id already ssame with items and stuff
cause other tut i wrote said That it needs to be above 255 also if below can u give a number for a block and an item Thx
Block id's are currently used up to 125 i think. Also, i already wrote valid ID into the corrected code :wink.gif: And you should know that there is difference between BLOCKS (Id up to 255) and ITEMS (Id above 255). The other tut was probably about item :smile.gif:
hi nice tut, but when i load my basemod.java, this is what i get
package net.minecraft.src;
import java.util.Map;
import java.util.Random;
import net.minecraft.client.Minecraft;
public abstract class BaseMod
{
public BaseMod()
{
}
public int AddFuel(int i, int j)
{
return 0;
}
public void AddRenderer(Map map)
{
}
public boolean DispenseEntity(ModelWolf modelwolf, double d, double d1, double d2,
int i, int j, AchievementList achievementlist)
{
return false;
}
public void GenerateNether(ModelWolf modelwolf, Random random, int i, int j)
{
}
public void GenerateSurface(ModelWolf modelwolf, Random random, int i, int j)
{
}
public String getName()
{
return getClass().getSimpleName();
}
public String getPriorities()
{
return "";
}
public abstract String getVersion();
public void KeyboardEvent(Tessellator tessellator)
{
}
public abstract void load();
public void ModsLoaded()
{
}
public void OnItemPickup(AxisAlignedBB axisalignedbb, AchievementList achievementlist)
{
}
public boolean OnTickInGame(float f, Minecraft minecraft)
{
return false;
}
public boolean OnTickInGUI(float f, Minecraft minecraft, RecipesTools recipestools)
{
return false;
}
public void RegisterAnimation(Minecraft minecraft)
{
}
public void RenderInvBlock(BlockDirt blockdirt, Direction direction, int i, int j)
{
}
public boolean RenderWorldBlock(BlockDirt blockdirt, Packet108EnchantItem packet108enchantitem, int i, int j, int k, Direction direction, int l)
{
return false;
}
public void TakenFromCrafting(AxisAlignedBB axisalignedbb, AchievementList achievementlist, ModelSheep1 modelsheep1)
{
}
public void TakenFromFurnace(AxisAlignedBB axisalignedbb, AchievementList achievementlist)
{
}
public String toString()
{
return (new StringBuilder(String.valueOf(getName()))).append(' ').append(getVersion()).toString();
}
}
hi nice tut, but when i load my basemod.java, this is what i get
package net.minecraft.src;
import java.util.Map;
import java.util.Random;
import net.minecraft.client.Minecraft;
public abstract class BaseMod
{
public BaseMod()
{
}
public int AddFuel(int i, int j)
{
return 0;
}
public void AddRenderer(Map map)
{
}
public boolean DispenseEntity(ModelWolf modelwolf, double d, double d1, double d2,
int i, int j, AchievementList achievementlist)
{
return false;
}
public void GenerateNether(ModelWolf modelwolf, Random random, int i, int j)
{
}
public void GenerateSurface(ModelWolf modelwolf, Random random, int i, int j)
{
}
public String getName()
{
return getClass().getSimpleName();
}
public String getPriorities()
{
return "";
}
public abstract String getVersion();
public void KeyboardEvent(Tessellator tessellator)
{
}
public abstract void load();
public void ModsLoaded()
{
}
public void OnItemPickup(AxisAlignedBB axisalignedbb, AchievementList achievementlist)
{
}
public boolean OnTickInGame(float f, Minecraft minecraft)
{
return false;
}
public boolean OnTickInGUI(float f, Minecraft minecraft, RecipesTools recipestools)
{
return false;
}
public void RegisterAnimation(Minecraft minecraft)
{
}
public void RenderInvBlock(BlockDirt blockdirt, Direction direction, int i, int j)
{
}
public boolean RenderWorldBlock(BlockDirt blockdirt, Packet108EnchantItem packet108enchantitem, int i, int j, int k, Direction direction, int l)
{
return false;
}
public void TakenFromCrafting(AxisAlignedBB axisalignedbb, AchievementList achievementlist, ModelSheep1 modelsheep1)
{
}
public void TakenFromFurnace(AxisAlignedBB axisalignedbb, AchievementList achievementlist)
{
}
public String toString()
{
return (new StringBuilder(String.valueOf(getName()))).append(' ').append(getVersion()).toString();
}
}
plz help
Can you post the error you get please.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Added to the list. If you look in ItemDye, at the onItemUse method on line 37, that whole method is for bonemeal. Just remove the
if (itemstack.getItemDamage() == 15)
statement and its brackets(leave everything thats inside the { }, but remove 'the brackets themselves), then put the code in your item file. If you are having trouble let me know and I'll give you a proper example.
Lets just say that I am having trouble with the placement of the code, I got the bonemeal code but I don't know how/were to add it into the Item file, and thanks for the help. Also I have made a mod but someone who got it said that it was incompatible with a different mod that he had because when he tried to craft my modded in item it would craft an item from one of his other mods, he said that the items were the same I.D. and said that modloader could fix it somehow, but I don't know how to make that happen, so if you know what to do please tell me. -Thank You-
Well, this is your fertilising code. I have already remove the meta data check.:
public boolean onItemUse(ItemStack itemstack, EntityPlayer entityplayer, World world, int i, int j, int k, int l)
{
if (!entityplayer.canPlayerEdit(i, j, k))
{
return false;
}
int i1 = world.getBlockId(i, j, k);
if (i1 == Block.sapling.blockID)
{
if (!world.multiplayerWorld)
{
((BlockSapling)Block.sapling).growTree(world, i, j, k, world.rand);
itemstack.stackSize--;
}
return true;
}
if (i1 == Block.mushroomBrown.blockID || i1 == Block.mushroomRed.blockID)
{
if (!world.multiplayerWorld && ((BlockMushroom)Block.blocksList[i1]).fertilizeMushroom(world, i, j, k, world.rand))
{
itemstack.stackSize--;
}
return true;
}
if (i1 == Block.melonStem.blockID || i1 == Block.pumpkinStem.blockID)
{
if (!world.multiplayerWorld)
{
((BlockStem)Block.blocksList[i1]).fertilizeStem(world, i, j, k);
itemstack.stackSize--;
}
return true;
}
if (i1 == Block.crops.blockID)
{
if (!world.multiplayerWorld)
{
((BlockCrops)Block.crops).fertilize(world, i, j, k);
itemstack.stackSize--;
}
return true;
}
if (i1 == Block.grass.blockID)
{
if (!world.multiplayerWorld)
{
itemstack.stackSize--;
label0:
for (int j1 = 0; j1 < 128; j1++)
{
int k1 = i;
int l1 = j + 1;
int i2 = k;
for (int j2 = 0; j2 < j1 / 16; j2++)
{
k1 += itemRand.nextInt(3) - 1;
l1 += ((itemRand.nextInt(3) - 1) * itemRand.nextInt(3)) / 2;
i2 += itemRand.nextInt(3) - 1;
if (world.getBlockId(k1, l1 - 1, i2) != Block.grass.blockID || world.isBlockNormalCube(k1, l1, i2))
{
continue label0;
}
}
if (world.getBlockId(k1, l1, i2) != 0)
{
continue;
}
if (itemRand.nextInt(10) != 0)
{
world.setBlockAndMetadataWithNotify(k1, l1, i2, Block.tallGrass.blockID, 1);
continue;
}
if (itemRand.nextInt(3) != 0)
{
world.setBlockWithNotify(k1, l1, i2, Block.plantYellow.blockID);
}
else
{
world.setBlockWithNotify(k1, l1, i2, Block.plantRed.blockID);
}
}
}
return true;
}
return false;
}
It would fit in your item class like this:
package net.minecraft.src;
public class ItemNamehere extends Item
{
public ItemNamehere(int i)
{
super(i);
maxStackSize = 64;
}
public boolean onItemUse(ItemStack itemstack, EntityPlayer entityplayer, World world, int i, int j, int k, int l)
{
if (!entityplayer.canPlayerEdit(i, j, k))
{
return false;
}
int i1 = world.getBlockId(i, j, k);
if (i1 == Block.sapling.blockID)
{
if (!world.multiplayerWorld)
{
((BlockSapling)Block.sapling).growTree(world, i, j, k, world.rand);
itemstack.stackSize--;
}
return true;
}
if (i1 == Block.mushroomBrown.blockID || i1 == Block.mushroomRed.blockID)
{
if (!world.multiplayerWorld && ((BlockMushroom)Block.blocksList[i1]).fertilizeMushroom(world, i, j, k, world.rand))
{
itemstack.stackSize--;
}
return true;
}
if (i1 == Block.melonStem.blockID || i1 == Block.pumpkinStem.blockID)
{
if (!world.multiplayerWorld)
{
((BlockStem)Block.blocksList[i1]).fertilizeStem(world, i, j, k);
itemstack.stackSize--;
}
return true;
}
if (i1 == Block.crops.blockID)
{
if (!world.multiplayerWorld)
{
((BlockCrops)Block.crops).fertilize(world, i, j, k);
itemstack.stackSize--;
}
return true;
}
if (i1 == Block.grass.blockID)
{
if (!world.multiplayerWorld)
{
itemstack.stackSize--;
label0:
for (int j1 = 0; j1 < 128; j1++)
{
int k1 = i;
int l1 = j + 1;
int i2 = k;
for (int j2 = 0; j2 < j1 / 16; j2++)
{
k1 += itemRand.nextInt(3) - 1;
l1 += ((itemRand.nextInt(3) - 1) * itemRand.nextInt(3)) / 2;
i2 += itemRand.nextInt(3) - 1;
if (world.getBlockId(k1, l1 - 1, i2) != Block.grass.blockID || world.isBlockNormalCube(k1, l1, i2))
{
continue label0;
}
}
if (world.getBlockId(k1, l1, i2) != 0)
{
continue;
}
if (itemRand.nextInt(10) != 0)
{
world.setBlockAndMetadataWithNotify(k1, l1, i2, Block.tallGrass.blockID, 1);
continue;
}
if (itemRand.nextInt(3) != 0)
{
world.setBlockWithNotify(k1, l1, i2, Block.plantYellow.blockID);
}
else
{
world.setBlockWithNotify(k1, l1, i2, Block.plantRed.blockID);
}
}
}
return true;
}
return false;
}
}
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Well, this is your fertilising code. I have already remove the meta data check.:
public boolean onItemUse(ItemStack itemstack, EntityPlayer entityplayer, World world, int i, int j, int k, int l)
{
if (!entityplayer.canPlayerEdit(i, j, k))
{
return false;
}
int i1 = world.getBlockId(i, j, k);
if (i1 == Block.sapling.blockID)
{
if (!world.multiplayerWorld)
{
((BlockSapling)Block.sapling).growTree(world, i, j, k, world.rand);
itemstack.stackSize--;
}
return true;
}
if (i1 == Block.mushroomBrown.blockID || i1 == Block.mushroomRed.blockID)
{
if (!world.multiplayerWorld && ((BlockMushroom)Block.blocksList[i1]).fertilizeMushroom(world, i, j, k, world.rand))
{
itemstack.stackSize--;
}
return true;
}
if (i1 == Block.melonStem.blockID || i1 == Block.pumpkinStem.blockID)
{
if (!world.multiplayerWorld)
{
((BlockStem)Block.blocksList[i1]).fertilizeStem(world, i, j, k);
itemstack.stackSize--;
}
return true;
}
if (i1 == Block.crops.blockID)
{
if (!world.multiplayerWorld)
{
((BlockCrops)Block.crops).fertilize(world, i, j, k);
itemstack.stackSize--;
}
return true;
}
if (i1 == Block.grass.blockID)
{
if (!world.multiplayerWorld)
{
itemstack.stackSize--;
label0:
for (int j1 = 0; j1 < 128; j1++)
{
int k1 = i;
int l1 = j + 1;
int i2 = k;
for (int j2 = 0; j2 < j1 / 16; j2++)
{
k1 += itemRand.nextInt(3) - 1;
l1 += ((itemRand.nextInt(3) - 1) * itemRand.nextInt(3)) / 2;
i2 += itemRand.nextInt(3) - 1;
if (world.getBlockId(k1, l1 - 1, i2) != Block.grass.blockID || world.isBlockNormalCube(k1, l1, i2))
{
continue label0;
}
}
if (world.getBlockId(k1, l1, i2) != 0)
{
continue;
}
if (itemRand.nextInt(10) != 0)
{
world.setBlockAndMetadataWithNotify(k1, l1, i2, Block.tallGrass.blockID, 1);
continue;
}
if (itemRand.nextInt(3) != 0)
{
world.setBlockWithNotify(k1, l1, i2, Block.plantYellow.blockID);
}
else
{
world.setBlockWithNotify(k1, l1, i2, Block.plantRed.blockID);
}
}
}
return true;
}
return false;
}
It would fit in your item class like this:
package net.minecraft.src;
public class ItemNamehere extends Item
{
public ItemNamehere(int i)
{
super(i);
maxStackSize = 64;
}
public boolean onItemUse(ItemStack itemstack, EntityPlayer entityplayer, World world, int i, int j, int k, int l)
{
if (!entityplayer.canPlayerEdit(i, j, k))
{
return false;
}
int i1 = world.getBlockId(i, j, k);
if (i1 == Block.sapling.blockID)
{
if (!world.multiplayerWorld)
{
((BlockSapling)Block.sapling).growTree(world, i, j, k, world.rand);
itemstack.stackSize--;
}
return true;
}
if (i1 == Block.mushroomBrown.blockID || i1 == Block.mushroomRed.blockID)
{
if (!world.multiplayerWorld && ((BlockMushroom)Block.blocksList[i1]).fertilizeMushroom(world, i, j, k, world.rand))
{
itemstack.stackSize--;
}
return true;
}
if (i1 == Block.melonStem.blockID || i1 == Block.pumpkinStem.blockID)
{
if (!world.multiplayerWorld)
{
((BlockStem)Block.blocksList[i1]).fertilizeStem(world, i, j, k);
itemstack.stackSize--;
}
return true;
}
if (i1 == Block.crops.blockID)
{
if (!world.multiplayerWorld)
{
((BlockCrops)Block.crops).fertilize(world, i, j, k);
itemstack.stackSize--;
}
return true;
}
if (i1 == Block.grass.blockID)
{
if (!world.multiplayerWorld)
{
itemstack.stackSize--;
label0:
for (int j1 = 0; j1 < 128; j1++)
{
int k1 = i;
int l1 = j + 1;
int i2 = k;
for (int j2 = 0; j2 < j1 / 16; j2++)
{
k1 += itemRand.nextInt(3) - 1;
l1 += ((itemRand.nextInt(3) - 1) * itemRand.nextInt(3)) / 2;
i2 += itemRand.nextInt(3) - 1;
if (world.getBlockId(k1, l1 - 1, i2) != Block.grass.blockID || world.isBlockNormalCube(k1, l1, i2))
{
continue label0;
}
}
if (world.getBlockId(k1, l1, i2) != 0)
{
continue;
}
if (itemRand.nextInt(10) != 0)
{
world.setBlockAndMetadataWithNotify(k1, l1, i2, Block.tallGrass.blockID, 1);
continue;
}
if (itemRand.nextInt(3) != 0)
{
world.setBlockWithNotify(k1, l1, i2, Block.plantYellow.blockID);
}
else
{
world.setBlockWithNotify(k1, l1, i2, Block.plantRed.blockID);
}
}
}
return true;
}
return false;
}
}
Awesome! and Thank You!(will test soon) Also: I tried your potion effect in food tutorial and it worked fine except that (I think) the explanation of the 30 in your tutorial seems incorrect I tried 20 and it gave me like 20 something seconds of effect but then I tried 5 and it gave me like 5 seconds of effect, just thought you might like to know.
Hey mate, nice tut. I must say it was better and smarter done than anyone else. But I wonder about one thing, how can I make my own skin for a block like a bookshelf. I want to make a block that has one skin around it and another on top and bottom (like a bookshelf). I will try this stuff out in 3 days when I'm back, hoping u will have replied by then so I can try to make a block like that aswell!
Ty in advance, and keep it up!
Haxer
, and a for you!
I have a problem if I put he files in MP then run it i get errors when i just copy ur code and change the names whats the problem. like 1 problem is with ModLoader it says that the M is suppost to be lover case but u have it upper im so confused if i post my code could u Edit it THX and Here is the code!!
package net.minecraft.src;
public class mod_BedrockOre extends BaseMod
{
public static final BedrockOre = (new BlockBedrockOre(153, 0)).setHardness(3F).setResistance(5F).setStepSound(soundStoneFootstep).setBlockName("BedrockOre");
public class BlockBedrockOre extends Block
{
public BlockBedrockOre(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random, int j)
{
return mod_BedrockStuff.BedrockOre.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}
}
I cant copy the error cause it is in DOS but it says identifier expected! Then on the <soundStonestep> thing there is a thing under the S in stone so im confused plz help!!!
I have a problem if I put he files in MP then run it i get errors when i just copy ur code and change the names whats the problem. like 1 problem is with ModLoader it says that the M is suppost to be lover case but u have it upper im so confused if i post my code could u Edit it THX and Here is the code!!
package net.minecraft.src;
public class mod_BedrockOre extends BaseMod
{
public static final BedrockOre = (new BlockBedrockOre(153, 0)).setHardness(3F).setResistance(5F).setStepSound(soundStoneFootstep).setBlockName("BedrockOre");
public class mod_BedrockOre extends BaseMod
{
public static final BedrockOre = (new BedrockOre(157, 0)).setHardness(3F).setResistance(5F).setStepSound(soundStoneFootstep).setBlockName("BedrockOre");
I know that I am not the one that you asked for help but: the content in the two spoilers is the same, also I think that it would be helpful if you posted the error report.
I have a problem if I put he files in MP then run it i get errors when i just copy ur code and change the names whats the problem. like 1 problem is with ModLoader it says that the M is suppost to be lover case but u have it upper im so confused if i post my code could u Edit it THX and Here is the code!!
package net.minecraft.src;
public class mod_BedrockOre extends BaseMod
{
public static final BedrockOre = (new BlockBedrockOre(153, 0)).setHardness(3F).setResistance(5F).setStepSound(soundStoneFootstep).setBlockName("BedrockOre");
public class mod_BedrockOre extends BaseMod
{
public static final BedrockOre = (new BedrockOre(157, 0)).setHardness(3F).setResistance(5F).setStepSound(soundStoneFootstep).setBlockName("BedrockOre");
As Koadmaster mentioned above, you have there twice the same code in spoilers. Also, If you are bad in english, please try to use full words (you) instead of these short versions (u). It is then better understandable :smile.gif: To get to the point, the only mistake I can see now in this part of your code is that ".setStepSound(soundStoneFootstep)" should be ".setStepSound(Block.soundStoneFootstep)"
I know that I am not the one that you asked for help but: the content in the two spoilers is the same, also I think that it would be helpful if you posted the error report.
-Thank You-
Well, snow uses this method, so I guess it should work for all blocks. I'll test it and add it to the advanced block tutorial if it works. Let me no if it doesn't
Added to the list. If you look in ItemDye, at the onItemUse method on line 37, that whole method is for bonemeal. Just remove the
statement and its brackets(leave everything thats inside the { }, but remove 'the brackets themselves), then put the code in your item file. If you are having trouble let me know and I'll give you a proper example.
together they are powerful beyond imagination."
together they are powerful beyond imagination."
EDIT: Nevermind, problem solved :smile.gif:
Divine smoker mod - Hookah in Minecraft: http://www.minecraftforum.net/topic/1689980-172splanspdivine-smoker-water-pipe-modhookahshisha-11/
1) Out of all the tut if seen u guys show how to make the mod but not where to put when ur done
Ex. The mod_file where do u put it and also in the src There are like lots of .java files 1 of them is the block.java and in it is all the blocks so do u have to add ur block to that file???
2) I think my code doesnt work so here plz check it
package net.minecraft.src;
public class Name extends Block
{
public BlockName(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random, int j)
{
return mod_Name.Name.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}}
public class mod_Name extends BaseMod
{
public static final Name = (new BlockBedrockOre(1002, 0)).setHardness(3F).setResistance(5F).setStepSound(soundStoneFootstep).setBlockName("Name");
//I kept it name cuase i dont anyone knowing what mod im making
public void load()
{
Name.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Name/Name.png");
ModLoader.RegisterBlock(Namehere);
ModLoader.AddName(Name, "Name");
}
public String getVersion()
{
return "1.1";
}
}
Thx also if you could Make a tut on what to do after u have the mod files made thx
You should pay more attention when reading tuts. You have a lot of mistakes there.
package net.minecraft.src;
public class BlockBedrockOre extends Block
{
public BlockBedrockOre(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random, int j)
{
return mod_BlockBedrockOre.BedrockOre.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}}
public class mod_BlockBedrockOre extends BaseMod
{
public static final Block BedrockOre = (new BlockBedrockOre(170, 0)).setHardness(3F).setResistance(5F).setStepSound(Block.soundStoneFootstep);
public void load()
{
Name.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Name/BedrockOre.png");
ModLoader.RegisterBlock(BedrockOre);
ModLoader.AddName(BedrockOre, "Bedrock Ore");
}
public String getVersion()
{
return "1.1";
}
}
I tried to correct it a bit, but I may missed some bugs, because there were A LOT of them. I'll give you some tips. First, you should realise that there is difference between Blockname and name (BlockBedrockOre and BedrockOre in this case). Second, if you don't anyone know your mod you sould first rename all variables to someting like block1,block2 etc., not to keep Name, it is then difficult to understand AND you should check your code before you post it (you had the name BedrockOre in here: "public static final Name = (new BlockBedrockOre...). Third, block id's can be only to 255, so your 1002 wouldn't work.
I hope I helped a bit, you should read more tutorials before rushing onto your first mod I guess :smile.gif:
EDIT: And you asked what to do next. Next run recompile.bat... if it succesfully compiles, then run reobfuscate.bat. It creates some .class files in reobf folder. Now put them into .zip file and you are done :smile.gif:
Divine smoker mod - Hookah in Minecraft: http://www.minecraftforum.net/topic/1689980-172splanspdivine-smoker-water-pipe-modhookahshisha-11/
But only to 255 arent there blocks with that id already ssame with items and stuff
cause other tut i wrote said That it needs to be above 255 also if below can u give a number for a block and an item Thx
Block id's are currently used up to 125 i think. Also, i already wrote valid ID into the corrected code :wink.gif: And you should know that there is difference between BLOCKS (Id up to 255) and ITEMS (Id above 255). The other tut was probably about item :smile.gif:
Divine smoker mod - Hookah in Minecraft: http://www.minecraftforum.net/topic/1689980-172splanspdivine-smoker-water-pipe-modhookahshisha-11/
plz help
Can you post the error you get please.
together they are powerful beyond imagination."
Lets just say that I am having trouble with the placement of the code, I got the bonemeal code but I don't know how/were to add it into the Item file, and thanks for the help. Also I have made a mod but someone who got it said that it was incompatible with a different mod that he had because when he tried to craft my modded in item it would craft an item from one of his other mods, he said that the items were the same I.D. and said that modloader could fix it somehow, but I don't know how to make that happen, so if you know what to do please tell me. -Thank You-
It would fit in your item class like this:
together they are powerful beyond imagination."
Awesome! and Thank You!(will test soon) Also: I tried your potion effect in food tutorial and it worked fine except that (I think) the explanation of the 30 in your tutorial seems incorrect I tried 20 and it gave me like 20 something seconds of effect but then I tried 5 and it gave me like 5 seconds of effect, just thought you might like to know.
Ty in advance, and keep it up!
Haxer
, and a for you!
public class mod_BedrockOre extends BaseMod
{
public static final BedrockOre = (new BlockBedrockOre(153, 0)).setHardness(3F).setResistance(5F).setStepSound(soundStoneFootstep).setBlockName("BedrockOre");
public void load()
{
BedrockOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/BedrockStuff/BedrockOre.png");
ModLoader.RegisterBlock(BedrockOre);
ModLoader.AddName(BedrockOre, "BedrockOre");
}
public String getVersion()
{
return "1.1";
}
}
package net.minecraft.src;
public class BlockBedrockOre extends Block
{
public BlockBedrockOre(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random, int j)
{
return mod_BedrockStuff.BedrockOre.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}
}
I cant copy the error cause it is in DOS but it says identifier expected! Then on the <soundStonestep> thing there is a thing under the S in stone so im confused plz help!!!
Plz help I pretty sure it should work!!! Thx
I know that I am not the one that you asked for help but: the content in the two spoilers is the same, also I think that it would be helpful if you posted the error report.
As Koadmaster mentioned above, you have there twice the same code in spoilers. Also, If you are bad in english, please try to use full words (you) instead of these short versions (u). It is then better understandable :smile.gif: To get to the point, the only mistake I can see now in this part of your code is that ".setStepSound(soundStoneFootstep)" should be ".setStepSound(Block.soundStoneFootstep)"
Hope it helps :smile.gif:
Divine smoker mod - Hookah in Minecraft: http://www.minecraftforum.net/topic/1689980-172splanspdivine-smoker-water-pipe-modhookahshisha-11/
Ok and also ill fix