mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-18 14:50:56 +00:00
add parent info to BiomeInfoCommand
This commit is contained in:
@@ -29,17 +29,24 @@ public class BiomeInfoCommand implements CommandTemplate {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(CommandSender sender) {
|
public void execute(CommandSender sender) {
|
||||||
|
|
||||||
sender.sendMessage("Biome info for \"" + biome.getID() + "\".");
|
sender.sendMessage("Biome info for \"" + biome.getID() + "\".");
|
||||||
sender.sendMessage("Vanilla biome: " + biome.getVanillaBiomes());
|
sender.sendMessage("Vanilla biome: " + biome.getVanillaBiomes());
|
||||||
|
|
||||||
if(biome instanceof UserDefinedBiome) {
|
if(biome instanceof UserDefinedBiome) {
|
||||||
BiomeTemplate bio = ((UserDefinedBiome) biome).getConfig();
|
BiomeTemplate bio = ((UserDefinedBiome) biome).getConfig();
|
||||||
|
|
||||||
|
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();
|
List<TerraStructure> structureConfigs = bio.getStructures();
|
||||||
|
|
||||||
if(structureConfigs.size() == 0) sender.sendMessage("No Structures");
|
if(structureConfigs.size() == 0) {
|
||||||
else {
|
sender.sendMessage("No Structures");
|
||||||
|
} else {
|
||||||
sender.sendMessage("-------Structures-------");
|
sender.sendMessage("-------Structures-------");
|
||||||
for(TerraStructure c : structureConfigs) {
|
for(TerraStructure c : structureConfigs) {
|
||||||
sender.sendMessage(" - " + c.getTemplate().getID());
|
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.ores.OreHolder;
|
||||||
import com.dfsek.terra.world.population.items.tree.TreeLayer;
|
import com.dfsek.terra.world.population.items.tree.TreeLayer;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
@@ -39,12 +40,15 @@ import java.util.Set;
|
|||||||
|
|
||||||
@SuppressWarnings({"FieldMayBeFinal", "unused"})
|
@SuppressWarnings({"FieldMayBeFinal", "unused"})
|
||||||
public class BiomeTemplate extends AbstractableTemplate implements ValidatedConfigTemplate {
|
public class BiomeTemplate extends AbstractableTemplate implements ValidatedConfigTemplate {
|
||||||
|
|
||||||
private final ConfigPack pack;
|
private final ConfigPack pack;
|
||||||
|
|
||||||
@Value("id")
|
@Value("id")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
@Value("extends")
|
||||||
|
@Default
|
||||||
|
private List<String> extended = Collections.emptyList();
|
||||||
|
|
||||||
@Value("variables")
|
@Value("variables")
|
||||||
@Abstractable
|
@Abstractable
|
||||||
@Default
|
@Default
|
||||||
@@ -191,6 +195,10 @@ public class BiomeTemplate extends AbstractableTemplate implements ValidatedConf
|
|||||||
@Default
|
@Default
|
||||||
private Map<String, Integer> colors = new HashMap<>(); // Plain ol' map, so platforms can decide what to do with colors (if anything).
|
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() {
|
public Set<String> getTags() {
|
||||||
return tags;
|
return tags;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user