Attribute id fix

This commit is contained in:
Aleksey 2021-05-10 12:10:13 +03:00
parent 4dc7559044
commit ef979b0841

View file

@ -3,13 +3,14 @@ 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.BetterEnd;
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));
return Registry.register(Registry.ATTRIBUTE, BetterEnd.makeID(name), new EndAttribute("attribute.name." + name, value).setSyncable(syncable));
}
public static AttributeSupplier.Builder addLivingEntityAttributes(AttributeSupplier.Builder builder) {