1.9.1 Sword damage higher than set value. (SOLVED)

Started by StellaeLux on

Topic category: Troubleshooting, bugs, and solutions

Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
1.9.1 Sword damage higher than set value. (SOLVED)
Tue, 10/01/2019 - 11:13 (edited)

So I created a sword that is supposed to deal 6 damage against mobs and a sword that deals 8 damage against mobs. In game, the 6 damage sword deals 10 damage and the 8 damage sword deals 12 damage.

Settings: 

Harv lvl: 2, Efficiency: 2, Enchantability: 30, Damage vs mobs: 6, Uses: 83

Harv lvl: 4, Efficiency: 4, Enchantability: 10, Damage vs mobs: 8, Uses: 283

Why does this happen?

Edited by StellaeLux on Tue, 10/01/2019 - 11:13
It could be that in code…
Tue, 10/01/2019 - 07:33

It could be that in code parameters and ingame values are not the same but calculated inside the code. This is the case with some other variables too.

Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Okey so I discovered it is…
Tue, 10/01/2019 - 11:18

Okey so I discovered it is simply increasing the base value by 4. Guessing because the base value for a wooden sword is 4 and thus the minimal amount of damage.

I wonder if it is preferable to have MCreator adjust these values internally, making it so that 6 mob damage will also actually be 6 mob damage. There are also other issues that would easily be solved, just like:

https://mcreator.net/forum/53539/solving-coordinates-changed-offset-1 & https://mcreator.net/comment/96361 where if MCreator could handle these values internally, such problems would never manually appear to end users. Would something like this be possible for future updates? (It would probably cause problems with workspaces like mine where I manually solved them and having them solved causes my solution to unsolve the problem, but it'd probably be worth it)

The problem with internally…
Tue, 10/01/2019 - 15:28

The problem with internally offsetting is that it can get confusing when updating Minecraft version as offsets could change, but hardcoded versions not.

It is a similar problem with IDs. For example, dimension IDs are offset by 2 currently internally as you suggest, but if a new dimension is added, offset would change and so would dimension ID.

Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
In 1.9.1. Tools…
Sat, 10/12/2019 - 17:42

In 1.9.1. Tools automatically change the value of "Damage vs mobs/animals" to:

Swords: Adds +4

Pickaxe: Adds +2

Axe: Adds +2

Shovel: Adds +2

Hoe: Is set to 1.

Keep this in mind when creating tools. If you make a sword: Damage vs mobs/animals: 4, then your sword will deal 8 damage in game.