June 17, 201510 yr Author Nvm that post, for the entity's bounding box to update, how do I let the client know that I am changing the entity's bounding box? Should I send a packet to the client via packethandler? 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!
June 17, 201510 yr Depends - is your 'evolution stage' or whatever stored in DataWatcher? If so, the client already knows about it and you can just set the bounding box on both sides. If not, then you'll need to tell the client what stage the entity is at so it can set the bounding box. One way to do that is custom packets; another is to use worldObj.setEntityState(this, some_byte_flag) which automatically sends a packet for you and that packet calls your entity's handleHealthUpdate(some_byte_flag) method. This is the method wolves and other animals use to spawn hearts when in love, villagers use to spawn various particles, and even golems use this to initiate their attack animation. So you could define some byte flags, e.g. FIRST_STAGE = 5, FINAL_STAGE = 6, and send those via the entity state. Just take a look at every class that your entity inherits from to make sure you are not duplicating any byte flags. Won't cause any critical bugs if you don't (unlike DataWatcher indices), but it's better to check. http://i.imgur.com/NdrFdld.png[/img]
June 17, 201510 yr Author The stages are stored in datawatchers but it still isn't switching 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!
June 17, 201510 yr Author It's still not updating even though I checked to make sure that it is changing but it isn't 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.