mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-16 13:23:07 +00:00
Reformat
This commit is contained in:
@@ -7,8 +7,6 @@
|
||||
|
||||
package com.dfsek.terra.addons.biome;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -21,14 +19,12 @@ import com.dfsek.terra.api.world.biome.PlatformBiome;
|
||||
* Class representing a config-defined biome
|
||||
*/
|
||||
public class UserDefinedBiome implements Biome {
|
||||
private PlatformBiome platformBiome;
|
||||
|
||||
private final String id;
|
||||
private final BiomeTemplate config;
|
||||
private final int color;
|
||||
private final Set<String> tags;
|
||||
|
||||
private final Context context = new Context();
|
||||
private PlatformBiome platformBiome;
|
||||
|
||||
public UserDefinedBiome(BiomeTemplate config) {
|
||||
this.id = config.getID();
|
||||
@@ -49,20 +45,20 @@ public class UserDefinedBiome implements Biome {
|
||||
return Optional.ofNullable(platformBiome);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPlatformBiome(PlatformBiome biome) {
|
||||
if(platformBiome != null) {
|
||||
throw new IllegalStateException("Platform biome already set");
|
||||
}
|
||||
|
||||
|
||||
this.platformBiome = biome;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> getTags() {
|
||||
return tags;
|
||||
|
||||
@@ -12,6 +12,6 @@ public class StructureGenerationStage implements GenerationStage {
|
||||
|
||||
@Override
|
||||
public void populate(ProtoWorld world) {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
package com.dfsek.terra.api.world.biome;
|
||||
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -29,6 +27,11 @@ public interface Biome extends PropertyHolder, StringIdentifiable {
|
||||
*/
|
||||
Optional<PlatformBiome> getPlatformBiome();
|
||||
|
||||
/**
|
||||
* Sets the platform biome this custom biome delegates to.
|
||||
*/
|
||||
void setPlatformBiome(PlatformBiome biome);
|
||||
|
||||
/**
|
||||
* Get the color of this biome.
|
||||
*
|
||||
@@ -42,9 +45,4 @@ public interface Biome extends PropertyHolder, StringIdentifiable {
|
||||
* @return A {@link Set} of String tags this biome holds.
|
||||
*/
|
||||
Set<String> getTags();
|
||||
|
||||
/**
|
||||
* Sets the platform biome this custom biome delegates to.
|
||||
*/
|
||||
void setPlatformBiome(PlatformBiome biome);
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public class InternalAddon implements BaseAddon {
|
||||
private static final Version VERSION = Versions.getVersion(1, 0, 0);
|
||||
|
||||
public InternalAddon() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -84,7 +84,7 @@ public class BootstrapAddonLoader implements BootstrapBaseAddon<BootstrapBaseAdd
|
||||
Path bootstrapFolder = addonsFolder.resolve("bootstrap");
|
||||
Files.createDirectories(bootstrapFolder);
|
||||
logger.debug("Loading bootstrap addons from {}", bootstrapFolder);
|
||||
|
||||
|
||||
try(Stream<Path> bootstrapAddons = Files.walk(bootstrapFolder, 1, FileVisitOption.FOLLOW_LINKS)) {
|
||||
return bootstrapAddons.filter(path -> path.toFile().isFile())
|
||||
.filter(path -> path.toFile().canRead())
|
||||
@@ -96,7 +96,7 @@ public class BootstrapAddonLoader implements BootstrapBaseAddon<BootstrapBaseAdd
|
||||
throw new UncheckedIOException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getID() {
|
||||
return "BOOTSTRAP";
|
||||
|
||||
Reference in New Issue
Block a user