Skip to content

Commit

Permalink
tryPlaceFeature's return value is never used.
Browse files Browse the repository at this point in the history
  • Loading branch information
noobanidus committed Dec 28, 2021
1 parent b75e0b6 commit 99167d0
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/main/java/mysticmods/mysticalworld/init/ModFeatures.java
Expand Up @@ -96,10 +96,10 @@ public static void generateFeatures() {
public static void load() {
}

private static boolean tryPlaceFeature(BiomeLoadingEvent event, Set<BiomeDictionary.Type> types, FeatureConfig<?> config) {
private static void tryPlaceFeature(BiomeLoadingEvent event, Set<BiomeDictionary.Type> types, FeatureConfig<?> config) {
for (BiomeDictionary.Type rest : config.getBiomeRestrictions()) {
if (types.contains(rest)) {
return false;
return;
}
}
boolean place = false;
Expand All @@ -115,25 +115,23 @@ private static boolean tryPlaceFeature(BiomeLoadingEvent event, Set<BiomeDiction
}
}
if (!place) {
return false;
return;
}
if (config.isFeature()) {
Supplier<ConfiguredFeature<?, ?>> sup = config.getFeature();
if (sup == null) {
return false;
return;
}
event.getGeneration().getFeatures(config.getStage()).add(sup);
return true;
} else {
Supplier<StructureFeature<?, ?>> sup = config.getStructure();
if (sup == null) {
return false;
return;
}
event.getGeneration().getStructures().add(sup);
if (config == ConfigManager.HUT_CONFIG) {
event.getGeneration().getStructures().add(() -> ConfiguredStructures.CONFIGURED_RUINED_HUT);
}
return true;
}
}

Expand Down

0 comments on commit 99167d0

Please sign in to comment.