What I expected to happen was...
Attacking mobs with AbsorptionAmount set to 2049 or higher will still be calculated correctly as in previous versions
What actually happened was...
Even if AbsorptionAmount is set to 2049 or higher, it will be treated as if it were 2048.
Step to reproduce
Run the following commands in order.
/summon creeper
/attribute @e[type=creeper,limit=1] minecraft:generic.max_absorption base set 20000
/data modify entity @e[type=minecraft:creeper,limit=1] AbsorptionAmount set value 20000f
Then attack the mob and get the data using the command below.
/data get entity @e[distance=0.5..,sort=nearest,limit=1] AbsorptionAmount
Data is displayed as damage based on 2048, not 20000.
In previous versions, it was possible to set a value much larger than 2048 because the maximum value was not tied to an Attribute, but this is no longer possible in the current version.
Comments 10
Map makers use absorption as a replacement for health if they need to run commands at the death of their mob. Some of those mobs used a lot more health than 2048.
There is another way though, use a score for health, subtract the amount of damage the mob got from the score, and heal the mob again.
Pretty much the same complaints existed when max health got capped.
I'm not sure if this applies to your use case, but in the custom map we're creating, there are mobs with over 10,000 HP. Since the health limit is 2048, the map was using AbsorptionAmount instead.
With that workaround, if a mob receives damage that exceeds the sum of its health and absorption (4056) at once, isn't there a problem that the calculation cannot be performed and the mob dies?
While possible, that's not really a new problem (just lower limit) and can just be avoided by reducing weapon strength. Only case of that damage amount ever being given is custom weapons.
At least in our map, we need to deal a lot of damage from a user experience perspective, and lowering weapon damage is probably not a direct solution.
Hi, I'm current making map use high HP(absorption) on 1.20.1
I want move 1.20.4(for majorly reason use macros) but this bug not allow me to move versions. If this bugs won't fix, I must use scoreboard HP calculation, but it isn't lag friendly cuz I have to detect "entity damaged" and store health to scoreboard every tick.
I am in trouble because from now on it will be impossible to create mobs with very high health.