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.

Fleamm

Members
  • Joined

  • Last visited

  1. I can't for the life of me figure this out: I essentially want to alter the base attack damage on items as such: Example: Wooden sword is in players hand, upon some event, the base attack of 4 (as shown on the grey text in the default vanilla item lore) increases to 4.5, or 5, or whatever. WITHOUT changing the other attributes, such as attack speed (currently i found a way to somehow change the attack damage, but only by resetting all the NBT tags of the item, which removes the attack speed) Also this changes the way the text is shown on the item, it changes it from teh default grey text to the blue ones. Anyway, whats the correct way to do this, here is what i currently tried: Object[] dmg = (upgradeItem.getAttributeModifiers(EntityEquipmentSlot.MAINHAND).get((SharedMonsterAttributes.ATTACK_DAMAGE).getName())).toArray(); NBTTagCompound attackBoost = new NBTTagCompound(); attackBoost.setInteger("generic.attackDamage", 10); upgradeItem.setTagCompound(attackBoost); upgradeItem.addAttributeModifier((SharedMonsterAttributes.ATTACK_DAMAGE).getName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", ((AttributeModifier) dmg[0]).getAmount()+0.5D, 0), EntityEquipmentSlot.MAINHAND); Idk what im doing with this so sorry if its horribly screwed up, ive been trying to make this work for over 12h and my brains fried...

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.