Allow placing heavy on all armour

This commit is contained in:
Sollace 2023-04-29 23:29:44 +01:00
parent e92f1ddbe1
commit f63a30369a

View file

@ -34,7 +34,7 @@ public interface UEnchantments {
/**
* Heavy players move more slowly but are less likely to be flung around wildly.
*/
Enchantment HEAVY = register("heavy", new AttributedEnchantment(Rarity.COMMON, EnchantmentTarget.ARMOR_FEET, false, 4, EquipmentSlot.FEET))
Enchantment HEAVY = register("heavy", new AttributedEnchantment(Rarity.COMMON, EnchantmentTarget.ARMOR, false, 4, EquipmentSlot.HEAD, EquipmentSlot.CHEST, EquipmentSlot.LEGS, EquipmentSlot.FEET))
.addModifier(EntityAttributes.GENERIC_MOVEMENT_SPEED, (user, level) -> {
return new EntityAttributeModifier(UUID.fromString("a3d5a94f-4c40-48f6-a343-558502a13e10"), "Heavyness", (1 - level/(float)10) - 1, Operation.MULTIPLY_TOTAL);
});