mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-05-03 00:25:17 +02:00
29 lines
761 B
Java
29 lines
761 B
Java
package de.ellpeck.naturesaura.api.aura.type;
|
|
|
|
import de.ellpeck.naturesaura.api.NaturesAuraAPI;
|
|
import net.minecraft.resources.ResourceLocation;
|
|
import net.minecraft.world.level.Level;
|
|
|
|
public interface IAuraType {
|
|
|
|
static IAuraType forLevel(Level level) {
|
|
IAuraType highestType = NaturesAuraAPI.TYPE_OTHER;
|
|
for (IAuraType type : NaturesAuraAPI.AURA_TYPES.values())
|
|
if (type.isPresentInLevel(level) && type.getPriority() > highestType.getPriority())
|
|
highestType = type;
|
|
return highestType;
|
|
}
|
|
|
|
ResourceLocation getName();
|
|
|
|
boolean isPresentInLevel(Level level);
|
|
|
|
int getColor();
|
|
|
|
int getPriority();
|
|
|
|
default boolean isSimilar(IAuraType type) {
|
|
return this == type;
|
|
}
|
|
}
|