NaturesAura/src/main/java/de/ellpeck/naturesaura/api/aura/type/IAuraType.java

29 lines
753 B
Java
Raw Normal View History

package de.ellpeck.naturesaura.api.aura.type;
import de.ellpeck.naturesaura.api.NaturesAuraAPI;
import net.minecraft.util.ResourceLocation;
2020-01-21 21:04:44 +01:00
import net.minecraft.world.IWorld;
public interface IAuraType {
2020-01-21 21:04:44 +01:00
static IAuraType forWorld(IWorld world) {
IAuraType highestType = NaturesAuraAPI.TYPE_OTHER;
for (IAuraType type : NaturesAuraAPI.AURA_TYPES.values())
if (type.isPresentInWorld(world) && type.getPriority() > highestType.getPriority())
highestType = type;
return highestType;
}
ResourceLocation getName();
2020-01-21 21:04:44 +01:00
boolean isPresentInWorld(IWorld world);
int getColor();
int getPriority();
default boolean isSimilar(IAuraType type) {
return this == type;
}
}