Crystalite Armor additional effects

This commit is contained in:
Aleksey 2021-05-09 23:37:09 +03:00
parent 5d81d7b448
commit bc53748657
18 changed files with 252 additions and 116 deletions

View file

@ -0,0 +1,20 @@
package ru.betterend.registry;
import net.minecraft.core.Registry;
import net.minecraft.world.entity.ai.attributes.Attribute;
import net.minecraft.world.entity.ai.attributes.AttributeSupplier;
import ru.betterend.item.EndAttribute;
public class EndAttributes {
public final static Attribute BLINDNESS_RESISTANCE = registerAttribute("generic.blindness_resistance", 0.0, true);
public static Attribute registerAttribute(String name, double value, boolean syncable) {
return Registry.register(Registry.ATTRIBUTE, name, new EndAttribute("attribute.name." + name, value).setSyncable(syncable));
}
public static AttributeSupplier.Builder addLivingEntityAttributes(AttributeSupplier.Builder builder) {
return builder.add(EndAttributes.BLINDNESS_RESISTANCE);
}
}