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.

codex

Members
  • Joined

  • Last visited

  1. i knew it was something stupid thanks unfortunately i relatively new to modding
  2. i am trying to mod a bow type object but i keep getting a unreachable code error package net.specwep.stuff.items; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.entity.projectile.EntitySnowball; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.player.*; import net.specwep.stuff.Specwep; import net.specwep.stuff.items.*; import net.specwep.stuff.Entityexpar; public class ItemBow extends Item { public ItemBow() { super(); setCreativeTab(Specwep.Specwep); setUnlocalizedName("bow"); } public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { if (!par3EntityPlayer.capabilities.isCreativeMode) { --par1ItemStack.stackSize; } par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); if (!par2World.isRemote) { par2World.spawnEntityInWorld(new Entityexpar(par2World, par3EntityPlayer)); } return par1ItemStack; ArrowNockEvent event = new ArrowNockEvent( par3EntityPlayer, par1ItemStack); // this is the error this comment isn't actually here MinecraftForge.EVENT_BUS.post(event); if (event.isCanceled()) { return event.result; } if (par3EntityPlayer.capabilities.isCreativeMode || par3EntityPlayer.inventory.hasItem(Items.redstone)) { par3EntityPlayer.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack)); } } public void onPlayerStoppedUsing(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer, int par4) { int j = this.getMaxItemUseDuration(par1ItemStack) - par4; ArrowLooseEvent event = new ArrowLooseEvent(par3EntityPlayer, par1ItemStack, j); MinecraftForge.EVENT_BUS.post(event); if (event.isCanceled()) { return; } j = event.charge; boolean flag = par3EntityPlayer.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, par1ItemStack) > 0; if (flag || par3EntityPlayer.inventory.hasItem(Specwep.expar)) { float f = (float)j / 20.0F; f = (f * f + f * 2.0F) / 3.0F; if ((double)f < 0.1D) { return; } if (f > 1.0F) { f = 1.0F; } EntityArrow entityarrow = new EntityArrow(par2World, par3EntityPlayer, f * 2.0F); if (f == 1.0F) { entityarrow.setIsCritical(true); } int k = EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, par1ItemStack); if (k > 0) { entityarrow.setDamage(entityarrow.getDamage() + (double)k * 0.5D + 0.5D); } int l = EnchantmentHelper.getEnchantmentLevel(Enchantment.punch.effectId, par1ItemStack); if (l > 0) { entityarrow.setKnockbackStrength(l); } if (EnchantmentHelper.getEnchantmentLevel(Enchantment.flame.effectId, par1ItemStack) > 0) { entityarrow.setFire(100); } par1ItemStack.damageItem(1, par3EntityPlayer); par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + f * 0.5F); if (flag) { entityarrow.canBePickedUp = 2; } else { par3EntityPlayer.inventory.consumeInventoryItem(Items.redstone); } if (!par2World.isRemote) { par2World.spawnEntityInWorld(entityarrow); } } }} i cant figure out what i missed
  3. ah makes sense now
  4. i followed the steps in the tutorial http://www.minecraftforge.net/wiki/Installation/Source
  5. i have installed it like i should but i have no build/libs folder or build/classes or build/resources any idea what i did wrong
  6. i try to install forge-1.6.4-9.11.1.965-src it works till it gets to the bottom in which it spits out this Backing up client Backing up server Download of minecraft_server.1.6.4.jar failed hash check, deleting abcf286a14f7a ee82e8bf89270433509 ba3145656b1480122bd8759cecd7b7a1 Something failed verifying minecraft files, see log for details. Decompile Exception: 1 Press any key to continue . . . i am new to modding and any help would be welcome

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.