Tybonel13 Posted October 30, 2021 Posted October 30, 2021 Hello! I'm currently working on a mob and I would like its stats to be able to change depending on what/how many mobs are around it, such as dealing knockback if a certain mob is in range, or having N health where N is the number of nearby mobs. I was hoping to be able to use the attributes for this (.MAX_HEALTH, .FOLLOW_RANGE, .MOVEMENT_SPEED, etc.) but that has been proving more difficult than I anticipated. Are there any other ways I can set many different stats for my entity, but dynamically as mobs move in and out of range as opposed to the attributes which are seemingly only on setup? Quote
Tybonel13 Posted October 30, 2021 Author Posted October 30, 2021 That's good to hear, I really liked the way attributes had all the stats laid out. Though when I was looking for ways to edit them I couldn't find much, running setCustomAttributes in my entity didn't seem to change the stats at all and both the EntityAttributeCreationEvent and the EntityAttributeModificationEvent didn't quite seem to be what I was looking for. What would I need to do change them as often as I'm trying to? Quote
Tybonel13 Posted October 30, 2021 Author Posted October 30, 2021 2 hours ago, Tybonel13 said: What would I need to do change them as often as I'm trying to? Finally found something, turns out I was overcomplicating it. Instead of firing events or trying to change baked-in methods I can just set values of the attributes directly. 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.