Great tutorials,these have helped me out alot! One question though...If I wanted to make the grenade create fire as well (e.g. an incendiary grenade) without messing with the explosion code,how could I do that?
You need a seperate folder in minecraft.jar for all of your item pictures, it should have the name you specified in your code (if an error appears, double check the names of your picture and folder)
I want to make a trampoline mod. (yes I know there already is one) To do this I would have to have a block that reacts to a person standing on it, like a pressure plate, and then launch the person (or mob) into the air. Is there any way this could be done? I already created the block. I just started modding like today so if anyone could help me I would greatly appreciate it. :smile.gif:
EDIT: I saw the whole entity.motionY += 2.0; thing, but that didn't work. Here's the error:
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\BlockBox.java:11: cannot find symbol
symbol : variable entity
location: class net.minecraft.src.BlockBox
entity.motionY += 2.0;
^
1 error
==================
And here's my code:
package net.minecraft.src;
import java.util.Random;
public class BlockBox extends Block
{
public BlockBox(int i, int j)
{
super(i, j, Material.cloth);
setStepSound(soundClothFootstep);
entity.motionY += 2.0;
}
public int idDropped(int i, Random random)
{
return mod_Box.box.blockID;
}
}
Rollback Post to RevisionRollBack
FRIENDLY REMINDER: If my post has helped you in any way, be sure to click the littlebutton in the bottom right.
I want to make a trampoline mod. (yes I know there already is one) To do this I would have to have a block that reacts to a person standing on it, like a pressure plate, and then launch the person (or mob) into the air. Is there any way this could be done? I already created the block. I just started modding like today so if anyone could help me I would greatly appreciate it. :smile.gif:
EDIT: I saw the whole entity.motionY += 2.0; thing, but that didn't work. Here's the error:
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\BlockBox.java:11: cannot find symbol
symbol : variable entity
location: class net.minecraft.src.BlockBox
entity.motionY += 2.0;
^
1 error
==================
And here's my code:
package net.minecraft.src;
import java.util.Random;
public class BlockBox extends Block
{
public BlockBox(int i, int j)
{
super(i, j, Material.cloth);
setStepSound(soundClothFootstep);
entity.motionY += 2.0;
}
public int idDropped(int i, Random random)
{
return mod_Box.box.blockID;
}
}
well, i got a lot of errors, but yours is easy to fix...
just chuck this in like this:
public void onEntityCollidedWithBlock(World world, int i, int j, int k, Entity entity)
{
entity.fallDistance = 0.0F;
entity.motionY += 1.6;
}
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
{
if(world.getBlockMetadata(i, j, k) == 1.5)
{
return AxisAlignedBB.getBoundingBoxFromPool(i, j, k, i, j, k);
} else
{
return AxisAlignedBB.getBoundingBoxFromPool(i, j, k, i + 1.5, j, k + 1.5);
}
}
therefor it would look like this:
package net.minecraft.src;
import java.util.Random;
public class BlockTankitejump extends Block
{
public BlockTankitejump(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random)
{
return mod_Tankite.tankitejump.blockID;
}
public void onEntityCollidedWithBlock(World world, int i, int j, int k, Entity entity)
{
entity.fallDistance = 0.0F;
entity.motionY += 1.6;
}
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
{
if(world.getBlockMetadata(i, j, k) == 1.5)
{
return AxisAlignedBB.getBoundingBoxFromPool(i, j, k, i, j, k);
} else
{
return AxisAlignedBB.getBoundingBoxFromPool(i, j, k, i + 1.5, j, k + 1.5);
}
}
}
Rollback Post to RevisionRollBack
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
How would you make a mob that spawns on lets say sand. I tried making a new creature type but that didn't work. No errors appeared it just didn't spawn in game. Help would be appreciated. Thanks
well, i got a lot of errors, but yours is easy to fix...
just chuck this in like this:
public void onEntityCollidedWithBlock(World world, int i, int j, int k, Entity entity)
{
entity.fallDistance = 0.0F;
entity.motionY += 1.6;
}
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
{
if(world.getBlockMetadata(i, j, k) == 1.5)
{
return AxisAlignedBB.getBoundingBoxFromPool(i, j, k, i, j, k);
} else
{
return AxisAlignedBB.getBoundingBoxFromPool(i, j, k, i + 1.5, j, k + 1.5);
}
}
therefor it would look like this:
package net.minecraft.src;
import java.util.Random;
public class BlockTankitejump extends Block
{
public BlockTankitejump(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random)
{
return mod_Tankite.tankitejump.blockID;
}
public void onEntityCollidedWithBlock(World world, int i, int j, int k, Entity entity)
{
entity.fallDistance = 0.0F;
entity.motionY += 1.6;
}
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
{
if(world.getBlockMetadata(i, j, k) == 1.5)
{
return AxisAlignedBB.getBoundingBoxFromPool(i, j, k, i, j, k);
} else
{
return AxisAlignedBB.getBoundingBoxFromPool(i, j, k, i + 1.5, j, k + 1.5);
}
}
}
Thanks so much! It worked. Now I have one more problem though. I need to know how to make it so when you land on the ground, or the trampoline you take no fall damage. Whenever I shoot really high I just take damage.
EDIT: Also, sometimes it launches you really high, and sometimes it launches you really low. It's all random. I'd like to make it so that you went a little higher every jump. Is this possible? Thanks for all the help! :smile.gif:
Rollback Post to RevisionRollBack
FRIENDLY REMINDER: If my post has helped you in any way, be sure to click the littlebutton in the bottom right.
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
Could you put onto a downloading site ( mediafire, or whatever) the files?
Because then I could learn a lot from it and then I might be able to understand this :biggrin.gif:
(I really hope you do this, I would even be willing to go through a ad.fly page to get this!)
EDIT: mainly just the block ones, and if you could the others would be nice too! :]
but if you insist, i will give them to you :tongue.gif:
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
You need a seperate folder in minecraft.jar for all of your item pictures, it should have the name you specified in your code (if an error appears, double check the names of your picture and folder)
Yes please!
and Mine123crafter try this:
see?
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
cant give them right now, at 5:00 PM i will give
(its 7:56 Am Right now...
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
Dont worry at all!! Take as much time as you need :biggrin.gif:
mediafire is blocked at school :sleep.gif: thats why i cant do it here..
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
why, are YOU GOING TO HUNT ME DOWN?!
XD thats what my teacher said to me
"ok, you can hand your LA in tomorrow, but if i find thats its late, i will HUNT YOU DOWN"
omg, i laughed so hard
(LA's are learning assessments) :tongue.gif:
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
Judging from the errors on both logs you have a missing { or }, which is causing syntax to be shifted, which causes all these errors.
EDIT: I saw the whole entity.motionY += 2.0; thing, but that didn't work. Here's the error:
And here's my code:
well, i got a lot of errors, but yours is easy to fix...
just chuck this in like this:
therefor it would look like this:
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
the minecraft jar is in
MCP/Jars/Bin/minecraft.jar
there you go :biggrin.gif:
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
yes the example must be wrong, about 5 people have the same error :sleep.gif:
i will fix the example...
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
Thanks so much! It worked. Now I have one more problem though. I need to know how to make it so when you land on the ground, or the trampoline you take no fall damage. Whenever I shoot really high I just take damage.
EDIT: Also, sometimes it launches you really high, and sometimes it launches you really low. It's all random. I'd like to make it so that you went a little higher every jump. Is this possible? Thanks for all the help! :smile.gif: