Posted October 14, 20159 yr Ho, so I used to know how to make a fireball and change the power of the fireball and everything, but I forgot how, so I had to look around for ways to do it, so I got this. Remember I already have the item working so it has nothing to do with my item not being implemented properly into the game. @Override //shoots fireball // public ItemStack onItemRightClick(ItemStack itemstack, World worldIn, EntityPlayer entityplayer) { if (!worldIn.isRemote) { Vec3 look = entityplayer.getLookVec(); EntityLargeFireball fireball2 = new EntityLargeFireball(worldIn, entityplayer, 1, 1, 1); fireball2.setPosition( entityplayer.posX + look.xCoord * 5, entityplayer.posY + look.yCoord * 5, entityplayer.posZ + look.zCoord * 5); fireball2.accelerationX = look.xCoord * 0.5; fireball2.accelerationY = look.yCoord * 0.5; fireball2.accelerationZ = look.zCoord * 0.5; worldIn.spawnEntityInWorld(fireball2); } return itemstack; } Check out my Mod! http://www.minecraftforge.net/forum/index.php/topic,34988.new.html#new
October 14, 20159 yr EntityLargeFireball fireball2 = new EntityLargeFireball(worldIn, entityplayer, 1, 1, 1); Mmmmm. Magic numbers Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
October 14, 20159 yr The direct damage of the Large Fireball is hardcoded at 6.0 in EntityLargeFireball#onImpact , but the explosion power is controlled by the public EntityLargeFireball#explosionPower field. If you want it to deal a different amount of damage, extend EntityLargeFireball and override onImpact to do the same thing as EntityLargeFireball#onImpact but deal the appropriate amount of damage instead of 6.0. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
October 14, 20159 yr Author I am just trying to change explosion power Thanks for the response though. EntityLargeFireball fireball2 = new EntityLargeFireball(worldIn, entityplayer, 1, 1, 1); Mmmmm. Magic numbers I changed them all to 100 one at a time and nothing changed. Check out my Mod! http://www.minecraftforge.net/forum/index.php/topic,34988.new.html#new
October 15, 20159 yr That is not the strength. They are the acceleration variable, and they just get normalized before usage. So, multiplying some number to them would result in nothing. Seriously, you should try to know what a parameter does before just putting random numbers like 1. I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP) II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.
October 26, 20159 yr Author Sorry about that, anyhow, any ideas? Check out my Mod! http://www.minecraftforge.net/forum/index.php/topic,34988.new.html#new
October 26, 20159 yr Author Nevermind, I got it, it was fireball2.explosionPower = 2; Check out my Mod! http://www.minecraftforge.net/forum/index.php/topic,34988.new.html#new
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.