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.

Featured Replies

Posted

I want to prevent all animations that happen when the left mouse button is pressed. The problem that I can't find a way to prevent the up-and down movement of the item when the item "recharges". The feature was introduced in 1.9 (I think) and is indicated with a little sword below the crosshair.

 

Edit: solved by overriding Item::getAttributeModifiers

@Override
public Multimap<String, AttributeModifier> getAttributeModifiers(EntityEquipmentSlot slot, ItemStack stack)
{
   Multimap<String, AttributeModifier> multimap = super.getAttributeModifiers(slot, stack);
   multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Tool modifier", 1024, 0));
   return multimap;
}

 

 

  • Author

If you put the item in the off-hand and back in the main-hand the cooldown is back until you switch to a different item (or update the stack somehow else) :/ Is there an event that is thrown when switching items between hands? Also the tooltip of the item now shows 1014 as attackspeed.

 

My second approach is to set the SharedMonsterAttributes.ATTACK_SPEED of the player as high as possible when the item is held because it is used to calculate attack speed of the player (EntityPlayer::getCooledAttackStrength) and then set it back to 4 when a different item is held. This is really hackey and exactly what I wanted to prevent by using the new rendering system but it's better than nothing.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

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.