April 23, 20169 yr Author Oh Choonster, I notice that whenever I make the entity the baby, it's stats do not change Source is on Github 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!
April 23, 20169 yr 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? 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.
April 23, 20169 yr Author 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); } 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!
April 23, 20169 yr 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. 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.
April 23, 20169 yr Author 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); } 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!
April 24, 20169 yr 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. http://i.imgur.com/NdrFdld.png[/img]
April 27, 20169 yr Author Hey, I'm trying to make my entity jump whenever I press the spacebar when riding on it. Source code is this build 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!
April 27, 20169 yr Author Ok 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!
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.