Posted December 4, 20178 yr Ok, I have a mob that is divided to 7 different breeds or kinds, I want these breeds to have different healths, I cannot use static because I cannot override a subclass especially final using a switch won't work either. I found some mods that made it possible yet using json files?
December 4, 20178 yr I'm not sure what you're doing but you're supposed to be setting health by applying the SharedMonsterAttributes.MAX_HEALTH which you can set to anything you want. Check out my tutorials here: http://jabelarminecraft.blogspot.com/
December 4, 20178 yr 54 minutes ago, TheRPGAdventurer said: Ok, I have a mob that is divided to 7 different breeds or kinds, I want these breeds to have different healths, I cannot use static because I cannot override a subclass especially final using a switch won't work either. I found some mods that made it possible yet using json files? Why dont you define your Maxhealth in the constructor? Please post some code to help us understand
December 5, 20178 yr Author 18 hours ago, ArmamentHaki said: Why dont you define your Maxhealth in the constructor? Please post some code to help us understand Sorry, I am locked with my github account, just gonna upload tommorow or next day
December 5, 20178 yr Author 19 hours ago, ArmamentHaki said: Why dont you define your Maxhealth in the constructor? Please post some code to help us understand https://github.com/PanzerTank101/rotd
December 5, 20178 yr Author Just now, TheRPGAdventurer said: https://github.com/PanzerTank101/rotd I say you wanna lokk at DragonBreed.class
December 6, 20178 yr Author Just now, diesieben07 said: I am assuming you are talking about getBreedHealth? If so, just make it not-static and you can override it. You know what static means, right? I tried using it without static and it gave me 1 health instead of the one I made it to
December 6, 20178 yr Author Just now, diesieben07 said: I am assuming you are talking about getBreedHealth? If so, just make it not-static and you can override it. You know what static means, right? If it's not static or final, it just won't spawn or give me 1 HP
December 6, 20178 yr Author Just now, diesieben07 said: Where do you call this method? Where do you apply this health value? Just now, diesieben07 said: Where do you call this method? Where do you apply this health value? I was applying it in apply entity attribute but removed it lately,
December 6, 20178 yr Author Just now, diesieben07 said: What is "it"? Assuming by "me" you mean the player? If so, you must apply something to the player health, somewhere, right? Where is that code? me I mean the dragon. It shows me 1 HP for the dragon
December 6, 20178 yr Author Just now, diesieben07 said: Ok. Where is the code that spawns the dragon? Where is the health value set? gonna update it back to where I was trying to do it, dragon is spawned via dragonegg block remember? DragonMounts? (DragonEggBlockHandler) sorry for typing too fast, my mom doesn't wanna see me something that has do with minecraft kinda personal, she's gone now tho.
December 6, 20178 yr Author Just now, diesieben07 said: Ok. Where is the code that spawns the dragon? Where is the health value set? ok got it! You just need to ensure it's static or final when applying health to mobs or other attributes public static double getBreedHealth() { EnumDragonBreed end = EnumDragonBreed.END; EnumDragonBreed nether = EnumDragonBreed.NETHER; if(end != null) { return 100; } else if(nether != null) { return 95; } return 85.0D; }
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.