Skip to content

Commit

Permalink
AC darkstone cliff blocks only generate in AC biomes. (#944)
Browse files Browse the repository at this point in the history
AC darkstone cliff blocks only generate in AC biomes.
  • Loading branch information
whichonespink44 authored Sep 14, 2016
1 parent e748e5e commit 4118f24
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 29 deletions.
19 changes: 2 additions & 17 deletions src/main/java/rtg/world/gen/surface/SurfaceBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
import net.minecraft.world.biome.Biome;
import net.minecraft.world.chunk.ChunkPrimer;

import com.shinoow.abyssalcraft.api.block.ACBlocks;

import rtg.api.biome.BiomeConfig;
import rtg.config.rtg.ConfigRTG;
import rtg.util.CellNoise;
Expand All @@ -21,7 +19,6 @@
public class SurfaceBase {

private final static ModPresenceTester undergroundBiomesMod = new ModPresenceTester("UndergroundBiomes");
private final static ModPresenceTester abyssalCraftMod = new ModPresenceTester("abyssalcraft");
// create UBColumnCache only if UB is present
private static UBColumnCache ubColumnCache = undergroundBiomesMod.present() ? new UBColumnCache() : null;
protected IBlockState topBlock;
Expand Down Expand Up @@ -82,24 +79,12 @@ protected IBlockState getShadowDesertBlock(World world, int i, int j, int x, int

protected IBlockState hcStone(World world, int i, int j, int x, int y, int k) {

if (abyssalCraftMod.present()) {
return ACBlocks.darkstone.getDefaultState();
}
else {

return Blocks.STONE.getDefaultState();
}
return Blocks.STONE.getDefaultState();
}

protected IBlockState hcCobble(World world, int worldX, int worldZ, int chunkX, int chunkZ, int worldY) {

if (abyssalCraftMod.present()) {

return ACBlocks.darkstone_cobblestone.getDefaultState();
}
else {
return Blocks.COBBLESTONE.getDefaultState();
}
return Blocks.COBBLESTONE.getDefaultState();
}

public IBlockState getTopBlock() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package rtg.world.gen.surface.abyssalcraft;

import net.minecraft.block.state.IBlockState;
import net.minecraft.world.World;

import com.shinoow.abyssalcraft.api.block.ACBlocks;

import rtg.api.biome.BiomeConfig;
import rtg.world.gen.surface.SurfaceBase;

public class SurfaceACBase extends SurfaceBase {

public SurfaceACBase(BiomeConfig config, IBlockState top, IBlockState fill) {

super(config, top, fill);
}

@Override
protected IBlockState hcStone(World world, int i, int j, int x, int y, int k) {

return ACBlocks.darkstone.getDefaultState();
}

@Override
protected IBlockState hcCobble(World world, int worldX, int worldZ, int chunkX, int chunkZ, int worldY) {

return ACBlocks.darkstone_cobblestone.getDefaultState();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
import rtg.util.CellNoise;
import rtg.util.CliffCalculator;
import rtg.util.OpenSimplexNoise;
import rtg.world.gen.surface.SurfaceBase;

public class SurfaceACCoraliumInfestedSwamp extends SurfaceBase {
public class SurfaceACCoraliumInfestedSwamp extends SurfaceACBase {

public SurfaceACCoraliumInfestedSwamp(BiomeConfig config, IBlockState top, IBlockState filler) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
import rtg.util.CellNoise;
import rtg.util.CliffCalculator;
import rtg.util.OpenSimplexNoise;
import rtg.world.gen.surface.SurfaceBase;

public class SurfaceACDarklands extends SurfaceBase {
public class SurfaceACDarklands extends SurfaceACBase {

private boolean beach;
private IBlockState beachBlock;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
import rtg.util.CellNoise;
import rtg.util.CliffCalculator;
import rtg.util.OpenSimplexNoise;
import rtg.world.gen.surface.SurfaceBase;

public class SurfaceACDarklandsForest extends SurfaceBase {
public class SurfaceACDarklandsForest extends SurfaceACBase {

private boolean beach;
private IBlockState beachBlock;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
import rtg.util.CellNoise;
import rtg.util.CliffCalculator;
import rtg.util.OpenSimplexNoise;
import rtg.world.gen.surface.SurfaceBase;

public class SurfaceACDarklandsHighland extends SurfaceBase {
public class SurfaceACDarklandsHighland extends SurfaceACBase {

private IBlockState mixBlockTop;
private byte mixBlockTopMeta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
import rtg.util.CellNoise;
import rtg.util.CliffCalculator;
import rtg.util.OpenSimplexNoise;
import rtg.world.gen.surface.SurfaceBase;

public class SurfaceACDarklandsMountains extends SurfaceBase {
public class SurfaceACDarklandsMountains extends SurfaceACBase {

private boolean beach;
private IBlockState beachBlock;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
import rtg.util.CellNoise;
import rtg.util.CliffCalculator;
import rtg.util.OpenSimplexNoise;
import rtg.world.gen.surface.SurfaceBase;

public class SurfaceACDarklandsPlains extends SurfaceBase {
public class SurfaceACDarklandsPlains extends SurfaceACBase {

public SurfaceACDarklandsPlains(BiomeConfig config, IBlockState top, IBlockState filler) {

Expand Down

0 comments on commit 4118f24

Please sign in to comment.