Jump to content

Fire Magic Book


Recommended Posts

Hello, I'm making this mod and I want to give this item special powers to spawn fire at random blocks in a 3x3 radius at the coordinates the player is looking at, here is the code:


public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)


//itemstack.damageItem(10, entityplayer);

world.playSoundAtEntity(entityplayer, "fire.ignite", 0.7f, 0.8f);

if (!world.isRemote)


Vec3 look = entityplayer.getLookVec();

Blocks.fire firemass7 = new Blocks.fire(world, entityplayer, 1, 1, 1);


entityplayer.posX + look.xCoord,

entityplayer.posY + look.yCoord,

entityplayer.posZ + look.zCoord);



return itemstack;



I am using forge 1.7.10, as I want to make the mod in this version. The problem is that the Blocks.fire can't be resolved to a field, could anyone please let me know how to fix that, or any other mistakes you see in this coding? Thank you.

Link to comment
Share on other sites

This topic is now closed to further replies.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.