Advertisement
jayhillx

ModBiomeMaker Class01

Dec 12th, 2020
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.60 KB | None | 0 0
  1. public class ModBiomeMaker {
  2.  
  3. public static Biome makeStrawberryFieldBiome() {
  4. MobSpawnInfo.Builder mobspawninfo$builder = new MobSpawnInfo.Builder();
  5.  
  6. BiomeGenerationSettings.Builder biomegenerationsettings$builder = (new BiomeGenerationSettings.Builder()).withSurfaceBuilder(ConfiguredSurfaceBuilders.field_244178_j);
  7.  
  8. biomegenerationsettings$builder.withStructure(StructureFeatures.RUINED_PORTAL);
  9. DefaultBiomeFeatures.withStrongholdAndMineshaft(biomegenerationsettings$builder);
  10. DefaultBiomeFeatures.withCavesAndCanyons(biomegenerationsettings$builder);
  11. DefaultBiomeFeatures.withLavaAndWaterLakes(biomegenerationsettings$builder);
  12. DefaultBiomeFeatures.withMonsterRoom(biomegenerationsettings$builder);
  13. DefaultBiomeFeatures.withNoiseTallGrass(biomegenerationsettings$builder);
  14.  
  15. DefaultBiomeFeatures.withCommonOverworldBlocks(biomegenerationsettings$builder);
  16. DefaultBiomeFeatures.withOverworldOres(biomegenerationsettings$builder);
  17. DefaultBiomeFeatures.withDisks(biomegenerationsettings$builder);
  18. DefaultBiomeFeatures.withPlainGrassVegetation(biomegenerationsettings$builder);
  19. DefaultBiomeFeatures.withLavaAndWaterSprings(biomegenerationsettings$builder);
  20. DefaultBiomeFeatures.withFrozenTopLayer(biomegenerationsettings$builder);
  21.  
  22. biomegenerationsettings$builder.withFeature(GenerationStage.Decoration.VEGETAL_DECORATION, ModFeatures.TREES_STRAWBERRY);
  23. biomegenerationsettings$builder.withFeature(GenerationStage.Decoration.VEGETAL_DECORATION, ModFeatures.TREES_FANCY_STRAWBERRY);
  24. biomegenerationsettings$builder.withFeature(GenerationStage.Decoration.VEGETAL_DECORATION, ModFeatures.TREES_SWEET);
  25. biomegenerationsettings$builder.withFeature(GenerationStage.Decoration.VEGETAL_DECORATION, ModFeatures.TREES_FANCY_SWEET);
  26. biomegenerationsettings$builder.withFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Features.OAK);
  27. addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.withConfiguration(ModFeatures.STRAWBERRY_BUSH_CONFIG).withPlacement(Placement.COUNT.configure(new FeatureSpreadConfig(20))));
  28. addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.withConfiguration(ModFeatures.PINK_DAISY_BUSH_CONFIG).withPlacement(Placement.COUNT.configure(new FeatureSpreadConfig(8))));
  29. addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.withConfiguration(ModFeatures.WHITE_DAISY_BUSH_CONFIG).withPlacement(Placement.COUNT.configure(new FeatureSpreadConfig(8))));
  30.  
  31. return (new Biome.Builder()).precipitation(Biome.RainType.RAIN).category(Biome.Category.PLAINS)
  32. .depth(0.125F)
  33. .scale(0.05F)
  34. .temperature(0.8F)
  35. .downfall(0.4F)
  36. .setEffects((new BiomeAmbience.Builder())
  37. .setWaterColor(37008)
  38. .setWaterFogColor(14392)
  39. .setFogColor(12638463)
  40. .withSkyColor(ModFeatures.getSkyColorWithTemperatureModifier()).setMoodSound(MoodSoundAmbience.DEFAULT_CAVE).build()).withMobSpawnSettings(mobspawninfo$builder.copy()).withGenerationSettings(biomegenerationsettings$builder.build()).build();
  41. }
  42.  
  43. public static Biome makeLavenderMeadowBiome() {
  44. MobSpawnInfo.Builder mobspawninfo$builder = new MobSpawnInfo.Builder();
  45. DefaultBiomeFeatures.withSpawnsWithHorseAndDonkey(mobspawninfo$builder);
  46.  
  47. BiomeGenerationSettings.Builder biomegenerationsettings$builder = (new BiomeGenerationSettings.Builder()).withSurfaceBuilder(ConfiguredSurfaceBuilders.field_244178_j);
  48.  
  49. biomegenerationsettings$builder.withStructure(StructureFeatures.RUINED_PORTAL);
  50. DefaultBiomeFeatures.withStrongholdAndMineshaft(biomegenerationsettings$builder);
  51. DefaultBiomeFeatures.withCavesAndCanyons(biomegenerationsettings$builder);
  52. DefaultBiomeFeatures.withLavaAndWaterLakes(biomegenerationsettings$builder);
  53. DefaultBiomeFeatures.withMonsterRoom(biomegenerationsettings$builder);
  54. DefaultBiomeFeatures.withNoiseTallGrass(biomegenerationsettings$builder);
  55.  
  56. DefaultBiomeFeatures.withCommonOverworldBlocks(biomegenerationsettings$builder);
  57. DefaultBiomeFeatures.withOverworldOres(biomegenerationsettings$builder);
  58. DefaultBiomeFeatures.withDisks(biomegenerationsettings$builder);
  59. DefaultBiomeFeatures.withPlainGrassVegetation(biomegenerationsettings$builder);
  60. DefaultBiomeFeatures.withLavaAndWaterSprings(biomegenerationsettings$builder);
  61. DefaultBiomeFeatures.withFrozenTopLayer(biomegenerationsettings$builder);
  62.  
  63. return (new Biome.Builder()).precipitation(Biome.RainType.RAIN).category(Biome.Category.PLAINS)
  64. .depth(0.125F)
  65. .scale(0.05F)
  66. .temperature(0.8F)
  67. .downfall(0.4F)
  68. .setEffects((new BiomeAmbience.Builder())
  69. .setWaterColor(37008)
  70. .setWaterFogColor(14392)
  71. .setFogColor(12638463)
  72. .withSkyColor(ModFeatures.getSkyColorWithTemperatureModifier()).setMoodSound(MoodSoundAmbience.DEFAULT_CAVE).build()).withMobSpawnSettings(mobspawninfo$builder.copy()).withGenerationSettings(biomegenerationsettings$builder.build()).build();
  73. }
  74.  
  75. public static void addFeature(GenerationStage.Decoration decorationStage, ConfiguredFeature<?, ?> featureIn) {
  76. if (featureIn.feature == Feature.FLOWER) {
  77. addFeature(decorationStage, featureIn);
  78. }
  79. }
  80. }
  81.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement