implement PropertyHolder in TerraBiome

This commit is contained in:
dfsek
2021-07-17 10:23:40 -07:00
parent 60edef989c
commit b1589ed046
2 changed files with 9 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
package com.dfsek.terra.addons.biome;
import com.dfsek.terra.api.properties.Context;
import com.dfsek.terra.api.util.collection.ProbabilityCollection;
import com.dfsek.terra.api.world.World;
import com.dfsek.terra.api.world.biome.Biome;
@@ -19,6 +20,7 @@ public class UserDefinedBiome implements TerraBiome {
private final int color;
private final Set<String> tags;
private final Context context = new Context();
public UserDefinedBiome(ProbabilityCollection<Biome> vanilla, UserDefinedGenerator gen, BiomeTemplate config) {
this.vanilla = vanilla;
@@ -68,4 +70,9 @@ public class UserDefinedBiome implements TerraBiome {
public String toString() {
return "{BIOME:" + getID() + "}";
}
@Override
public Context getContext() {
return context;
}
}

View File

@@ -1,6 +1,7 @@
package com.dfsek.terra.api.world.biome;
import com.dfsek.terra.api.properties.PropertyHolder;
import com.dfsek.terra.api.util.collection.ProbabilityCollection;
import com.dfsek.terra.api.world.World;
@@ -9,7 +10,7 @@ import java.util.Set;
/**
* Represents a custom biome
*/
public interface TerraBiome {
public interface TerraBiome extends PropertyHolder {
/**
* Gets the Vanilla biome to represent the custom biome.