[Change] Disabled feature sorting (appears to conflict with other mods)
This commit is contained in:
parent
4dc07f6567
commit
35918240f9
1 changed files with 22 additions and 23 deletions
|
@ -48,7 +48,6 @@ import com.google.common.base.Suppliers;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import com.google.common.collect.Sets;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -808,28 +807,28 @@ public class BiomeAPI {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void sortFeatures(List<Holder<PlacedFeature>> features) {
|
private static void sortFeatures(List<Holder<PlacedFeature>> features) {
|
||||||
InternalBiomeAPI.initFeatureOrder();
|
// InternalBiomeAPI.initFeatureOrder();
|
||||||
|
//
|
||||||
Set<Holder<PlacedFeature>> featuresWithoutDuplicates = Sets.newHashSet();
|
// Set<Holder<PlacedFeature>> featuresWithoutDuplicates = Sets.newHashSet();
|
||||||
features.forEach(holder -> featuresWithoutDuplicates.add(holder));
|
// features.forEach(holder -> featuresWithoutDuplicates.add(holder));
|
||||||
|
//
|
||||||
if (featuresWithoutDuplicates.size() != features.size()) {
|
// if (featuresWithoutDuplicates.size() != features.size()) {
|
||||||
features.clear();
|
// features.clear();
|
||||||
featuresWithoutDuplicates.forEach(feature -> features.add(feature));
|
// featuresWithoutDuplicates.forEach(feature -> features.add(feature));
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
features.forEach(feature -> {
|
// features.forEach(feature -> {
|
||||||
InternalBiomeAPI.FEATURE_ORDER.computeIfAbsent(
|
// InternalBiomeAPI.FEATURE_ORDER.computeIfAbsent(
|
||||||
feature,
|
// feature,
|
||||||
f -> InternalBiomeAPI.FEATURE_ORDER_ID.getAndIncrement()
|
// f -> InternalBiomeAPI.FEATURE_ORDER_ID.getAndIncrement()
|
||||||
);
|
// );
|
||||||
});
|
// });
|
||||||
|
//
|
||||||
features.sort((f1, f2) -> {
|
// features.sort((f1, f2) -> {
|
||||||
int v1 = InternalBiomeAPI.FEATURE_ORDER.getOrDefault(f1, 70000);
|
// int v1 = InternalBiomeAPI.FEATURE_ORDER.getOrDefault(f1, 70000);
|
||||||
int v2 = InternalBiomeAPI.FEATURE_ORDER.getOrDefault(f2, 70000);
|
// int v2 = InternalBiomeAPI.FEATURE_ORDER.getOrDefault(f2, 70000);
|
||||||
return Integer.compare(v1, v2);
|
// return Integer.compare(v1, v2);
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue