Posted July 28, 201510 yr I'm trying to give the player an AttributeModifier when they sprint, then remove it when they stop, but the way EntityPlayer#isSprinting works makes the game constantly add and remove the modifier, as if isSprinting changes every tick. Is there any way around this?
July 29, 201510 yr Author Okay, on further inspection, it looks like I might be able to fix it if I can find the UUID for sprinting's AttributeModifier. Where can I find it? Does it even exist?
July 29, 201510 yr EntityLivingBase.sprintingSpeedBoostModifierUUID contains the UUID of the sprinting speed boost modifier (as the name suggests). I found this by looking at EntityLivingBase#setSprinting. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
July 29, 201510 yr Author Thanks. Apparently, due to the unusual way that the sprint modifier is applied, it doesn't look like I can apply modifiers in this fashion.
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.