12-17-2013, 03:04 AM
How's stuff going? Cannot wait for AI!
New AI for Mobs
|
12-17-2013, 03:04 AM
How's stuff going? Cannot wait for AI!
12-17-2013, 04:16 AM
Its going good. I haven't pushed anything recently just because I am busy with work, but look for a good chunk of code coming up in the next two weeks.
12-18-2013, 07:28 AM
(This post was last modified: 12-18-2013, 07:28 AM by SamJBarney.)
So I've worked out how I think the restructuring of the mob classes should work:
I'm using cUndead and cBaby as mixins to alter how the mobs act. cUndead will handle daylight burning and seeking shade during the day. cBaby will handle the logic for growing up and following the closest adult of that type.
12-18-2013, 07:33 AM
Baby zombies don't grow up as far as I know. I could be wrong though.
12-18-2013, 07:42 AM
True, but that is why they do not inherit from cBaby
Is it wise to have separate classes for grownups and babies? When a baby grows up, does it need to be destroyed and recreated as a different class? Wouldn't a flag in the class be enough? (Mojang does that - they have a cAgeable, from which the respective classes inherit.
Also, why have different classes for the different horses, when all they differ in is the color flag? You don't have a cBlueSheep either
12-19-2013, 02:38 AM
Xombie and Skeleton horses have to burn. That's the only difference. And yeah, the baby code could probably be moved into the main class...
12-19-2013, 04:37 AM
Loading will be tough for separate horse classes.
12-19-2013, 05:45 AM
Loading?
In the MCA files, you will get a "horse" tag, but you'll have to decide which class to use, then have at least 2 separate functions for loading horses - the normal ones and the undead ones - because they won't have a common horse ancestor. It's not impossible, just... impractical.
Do the undead horses even burn in vanilla? I've never seen one, as far as I know, they aren't obtainable without editors. I've watched a few videos, the horses don't burn. No point in making them a separate class, then. |
« Next Oldest | Next Newest »
|