mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-12-22 14:59:22 +01:00
parent
8e66deeb9d
commit
cd740b8485
2 changed files with 6 additions and 6 deletions
|
@ -184,7 +184,7 @@ public final class ModConfig {
|
|||
try {
|
||||
for (String s : this.auraTypeOverrides.get()) {
|
||||
String[] split = s.split("->");
|
||||
DimensionType dim = Objects.requireNonNull(DimensionType.byName(new ResourceLocation(split[0])), "dim");
|
||||
ResourceLocation dim = new ResourceLocation(split[0]);
|
||||
BasicAuraType type = Objects.requireNonNull((BasicAuraType) NaturesAuraAPI.AURA_TYPES.get(new ResourceLocation(split[1])), "type");
|
||||
type.addDimensionType(dim);
|
||||
}
|
||||
|
|
|
@ -13,14 +13,14 @@ public class BasicAuraType implements IAuraType {
|
|||
private final ResourceLocation name;
|
||||
private final int color;
|
||||
private final int priority;
|
||||
private final Set<DimensionType> dimensions = new HashSet<>();
|
||||
private final Set<ResourceLocation> dimensions = new HashSet<>();
|
||||
|
||||
public BasicAuraType(ResourceLocation name, DimensionType dimension, int color, int priority) {
|
||||
this.name = name;
|
||||
this.color = color;
|
||||
this.priority = priority;
|
||||
if (dimension != null)
|
||||
this.dimensions.add(dimension);
|
||||
this.dimensions.add(dimension.getRegistryName());
|
||||
}
|
||||
|
||||
public BasicAuraType register() {
|
||||
|
@ -35,7 +35,7 @@ public class BasicAuraType implements IAuraType {
|
|||
|
||||
@Override
|
||||
public boolean isPresentInWorld(IWorld world) {
|
||||
return this.dimensions.isEmpty() || this.dimensions.contains(world.getDimension().getType());
|
||||
return this.dimensions.isEmpty() || this.dimensions.contains(world.getDimension().getType().getRegistryName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -48,7 +48,7 @@ public class BasicAuraType implements IAuraType {
|
|||
return this.priority;
|
||||
}
|
||||
|
||||
public void addDimensionType(DimensionType type) {
|
||||
this.dimensions.add(type);
|
||||
public void addDimensionType(ResourceLocation typeName) {
|
||||
this.dimensions.add(typeName);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue