Ferrettomato Posted July 28, 2015 Posted July 28, 2015 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? Quote
Ferrettomato Posted July 29, 2015 Author Posted July 29, 2015 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? Quote
Choonster Posted July 29, 2015 Posted July 29, 2015 EntityLivingBase.sprintingSpeedBoostModifierUUID contains the UUID of the sprinting speed boost modifier (as the name suggests). I found this by looking at EntityLivingBase#setSprinting. Quote 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.
Ferrettomato Posted July 29, 2015 Author Posted July 29, 2015 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. Quote
Recommended Posts
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.