mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-05 07:16:10 +00:00
Merge pull request #215 from PolyhedralDev/dev/multi-inheritance
Implement multi-inheritance in configs
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import com.dfsek.terra.getGitHash
|
||||
|
||||
val versionObj = Version("5", "3", "3", true)
|
||||
val versionObj = Version("5", "4", "0", true)
|
||||
|
||||
allprojects {
|
||||
version = versionObj
|
||||
|
||||
@@ -17,7 +17,7 @@ dependencies {
|
||||
"shadedApi"("commons-io:commons-io:2.4")
|
||||
|
||||
"shadedApi"("com.dfsek:Paralithic:0.3.2")
|
||||
"shadedApi"("com.dfsek:Tectonic:1.3.1")
|
||||
"shadedApi"("com.dfsek:Tectonic:1.4.0")
|
||||
"shadedApi"("net.jafama:jafama:2.3.2")
|
||||
"shadedApi"("org.yaml:snakeyaml:1.27")
|
||||
"shadedApi"("org.ow2.asm:asm:9.0")
|
||||
|
||||
@@ -29,19 +29,24 @@ public class BiomeInfoCommand implements CommandTemplate {
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender) {
|
||||
|
||||
sender.sendMessage("Biome info for \"" + biome.getID() + "\".");
|
||||
sender.sendMessage("Vanilla biome: " + biome.getVanillaBiomes());
|
||||
|
||||
if(biome instanceof UserDefinedBiome) {
|
||||
BiomeTemplate bio = ((UserDefinedBiome) biome).getConfig();
|
||||
|
||||
if(bio.getExtend() != null) sender.sendMessage("Extends: " + bio.getExtend());
|
||||
if(bio.getExtended().size() == 0) {
|
||||
sender.sendMessage("No Parent Biomes");
|
||||
} else {
|
||||
sender.sendMessage("------Parent Biomes-----");
|
||||
bio.getExtended().forEach(id -> sender.sendMessage(" - " + id));
|
||||
}
|
||||
|
||||
List<TerraStructure> structureConfigs = bio.getStructures();
|
||||
|
||||
if(structureConfigs.size() == 0) sender.sendMessage("No Structures");
|
||||
else {
|
||||
if(structureConfigs.size() == 0) {
|
||||
sender.sendMessage("No Structures");
|
||||
} else {
|
||||
sender.sendMessage("-------Structures-------");
|
||||
for(TerraStructure c : structureConfigs) {
|
||||
sender.sendMessage(" - " + c.getTemplate().getID());
|
||||
|
||||
@@ -30,6 +30,7 @@ import com.dfsek.terra.world.population.items.flora.FloraLayer;
|
||||
import com.dfsek.terra.world.population.items.ores.OreHolder;
|
||||
import com.dfsek.terra.world.population.items.tree.TreeLayer;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
@@ -39,7 +40,6 @@ import java.util.Set;
|
||||
|
||||
@SuppressWarnings({"FieldMayBeFinal", "unused"})
|
||||
public class BiomeTemplate extends AbstractableTemplate implements ValidatedConfigTemplate {
|
||||
|
||||
private final ConfigPack pack;
|
||||
|
||||
@Value("id")
|
||||
@@ -47,7 +47,7 @@ public class BiomeTemplate extends AbstractableTemplate implements ValidatedConf
|
||||
|
||||
@Value("extends")
|
||||
@Default
|
||||
private String extend = null;
|
||||
private List<String> extended = Collections.emptyList();
|
||||
|
||||
@Value("variables")
|
||||
@Abstractable
|
||||
@@ -195,6 +195,10 @@ public class BiomeTemplate extends AbstractableTemplate implements ValidatedConf
|
||||
@Default
|
||||
private Map<String, Integer> colors = new HashMap<>(); // Plain ol' map, so platforms can decide what to do with colors (if anything).
|
||||
|
||||
public List<String> getExtended() {
|
||||
return extended;
|
||||
}
|
||||
|
||||
public Set<String> getTags() {
|
||||
return tags;
|
||||
}
|
||||
@@ -227,10 +231,6 @@ public class BiomeTemplate extends AbstractableTemplate implements ValidatedConf
|
||||
return interpolateElevation;
|
||||
}
|
||||
|
||||
public String getExtend() {
|
||||
return extend;
|
||||
}
|
||||
|
||||
public double getSlantThreshold() {
|
||||
return slantThreshold;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user