Skip to content

Commit

Permalink
Replace generated cobblestone with UB Cobblestone and bumped version.…
Browse files Browse the repository at this point in the history
… Related #3
  • Loading branch information
kyeiti committed May 21, 2018
1 parent 42185b9 commit a33960d
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ buildscript {
}
apply plugin: 'net.minecraftforge.gradle.forge'

version = "1.0.2"
version = "1.1.0"
group = "exterminatorjeff.undergroundbiomes" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "UndergroundBiomesConstructs-1.12"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public final class ModInfo {

public static final String MODID = "undergroundbiomes";
public static final String NAME = "Underground Biomes";
public static final String VERSION = "1.0.2";
public static final String VERSION = "1.1.0";

private ModInfo() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public interface UBSettings {

boolean ubifyVillages();

boolean replaceCobblestone();

boolean buttonsOn();

boolean igneousButtonsOn();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public class UBConfig implements UBSettings {
public Set<Integer> excludedDimensionsSet;
public final BooleanSetting dimensionSpecificSeeds = new BooleanSetting(CATEGORY_GENERATION, "DimensionSpecificSeeds");
public final BooleanSetting ubifyVillages = new BooleanSetting(CATEGORY_GENERATION, "UBifyVillages");
public final BooleanSetting replaceCobblestone = new BooleanSetting(CATEGORY_GENERATION, "ReplaceCobblestone");

private static final String CATEGORY_VISUAL = "Visual";
public final BooleanSetting plainSlabTextures = new BooleanSetting(CATEGORY_VISUAL, "PlainSlabTextures");
Expand Down Expand Up @@ -152,6 +153,7 @@ public void init(File file) {
excludedDimensions.initProperty(configuration, "-1,1", "Comma-separated list of dimension IDs, used only if include list is *");
dimensionSpecificSeeds.initProperty(configuration, false, "Use a different seed for each dimensions");
ubifyVillages.initProperty(configuration, true, "Use UB stones in villages structures");
replaceCobblestone.initProperty(configuration, false, "Replace vanilla cobblestone with UB variants");

plainSlabTextures.initProperty(configuration, false, "Use normal stone textures for slabs");

Expand Down Expand Up @@ -388,6 +390,11 @@ public boolean ubifyVillages() {
return ubifyVillages.getValue();
}

@Override
public boolean replaceCobblestone() {
return replaceCobblestone.getValue();
}

/*
* Visual (Client only)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@
package exterminatorjeff.undergroundbiomes.world;

import exterminatorjeff.undergroundbiomes.api.*;
import exterminatorjeff.undergroundbiomes.api.enums.UBStoneStyle;
import exterminatorjeff.undergroundbiomes.common.block.IgneousStone;
import exterminatorjeff.undergroundbiomes.common.block.MetamorphicStone;
import exterminatorjeff.undergroundbiomes.common.block.UBStone;
import exterminatorjeff.undergroundbiomes.config.UBConfig;
import exterminatorjeff.undergroundbiomes.intermod.OresRegistry;
import exterminatorjeff.undergroundbiomes.intermod.StonesRegistry;
import exterminatorjeff.undergroundbiomes.world.noise.NoiseGenerator;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
Expand Down Expand Up @@ -75,6 +79,11 @@ public void replaceStoneInChunk(Chunk chunk) {
if (currentBlock == Blocks.STONE) {
// Replace with UBified version
storage.set(x, y, z, currentBiome.getStrataBlockAtLayer(yPos + y + variation));
} else if (currentBlock == Blocks.COBBLESTONE && API.SETTINGS.replaceCobblestone()) {
// Replace with UBified version
IBlockState strata = currentBiome.getStrataBlockAtLayer(yPos + y + variation);
UBStone block = (UBStone) strata.getBlock();
storage.set(x, y, z, (StonesRegistry.INSTANCE.stoneFor(block.getStoneType(), UBStoneStyle.COBBLE).getBlock()).getStateFromMeta(block.getMetaFromState(strata)));
} else {
/*
* Ore
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mcmod.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"modid": "undergroundbiomes",
"name": "Underground Biomes",
"description": "24 different kinds of stones with slabs, stairs, walls, and buttons",
"version": "1.0.0",
"version": "1.1.0",
"mcversion": "1.12.2",
"url": "",
"updateUrl": "",
Expand Down

0 comments on commit a33960d

Please sign in to comment.