Skip to content

Commit

Permalink
v2.1.6 - Allow slimes to spawn in the lush swamp
Browse files Browse the repository at this point in the history
  • Loading branch information
Prospector committed Dec 31, 2019
1 parent c69d12d commit 2a822a4
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 59 deletions.
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ minecraft_version=1.15.1-pre1
yarn_mappings=1.15.1-pre1+build.1
loader_version=0.7.2+build.174
fabric_version=0.4.24+build.279-1.15
terraform_version=1.3.3+build.16

terraform_version=1.3.4+build.17
111 changes: 54 additions & 57 deletions src/main/java/com/terraformersmc/traverse/biome/LushSwampBiome.java
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;
}

}

0 comments on commit 2a822a4

Please sign in to comment.