-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v2.1.6 - Allow slimes to spawn in the lush swamp
- Loading branch information
1 parent
c69d12d
commit 2a822a4
Showing
2 changed files
with
55 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
111 changes: 54 additions & 57 deletions
111
src/main/java/com/terraformersmc/traverse/biome/LushSwampBiome.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,76 @@ | ||
package com.terraformersmc.traverse.biome; | ||
|
||
import com.terraformersmc.terraform.util.TerraformBiomeSets; | ||
import com.terraformersmc.traverse.feature.TraverseBiomeFeatures; | ||
import net.minecraft.entity.EntityCategory; | ||
import net.minecraft.entity.EntityType; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.biome.Biome; | ||
import net.minecraft.world.biome.DefaultBiomeFeatures; | ||
import net.minecraft.world.gen.GenerationStep; | ||
import net.minecraft.world.gen.decorator.Decorator; | ||
import net.minecraft.world.gen.decorator.DecoratorConfig; | ||
import net.minecraft.world.gen.feature.Feature; | ||
import net.minecraft.world.gen.feature.FeatureConfig; | ||
import net.minecraft.world.gen.feature.MineshaftFeature; | ||
import net.minecraft.world.gen.feature.MineshaftFeatureConfig; | ||
import net.minecraft.world.gen.feature.SeagrassFeatureConfig; | ||
import net.minecraft.world.gen.feature.*; | ||
import net.minecraft.world.gen.surfacebuilder.ConfiguredSurfaceBuilder; | ||
import net.minecraft.world.gen.surfacebuilder.SurfaceBuilder; | ||
|
||
public class LushSwampBiome extends Biome { | ||
|
||
static final ConfiguredSurfaceBuilder SURFACE_BUILDER = new ConfiguredSurfaceBuilder<>(SurfaceBuilder.SWAMP, SurfaceBuilder.GRASS_CONFIG); | ||
static final Precipitation PRECIPITATION = Precipitation.RAIN; | ||
static final Category CATEGORY = Category.SWAMP; | ||
static final float DEPTH = -0.2F; | ||
static final float SCALE = 0.1F; | ||
static final float TEMPERATURE = 0.8F; | ||
static final float DOWNFALL = 0.9F; | ||
static final int WATER_COLOR = 0x617B64; | ||
static final int WATER_FOG_COLOR = 0x232317; | ||
static final int GRASS_COLOR = 0x7FE03E; | ||
static final int FOLIAGE_COLOR = 0x58EA33; | ||
static final String PARENT = null; | ||
static final ConfiguredSurfaceBuilder SURFACE_BUILDER = new ConfiguredSurfaceBuilder<>(SurfaceBuilder.SWAMP, SurfaceBuilder.GRASS_CONFIG); | ||
static final Precipitation PRECIPITATION = Precipitation.RAIN; | ||
static final Category CATEGORY = Category.SWAMP; | ||
static final float DEPTH = -0.2F; | ||
static final float SCALE = 0.1F; | ||
static final float TEMPERATURE = 0.8F; | ||
static final float DOWNFALL = 0.9F; | ||
static final int WATER_COLOR = 0x617B64; | ||
static final int WATER_FOG_COLOR = 0x232317; | ||
static final int GRASS_COLOR = 0x7FE03E; | ||
static final int FOLIAGE_COLOR = 0x58EA33; | ||
static final String PARENT = null; | ||
|
||
public LushSwampBiome() { | ||
super(new Settings().surfaceBuilder(SURFACE_BUILDER).precipitation(PRECIPITATION).category(CATEGORY).depth(DEPTH).scale(SCALE).temperature(TEMPERATURE).downfall(DOWNFALL).waterColor(WATER_COLOR).waterFogColor(WATER_FOG_COLOR).parent(PARENT)); | ||
this.addStructureFeature(Feature.SWAMP_HUT.configure(FeatureConfig.DEFAULT)); | ||
public LushSwampBiome() { | ||
super(new Settings().surfaceBuilder(SURFACE_BUILDER).precipitation(PRECIPITATION).category(CATEGORY).depth(DEPTH).scale(SCALE).temperature(TEMPERATURE).downfall(DOWNFALL).waterColor(WATER_COLOR).waterFogColor(WATER_FOG_COLOR).parent(PARENT)); | ||
this.addStructureFeature(Feature.SWAMP_HUT.configure(FeatureConfig.DEFAULT)); | ||
this.addStructureFeature(Feature.MINESHAFT.configure(new MineshaftFeatureConfig(0.004D, MineshaftFeature.Type.NORMAL))); | ||
DefaultBiomeFeatures.addLandCarvers(this); | ||
DefaultBiomeFeatures.addDefaultStructures(this); | ||
DefaultBiomeFeatures.addDefaultLakes(this); | ||
DefaultBiomeFeatures.addDungeons(this); | ||
DefaultBiomeFeatures.addMineables(this); | ||
DefaultBiomeFeatures.addDefaultOres(this); | ||
DefaultBiomeFeatures.addClay(this); | ||
DefaultBiomeFeatures.addDefaultMushrooms(this); | ||
DefaultBiomeFeatures.addSwampVegetation(this); | ||
DefaultBiomeFeatures.addSprings(this); | ||
this.addFeature(GenerationStep.Feature.VEGETAL_DECORATION, Feature.SEAGRASS.configure(new SeagrassFeatureConfig(64, 0.6D)).createDecoratedFeature(Decorator.TOP_SOLID_HEIGHTMAP.configure(DecoratorConfig.DEFAULT))); | ||
DefaultBiomeFeatures.addFossils(this); | ||
DefaultBiomeFeatures.addFrozenTopLayer(this); | ||
DefaultBiomeFeatures.addLandCarvers(this); | ||
DefaultBiomeFeatures.addDefaultStructures(this); | ||
DefaultBiomeFeatures.addDefaultLakes(this); | ||
DefaultBiomeFeatures.addDungeons(this); | ||
DefaultBiomeFeatures.addMineables(this); | ||
DefaultBiomeFeatures.addDefaultOres(this); | ||
DefaultBiomeFeatures.addClay(this); | ||
DefaultBiomeFeatures.addDefaultMushrooms(this); | ||
DefaultBiomeFeatures.addSwampVegetation(this); | ||
DefaultBiomeFeatures.addSprings(this); | ||
this.addFeature(GenerationStep.Feature.VEGETAL_DECORATION, Feature.SEAGRASS.configure(new SeagrassFeatureConfig(64, 0.6D)).createDecoratedFeature(Decorator.TOP_SOLID_HEIGHTMAP.configure(DecoratorConfig.DEFAULT))); | ||
DefaultBiomeFeatures.addFossils(this); | ||
DefaultBiomeFeatures.addFrozenTopLayer(this); | ||
TraverseBiomeFeatures.addLushSwampVegetation(this); | ||
this.addSpawn(EntityCategory.CREATURE, new SpawnEntry(EntityType.SHEEP, 12, 4, 4)); | ||
this.addSpawn(EntityCategory.CREATURE, new SpawnEntry(EntityType.PIG, 10, 4, 4)); | ||
this.addSpawn(EntityCategory.CREATURE, new SpawnEntry(EntityType.CHICKEN, 10, 4, 4)); | ||
this.addSpawn(EntityCategory.CREATURE, new SpawnEntry(EntityType.COW, 8, 4, 4)); | ||
this.addSpawn(EntityCategory.AMBIENT, new SpawnEntry(EntityType.BAT, 10, 8, 8)); | ||
this.addSpawn(EntityCategory.MONSTER, new SpawnEntry(EntityType.SPIDER, 100, 4, 4)); | ||
this.addSpawn(EntityCategory.MONSTER, new SpawnEntry(EntityType.ZOMBIE, 95, 4, 4)); | ||
this.addSpawn(EntityCategory.MONSTER, new SpawnEntry(EntityType.ZOMBIE_VILLAGER, 5, 1, 1)); | ||
this.addSpawn(EntityCategory.MONSTER, new SpawnEntry(EntityType.SKELETON, 100, 4, 4)); | ||
this.addSpawn(EntityCategory.MONSTER, new SpawnEntry(EntityType.CREEPER, 100, 4, 4)); | ||
this.addSpawn(EntityCategory.MONSTER, new SpawnEntry(EntityType.SLIME, 100, 4, 4)); | ||
this.addSpawn(EntityCategory.MONSTER, new SpawnEntry(EntityType.ENDERMAN, 10, 1, 4)); | ||
this.addSpawn(EntityCategory.MONSTER, new SpawnEntry(EntityType.WITCH, 5, 1, 1)); | ||
this.addSpawn(EntityCategory.MONSTER, new SpawnEntry(EntityType.SLIME, 1, 1, 1)); | ||
} | ||
this.addSpawn(EntityCategory.CREATURE, new SpawnEntry(EntityType.SHEEP, 12, 4, 4)); | ||
this.addSpawn(EntityCategory.CREATURE, new SpawnEntry(EntityType.PIG, 10, 4, 4)); | ||
this.addSpawn(EntityCategory.CREATURE, new SpawnEntry(EntityType.CHICKEN, 10, 4, 4)); | ||
this.addSpawn(EntityCategory.CREATURE, new SpawnEntry(EntityType.COW, 8, 4, 4)); | ||
this.addSpawn(EntityCategory.AMBIENT, new SpawnEntry(EntityType.BAT, 10, 8, 8)); | ||
this.addSpawn(EntityCategory.MONSTER, new SpawnEntry(EntityType.SPIDER, 100, 4, 4)); | ||
this.addSpawn(EntityCategory.MONSTER, new SpawnEntry(EntityType.ZOMBIE, 95, 4, 4)); | ||
this.addSpawn(EntityCategory.MONSTER, new SpawnEntry(EntityType.ZOMBIE_VILLAGER, 5, 1, 1)); | ||
this.addSpawn(EntityCategory.MONSTER, new SpawnEntry(EntityType.SKELETON, 100, 4, 4)); | ||
this.addSpawn(EntityCategory.MONSTER, new SpawnEntry(EntityType.CREEPER, 100, 4, 4)); | ||
this.addSpawn(EntityCategory.MONSTER, new SpawnEntry(EntityType.SLIME, 100, 4, 4)); | ||
this.addSpawn(EntityCategory.MONSTER, new SpawnEntry(EntityType.ENDERMAN, 10, 1, 4)); | ||
this.addSpawn(EntityCategory.MONSTER, new SpawnEntry(EntityType.WITCH, 5, 1, 1)); | ||
this.addSpawn(EntityCategory.MONSTER, new SpawnEntry(EntityType.SLIME, 1, 1, 1)); | ||
TerraformBiomeSets.addSlimeSpawnBiome(this); | ||
} | ||
|
||
@Override | ||
public int getGrassColorAt(double x, double z) { | ||
return GRASS_COLOR; | ||
} | ||
@Override | ||
public int getGrassColorAt(double x, double z) { | ||
return GRASS_COLOR; | ||
} | ||
|
||
@Override | ||
public int getFoliageColor() { | ||
return FOLIAGE_COLOR; | ||
} | ||
@Override | ||
public int getFoliageColor() { | ||
return FOLIAGE_COLOR; | ||
} | ||
|
||
} |