SargeantPotato14
Members-
Posts
9 -
Joined
-
Last visited
Converted
-
Gender
Undisclosed
-
Personal Text
I am new!
SargeantPotato14's Achievements
Tree Puncher (2/8)
0
Reputation
-
I don't know if this is the most proper way to do it but I added the eye height already by putting + 1 after player.posY (player.posY + 1)
-
-
package com.SargeantPotato_Mod.Items; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityFireball; import net.minecraft.entity.projectile.EntitySmallFireball; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.Vec3; import net.minecraft.world.World; public class staffoffire extends Item { public staffoffire(int i) { this.setUnlocalizedName("staffoffire"); this.setTextureName("SargeantPotato_Mod:staffoffire"); this.setCreativeTab(CreativeTabs.tabCombat); } public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) { Vec3 v3 = player.getLook(0); EntitySmallFireball smallfireball = new EntitySmallFireball(world, player, v3.xCoord, v3.yCoord, v3.zCoord); world.spawnEntityInWorld(smallfireball); return itemStack; } } This is my code, the getLookVec didn't work, and im confused where to put the pitch and yaw piece of code. also where exactly should I put the if (!world.isRemote) { }? ive tried to move it around but I cant figure out where to put it........ sorry about the trouble but since your good at this I would like to learn some from you.Thanks!
-
One last problem, when I use the item it shoots two fire balls in some what random of directions. THANK YOU, for all the other things you helped me with!
-
EntityFireball fireball = new EntityFireball(world, player, v3.xCoord, v3.yCoord, v3.zCoord); world.spawnEntityInWorld(fireball); where the coding says(new EntityFireball......) there is a error saying "Cannot instantiate the type EntityFireball" if you could help that would be much appreciated, I don't know what instantiate means so im am extremely confused.
-
thanks! Could I ask where you learned to do this? I'm somewhat new to moding and I would like to learn as much as possible.
-
K thanks, but how would I make the fireball shoot like a fire ball?
-
So I created the new item and what not, but I have not figured out how to spawn per say a fireball on right click. If anyone has an idea please post.