Posted August 20, 201510 yr I'm making a program that calculates damage in almost any possible situation in Minecraft (it's far from finished, even design wise): The problem is this, I can't find a way to get consistent, correct damage values when some mobs hold stuff like wooden axes or gold pickaxes (via commands for adventure maps). I was told forge has that info, but where could can I find it?
August 20, 201510 yr Provided that Mojang / any modders correctly implement their weapon-holding mobs, you'd get the correct attack damage simply by getting the current value for the mob's SharedMonsterAttribute for attackDamage. However, I don't think that mobs calculate their actual total in the same way players do, but you can still use that to get their base damage value (usually) and then use entity#getHeldItem() to get their held ItemStack. Once you have the ItemStack, you can find all of its AttributeModifiers and Enchantments using various methods in ItemStack/Item and via NBT for enchantments. http://i.imgur.com/NdrFdld.png[/img]
August 21, 201510 yr Author Where can I find all of this info? And do I need to pretty much learn how Java and whatnot to fully nail this down?
August 21, 201510 yr Where can I find all of this info? And do I need to pretty much learn how Java and whatnot to fully nail this down? Yes. How else were you planning on obtaining all of this information, if not through code? I also posted some information in your other thread. http://i.imgur.com/NdrFdld.png[/img]
August 21, 201510 yr Where can I find all of this info? And do I need to pretty much learn how Java and whatnot to fully nail this down? Oh, I see. You're making this calculator as a stand-alone application using some other programming language or tool? I thought you meant to make an in-game GUI that was a calculator. I guess one way to do it instead would be to trust the information on the various Minecraft wikis out there. Most of them seem to have information that people got directly from the code (like every item indicates the ID and such, which are from the code). So if you look up each entity, each weapon, each relevant potion (there are only a couple that would affect damage), there may be enough description there. So did you read pages like this one that explains damage: http://minecraft.gamepedia.com/Damage This one explains attributes and attribute modifiers: http://minecraft.gamepedia.com/Attribute#Attributes_available_on_all_living_entities This one explains enchantments: http://minecraft.gamepedia.com/Enchantments#Enchantments Check out my tutorials here: http://jabelarminecraft.blogspot.com/
August 21, 201510 yr Author It seems like damage can be randomized a bit with mobs, so... that would make my program pointless?
August 21, 201510 yr It seems like damage can be randomized a bit with mobs, so... that would make my program pointless? No. You can still give the range. Have a min and max damage calculated. I kinda like the idea of the calculator and your design is nice. It's just that making it accurate will take a bit of detailed attention. Check out my tutorials here: http://jabelarminecraft.blogspot.com/
August 22, 201510 yr Author People keep mentioning how I can print damage done to something. How do I do that? I could just have a spawned entity damage another entity over and over but how do I see the exact damage?
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.