NovaViper Posted April 23, 2016 Author Posted April 23, 2016 Oh Choonster, I notice that whenever I make the entity the baby, it's stats do not change Source is on Github Quote Main Developer and Owner of Zero Quest Visit the Wiki for more information If I helped anyone, please give me a applaud and a thank you!
Choonster Posted April 23, 2016 Posted April 23, 2016 Oh Choonster, I notice that whenever I make the entity the baby, it's stats do not change Source is on Github Are they supposed to? Does that happen for vanilla entities? 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.
NovaViper Posted April 23, 2016 Author Posted April 23, 2016 It's suppose to and I think it does the same for Vanilla Wolves, their code is like this: if (this.isTamed()) { this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(20.0D); } else { this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(8.0D); } Quote Main Developer and Owner of Zero Quest Visit the Wiki for more information If I helped anyone, please give me a applaud and a thank you!
Choonster Posted April 23, 2016 Posted April 23, 2016 It's suppose to and I think it does the same for Vanilla Wolves, their code is like this: if (this.isTamed()) { this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(20.0D); } else { this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(8.0D); } That's checking whether the Wolf is tamed, not whether it's a baby. 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.
NovaViper Posted April 23, 2016 Author Posted April 23, 2016 I know but I've done this and it doesn't change if (!this.isChild()) { if (this.isTamed()) { this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(50.0D); this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(6.0D); } else { this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(40.0D); this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(6.0D); } } else { this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(10.0D); this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(1.0D); } Quote Main Developer and Owner of Zero Quest Visit the Wiki for more information If I helped anyone, please give me a applaud and a thank you!
coolAlias Posted April 24, 2016 Posted April 24, 2016 I've found that NBT is read AFTER applyEntityAttributes(), so #isChild will always return false at that time. I got around it by adjusting those particular attributes as needed from the #readFromNBT method and/or when the entity first joins the world. Quote http://i.imgur.com/NdrFdld.png[/img]
NovaViper Posted April 27, 2016 Author Posted April 27, 2016 Hey, I'm trying to make my entity jump whenever I press the spacebar when riding on it. Source code is this build Quote Main Developer and Owner of Zero Quest Visit the Wiki for more information If I helped anyone, please give me a applaud and a thank you!
BusyBeever Posted April 27, 2016 Posted April 27, 2016 You should open a new thread for it, this is getting outta control Quote
NovaViper Posted April 27, 2016 Author Posted April 27, 2016 Ok Quote Main Developer and Owner of Zero Quest Visit the Wiki for more information If I helped anyone, please give me a applaud and a thank you!
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.