Skip to content
This repository has been archived by the owner on May 13, 2021. It is now read-only.

Commit

Permalink
Backport Ore generation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
thecatcore committed Apr 2, 2020
1 parent d59bb47 commit cd28cbd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ public class RAAWorldAPI {
*/
public static void generateOresForTarget(Biome biome, OreFeatureConfig.Target target) {
Materials.MATERIALS.forEach(material -> {
if (material.getOreInformation().getTargetId() == target.getId()) {
if (Registry.BLOCK.get(material.getOreInformation().getTargetId()) == target.getBlock()) {
biome.addFeature(GenerationStep.Feature.UNDERGROUND_ORES,
new OreFeature(OreFeatureConfig::deserialize).configure(new OreFeatureConfig(target,
Registry.BLOCK.get(Utils.appendToPath(material.getId(), "_ore")).getDefaultState(), material.getOreInformation().getOreClusterSize()))
.createDecoratedFeature(Decorator.COUNT_RANGE.configure(new SimpleRangeDecoratorConfig(material.getOreInformation().getOreCount(), 0, 256))));
}
});
Materials.DIMENSION_MATERIALS.forEach(material -> {
if (material.getOreInformation().getTargetId() == target.getId()) {
if (Registry.BLOCK.get(material.getOreInformation().getTargetId()) == target.getBlock()) {
biome.addFeature(GenerationStep.Feature.UNDERGROUND_ORES,
new OreFeature(OreFeatureConfig::deserialize).configure(new OreFeatureConfig(target,
Registry.BLOCK.get(Utils.appendToPath(material.getId(), "_ore")).getDefaultState(), material.getOreInformation().getOreClusterSize()))
Expand Down

0 comments on commit cd28cbd

Please sign in to comment.