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.

ModderInTraining

Members
  • Joined

  • Last visited

  1. Does any one have a good source for me to use to better learn java?
  2. Im using this, (code inside the proper brackets) but its still not firing
  3. Im doing this in the ItemModArmor Class
  4. Since your all such experienced programmers, how would you do this.
  5. I have a basic knowledge of Java, but it is very basic and limited
  6. Still no success. Im bad at this.
  7. So am i closing it too early? Should I move the brackets to after I add the achievement?
  8. Can someone explain why this isnt working?
  9. My code for checking the armor is working fine, the item in hand is where im struggling.
  10. I tried this but it doesnt seem to accept boolean.
  11. This is the only way I can figure of doing it, how would you suggest I do it?
  12. Would this work? public void onTick(World world, EntityPlayer player, ItemStack itemStack) { int TitaniumArmorPeices = 0; if(player.getArmorInventoryList() != null) { Iterator<ItemStack> iterator = player.getArmorInventoryList().iterator(); while(iterator.hasNext()) { ItemStack stack = iterator.next(); if(stack != null) { if(stack.getItem() instanceof ItemModArmor) { ItemModArmor item = (ItemModArmor) stack.getItem(); if(item.getArmorMaterial() == ModArmor.TitaniumMaterial) { TitaniumArmorPeices++; continue; } } } } } if(TitaniumArmorPeices == 4) { ItemStack getItem = player.getHeldItemMainhand(); ItemStack getItem1 = player.getHeldItemOffhand(); if(player.getHeldItemMainhand() != null) { boolean iterator = player.getHeldItemMainhand().equals(ModCombat.titaniumSword); while (player.getHeldItemOffhand() != null) { boolean iterator1 = player.getHeldItemOffhand().equals(ModCombat.titaniumShield); { continue; } } } } if(player.hasAchievement(AchievementHandler.achievementBulletProof)) { if(!player.hasAchievement(AchievementHandler.achievementBattleReady)) { player.addStat(AchievementHandler.achievementBattleReady); } } }
  13. I havent been modding very long, and dont know very much. What is invoking, and how do you do it?
  14. How should I go about fixing this? Change ItemStack instances to Item instances?

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.