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.

Reikenz

Members
  • Joined

  • Last visited

Everything posted by Reikenz

  1. Small mistake x) When I put a breakpoint on the damage item it does not work Resolved juste im in creative mod...
  2. Hello everyone, I have a small problem my item is working properly, but does not lose durability while I withdraw from it I watched a lot of English subjects without finding the answer. Here is my code: public ItemEffect(String name, int maxDamage, int stackSize, int coolDown, PotionEffect effect) { super(name); this.setMaxDamage(maxDamage); this.setMaxStackSize(stackSize); this.setFull3D(); this.effect = effect; this.coolDown = coolDown; } @Override public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand handIn) { ItemStack itemStack = playerIn.getHeldItemMainhand(); if(worldIn.isRemote) { return new ActionResult<>(EnumActionResult.FAIL, itemStack); } if (!playerIn.inventory.hasItemStack(itemStack)) { return new ActionResult<>(EnumActionResult.FAIL, itemStack); } if (itemStack.getItemDamage() > itemStack.getMaxDamage()) { return new ActionResult<>(EnumActionResult.FAIL, itemStack); } playerIn.addPotionEffect(new PotionEffect(effect.getPotion(), effect.getDuration(), effect.getAmplifier(), effect.getIsAmbient(), effect.doesShowParticles())); playerIn.getCooldownTracker().setCooldown(this, coolDown); itemStack.damageItem(1, playerIn); itemStack.shrink(1); return new ActionResult<>(EnumActionResult.SUCCESS, itemStack); } Thank you in advance to the person who will help me.

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.