Jump to content

Recommended Posts

Posted

I'm making a program that calculates damage in almost any possible situation in Minecraft (it's far from finished, even design wise):

 

R35kiXQ.png

 

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?

Posted

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.

Posted

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/

Posted

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/

Posted

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.