Posted May 18, 201411 yr I want to make my own attributes , like damage resistance and stuff like that. I'm loving attribute system , and how it works.So question is - can i make my own attribute?
May 18, 201411 yr Yes, you can, but if you want your attribute to be included in vanilla mobs, you will have to add it either via ASM or during EntityJoinWorldEvent, at which point you can add it to the attribute map with whatever value you want. http://i.imgur.com/NdrFdld.png[/img]
May 18, 201411 yr Author no i want them to be added to players , and stuff like that , by myself in mod.I want make items that will give some effects , but i dont want to make own attribute system , if there is alredy one exists And its good , what i can make that.Can you give example of cheking , does player have attribute or no?
May 18, 201411 yr You will still need to add the attributes to the player somehow, possibly with IExtendedEntityProperties or during EntityConstructing event. As for checking the attributes, just look at any of the vanilla Entity classes and you will see plenty of examples of adding and checking attributes. http://i.imgur.com/NdrFdld.png[/img]
May 18, 201411 yr Author You will still need to add the attributes to the player somehow, possibly with IExtendedEntityProperties or during EntityConstructing event. As for checking the attributes, just look at any of the vanilla Entity classes and you will see plenty of examples of adding and checking attributes. you can easy add attributes via potions....Heh , will search if noone know that...maybe will make tuts for people like me
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.