Jenkkins

Ore Generation Code

Jun 18th, 2020
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. import com.agento.init.BlockInit;
  2. import net.minecraft.world.biome.Biome;
  3. import net.minecraft.world.gen.GenerationStage;
  4. import net.minecraft.world.gen.feature.Feature;
  5. import net.minecraft.world.gen.feature.OreFeatureConfig;
  6. import net.minecraft.world.gen.placement.ConfiguredPlacement;
  7. import net.minecraft.world.gen.placement.CountRangeConfig;
  8. import net.minecraft.world.gen.placement.Placement;
  9. import net.minecraftforge.registries.ForgeRegistries;
  10.  
  11. public class ModOreGen
  12. {
  13. public static void generateOre()
  14. {
  15. for(Biome allbiome : ForgeRegistries.BIOMES)
  16. {
  17. ConfiguredPlacement customConfig = Placement.COUNT_RANGE.configure(new CountRangeConfig(50, 5,0, 100));
  18. allbiome.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.withConfiguration(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE, BlockInit.ruby_ore_block.getDefaultState(), 5)).withPlacement(customConfig));
  19. }
  20. }
  21. }
Add Comment
Please, Sign In to add comment