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.

GAVINSIGHT

Members
  • Joined

  • Last visited

  1. Issue solved! In the code I added "PeridotArmor peridotBoots = ItemListOld.peridot_boots" and in the ItemListOld class I referred to peridot_boots as "PeridotArmor" rather than "ArmorItem". Solved the issue! Thank you for your help. Crazy, I dreamed the solution when I fell asleep last night.
  2. No, I have ItemList which uses deferred registry and ItemListOld which doesn’t. I switched to deferred registries for a majority of my items but found it much easier to keep my armor and tools within ItemListOld.
  3. public class PeridotArmor extends ArmorItem{ public PeridotArmor(IArmorMaterial materialIn, EquipmentSlotType slot, Properties builder) { super(materialIn, slot, builder); } @Override public void onArmorTick(ItemStack itemStack, World world, PlayerEntity player) { ItemStack boots = player.getItemStackFromSlot(EquipmentSlotType.FEET); if(boots.getItem() == ItemListOld.peridot_boots) { if(!world.isRemote) { player.addPotionEffect(new EffectInstance(Effects.SPEED, 5, 4, false, false, true)); } } } } I updated my code, but it seemed to unfortunately have no effect. I tried swapping the order of the IF statements and adding/removing the booleans
  4. How would I go about adding potion effects on the server side?
  5. GAVINSIGHT joined the community
  6. public class PeridotArmor extends ArmorItem{ public PeridotArmor(IArmorMaterial materialIn, EquipmentSlotType slot, Properties builder) { super(materialIn, slot, builder); } @Override public void onArmorTick(ItemStack itemStack, World world, PlayerEntity player) { ItemStack boots = player.getItemStackFromSlot(EquipmentSlotType.FEET); if(boots.getItem() == ItemListOld.peridot_boots) { player.addPotionEffect(new EffectInstance(Effects.SPEED, 100, 4)); } else player.removePotionEffect(Effects.SPEED); } } I tried writing a class that allowed the player to move faster when wearing the armor. I'm getting no errors but when I apply the piece of armor in game it gives no effect. I've tried rewriting a few things and changing a few things here and there but nothing really seems to work

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.