Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

SargeantPotato14

Members
  • Joined

  • Last visited

  1. 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)
  2. 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!
  3. 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!
  4. 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.
  5. 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.
  6. K thanks, but how would I make the fireball shoot like a fire ball?
  7. 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.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.