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.

onContentStop

Members
  • Joined

  • Last visited

Everything posted by onContentStop

  1. Thanks for replying, but I realized I was being unnecessarily stupid. I made a general Armor class and overrode onArmorTick() there to check each individual slot. Here's the code in progress: @Override public void onArmorTick (World world, EntityPlayer player, ItemStack stack) { int aAmt = 0;//amethyst = regen int aCap = 3; int sAmt = 0;//sapphire = resist int sCap = 3; int rAmt = 0;//ruby = strength int rCap = 3; int tAmt = 0;//topaz = haste int tCap = 3; //checks for amethyst if(player.getCurrentArmor(0) != null && player.getCurrentArmor(0).getItem().equals(oncontentstop.amethystBoots)) aAmt++; if (player.getCurrentArmor(1) != null && player.getCurrentArmor(1).getItem().equals(oncontentstop.amethystLeggings)) aAmt++; if(player.getCurrentArmor(2) != null && player.getCurrentArmor(2).getItem().equals(oncontentstop.amethystChestplate)) aAmt++; if(player.getCurrentArmor(3) != null && player.getCurrentArmor(3).getItem().equals(oncontentstop.amethystHelmet)) aAmt++; if(aAmt > 0) player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 5, aAmt > aCap ? aAmt - 1 : aCap)); //checks for sapphire if(player.getCurrentArmor(0) != null && player.getCurrentArmor(0).getItem().equals(oncontentstop.sapphireBoots)) sAmt++; if(player.getCurrentArmor(1) != null && player.getCurrentArmor(1).getItem().equals(oncontentstop.sapphireLeggings)) sAmt++; if(player.getCurrentArmor(2) != null && player.getCurrentArmor(2).getItem().equals(oncontentstop.sapphireChestplate)) sAmt++; if(player.getCurrentArmor(3) != null && player.getCurrentArmor(3).getItem().equals(oncontentstop.sapphireHelmet)) sAmt++; if(sAmt > 0) player.addPotionEffect(new PotionEffect(Potion.resistance.id, 5, sAmt > sCap ? sAmt - 1 : sCap)); //checks for ruby if(player.getCurrentArmor(0) != null && player.getCurrentArmor(0).getItem().equals(oncontentstop.rubyBoots)) rAmt++; if(player.getCurrentArmor(1) != null && player.getCurrentArmor(1).getItem().equals(oncontentstop.rubyLeggings)) rAmt++; if(player.getCurrentArmor(2) != null && player.getCurrentArmor(2).getItem().equals(oncontentstop.rubyChestplate)) rAmt++; if(player.getCurrentArmor(3) != null && player.getCurrentArmor(3).getItem().equals(oncontentstop.rubyHelmet)) rAmt++; if(rAmt > 0) player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 5, rAmt > rCap ? rAmt - 1 : rCap)); //checks for topaz if(player.getCurrentArmor(0) != null && player.getCurrentArmor(0).getItem().equals(oncontentstop.topazBoots)) tAmt++; if(player.getCurrentArmor(1) != null && player.getCurrentArmor(1).getItem().equals(oncontentstop.topazLeggings)) tAmt++; if(player.getCurrentArmor(2) != null && player.getCurrentArmor(2).getItem().equals(oncontentstop.topazChestplate)) tAmt++; if(player.getCurrentArmor(3) != null && player.getCurrentArmor(3).getItem().equals(oncontentstop.topazHelmet)) tAmt++; if(tAmt > 0) player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 5, tAmt > tCap ? tAmt - 1 : tCap)); } But just to make sure, am I making any grave mistakes here? edit: added code
  2. I'm making a simple mod that adds new ores and I want to apply a custom status effect only when the player is wearing a full set of my armor. However, I've only succeeded in checking if ONE armor piece is equipped by putting the code in the custom helmet class, chestplate class, etc. How do I check the full equip list of a player in one tick and apply status effects based on that?
  3. Thank you, I'll see if I can do use the reflexible recipe.
  4. I mean something like how Axes and Hoes can be crafted inverted to the default recipe (facing left or right).
  5. I want to create a reversible recipe (e.g axes). Is there a built-in way to do this or do I just have to create two shaped recipes?
  6. Of course. My mods folder had a few mods from a while back, and they were the cause of the problem.
  7. I am experiencing this exact problem, here is a log: http://pastebin.com/RWs7k69D

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.