Steps to reproduce:
Create a void world with the provided data pack.
Use the following commands to create and display a scoreboard:
/scoreboard objectives add Health dummy "Health" /scoreboard objectives setdisplay sidebar Health
Place an always active repeating command block with the following command:
execute as @p at @s as @n[type=!minecraft:player] store result score @s Health run data get entity @s Health 1000000
Spawn some mob in a cage: the scoreboard will display its health with a precision of 1 millionth.
Enchant a weapon with the
squeaky:squeaky
enchantment, which multiplies the weapon's damage by 0, resulting in a weapon dealing 0 damage.Hit the mob, multiple times to ensure the enchantment's behavior: its health will not change as expected.
Hit the mob faster, at least faster than one hit every 400ms for a sword from what I noticed, if possible with an auto-clicker to get a consistant timing but simply spamming also does the trick.
Observed result:
The mob will sometimes take a very small amount of damage, less than 0.1 HP.
Expected result:
The mob does not take damage.
Attachments
Comments 3
I've already reported the critical hit issue too, but it's already tracked in MC-272004 and at this point we can't state that both issues are related.
Still in 1.21-RC1, with an even stronger effect I just found: if your enchantment adds a high enough negative value, you can one shot (or rather, two shots) a warden by hitting it twice quickly.
Absolute nonsense.
{
"description": "Negative Damage",
"supported_items": "#minecraft:enchantable/weapon",
"weight": 1,
"max_level": 1,
"min_cost": {
"base": 0,
"per_level_above_first": 0
},
"max_cost": {
"base": 0,
"per_level_above_first": 0
},
"anvil_cost": 0,
"slots": [
"mainhand"
],
"effects": {
"minecraft:damage": [
{
"effect": {
"type": "minecraft:add",
"value": -999
}
}
]
}
}
I have faced same issue and if you crit using that weapon it does the crit damage as well. I have attached by enchantment file here as it is little different.