1 how do i make an item like a snowball but that when right clicked instead of shooting a snowball shoots a fireball they have different constructors and i couldnt figure out how to do it
2 also is it possible to make an item name show up differently depending on the languge pack using only modloader
1. in the items right click method create a fireball, look at how the ghast creates one or look at the constructor itself.
2. yes, ModLoader.addLocalization(String key, String lang, String value)
or you can do universal and remove the lang string
I'm not going to go into full detail
for only on the ground run a check on the y cord using world.getBlockId(x, y, z) and see if its not air
for biome you can do world.getBiomeGenForCoords(x, y) then compare it to whatever biomes you want
inside or near you either spawn them when you make the structure or you make a custom biome and make the mobs spawn in that biome
for spawning when you generate the structure just create the new Entity then do world.spawnEntityInWorld(entity)
for chests, you need to create a TileEntityChest and then set the contents of it to what you want, put a chest where you want it with world.setBlockId, then you do world.setBlockTileEntity(x, y, z, the tile entity you made)
if thats in the block breaking code, isnt EntityPlayer passed in as a parameter? if not there is a method that has it passed in, try to find it and use it
SMP will be out soon! I got everything working except for one rendering bug with shurikens that resulted from going to a sprite map
I haven't fixed the chat colors or the assassin ninja yet either, but I don't plan to fix those before the SMP release, expect it by this weekend!
EDIT: nevermind I fixed the bug, I'm releasing it now!
I can answer 2, give me a second to go find some code to copy and paste as an example
just put these somewhere in the custom block file and change the returns to whatever you want, I took these from BlockGlowStone
/**
* Returns the ID of the items to drop on destruction.
*/
public int idDropped(int par1, Random par2Random, int par3)
{
return Item.lightStoneDust.shiftedIndex;
}
/**
* Returns the quantity of items to drop on block destruction.
*/
public int quantityDropped(Random par1Random)
{
return 2 + par1Random.nextInt(3);
}
any questions make sure to reply to this post or pm me
I'm pretty sure your problem is going to be the explosion. I haven't actually looked around but I'm assuming that lightning won't render if the block it'd be hitting is air, and it definitely wouldn't be placing fire on air. If you really want the lightning after the explosion you're going to need to find the new ground position for y, and then make the lightning based on it. Otherwise you could have the lightning come before the explosion, which in this situation should work, but the explosion would destroy the fire.
0
alternatively I think you can do
all the languages can be found in minecraft.jar/lang
0
0
0
0
1
change it to
because you can't set mirror to true if the object doesn't exist yet
By the way great job hiding that you're making a boar
0
1. in the items right click method create a fireball, look at how the ghast creates one or look at the constructor itself.
2. yes, ModLoader.addLocalization(String key, String lang, String value)
or you can do universal and remove the lang string
0
for only on the ground run a check on the y cord using world.getBlockId(x, y, z) and see if its not air
for biome you can do world.getBiomeGenForCoords(x, y) then compare it to whatever biomes you want
inside or near you either spawn them when you make the structure or you make a custom biome and make the mobs spawn in that biome
for spawning when you generate the structure just create the new Entity then do world.spawnEntityInWorld(entity)
for chests, you need to create a TileEntityChest and then set the contents of it to what you want, put a chest where you want it with world.setBlockId, then you do world.setBlockTileEntity(x, y, z, the tile entity you made)
1
change the 5 to 6, or even better, do ModLoader.addArmor("CB") there
0
0
0
I haven't fixed the chat colors or the assassin ninja yet either, but I don't plan to fix those before the SMP release, expect it by this weekend!
EDIT: nevermind I fixed the bug, I'm releasing it now!
0
1
just put these somewhere in the custom block file and change the returns to whatever you want, I took these from BlockGlowStone
any questions make sure to reply to this post or pm me
0