CorruptedVulture Posted September 10, 2016 Posted September 10, 2016 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); firemass7.setPosition( entityplayer.posX + look.xCoord, entityplayer.posY + look.yCoord, entityplayer.posZ + look.zCoord); world.setBlock(firemass7); } 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.
Recommended Posts