Skip to content

Commit

Permalink
Assorted fixes.
Browse files Browse the repository at this point in the history
Changed block registry names to use less special characters for no reason
Removed load order fuckery that I added
Added config option to change mining level required for strata layers
  • Loading branch information
KryptonCaptain committed Sep 22, 2016
1 parent da35099 commit 0ebe061
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ buildscript {

apply plugin: 'forge'

version = "1.7.10-1.5.3"
version = "1.7.10-1.5.5"
group= "com.blueyu2.strata" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "Strata"

Expand Down
8 changes: 3 additions & 5 deletions src/main/java/com/blueyu2/strata/Strata.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@
/**
* Created by blueyu2 on 1/4/16.
*/
@Mod(modid = Strata.MODID, version = Strata.VERSION ,
dependencies = "after:*" /*+
"after:denseores;" +
"after:UndergroundBiomes"*/)
@Mod(modid = Strata.MODID, version = Strata.VERSION )
//removed fuckery with load order. Solved DenseOres issue, but I don't like it.

public class Strata {
public static final String MODID = "strata";
public static final String VERSION = "1.7.10-1.5.3";
public static final String VERSION = "1.7.10-1.5.5";

@SidedProxy(serverSide = "com.blueyu2.strata.Proxy", clientSide = "com.blueyu2.strata.ProxyClient")
public static Proxy proxy;
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/blueyu2/strata/StrataBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ public boolean canHarvestBlock(EntityPlayer player, int meta){
return type == Type.STONE ? super.canHarvestBlock(player, meta) : baseBlock.canHarvestBlock(player, this.meta);
}

//TODO changed
@Override
public int getHarvestLevel(int meta){
return type == Type.STONE ? (meta == 0 ? 2 : 3) : (baseBlock.getHarvestLevel(this.meta));
return type == Type.STONE ? (meta == 0 ? (StrataConfig.strata_1_hard) : (StrataConfig.strata_2_hard)) : (baseBlock.getHarvestLevel(this.meta));
}

@Override
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/com/blueyu2/strata/StrataConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,21 @@ public class StrataConfig {

public static int maxDepth = 2;
public static boolean uninstall = false;

public static int strata_1_hard = 2;
public static int strata_2_hard = 3;

public void loadConfig(File file){
Configuration baseConfig = new Configuration(file, true);

baseConfig.load();
uninstall = baseConfig.getBoolean("Uninstall", "Main", false, "Set this to true and go to all the areas you went to with Strata installed to replace all Strata blocks in the world with the original blocks. This allows for safe removal of Strata without your worlds getting ruined.");

strata_1_hard = baseConfig.getInt("First strata mining level", "Main", 2, 1, 10, "Changes the mining level required to mine stone on the first strata level");
strata_2_hard = baseConfig.getInt("Second strata mining level", "Main", 3, 1, 10, "Changes the mining level required to mine stone on the second strata level");

//maxDepth = baseConfig.getInt("Max generation depth", "Main", 2, 0, 60, "Lowest y level strata stone will generate to");

baseConfig.save();

File vanillaFile = new File(configDir, "minecraft.cfg");
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/blueyu2/strata/StrataRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ public static void registerBlock(String blockId, int meta, String oreTexture, St
case ORE:
block = new StrataBlock(blockId, meta, oreTexture, stoneTexture);
blocks.put(getBlockMeta(baseBlock, meta, true), block);
GameRegistry.registerBlock(block, StrataBlockItem.class, "block|" + modName + "/" + blockName + "-" + meta);
GameRegistry.registerBlock(block, StrataBlockItem.class, "block." + modName + "." + blockName + "." + meta);
break;
case STONE:
block = new StrataBlock(blockId, meta, stoneTexture);
blocks.put(getBlockMeta(baseBlock, meta, true), block);
GameRegistry.registerBlock(block, StrataBlockItem.class, "block|" + modName + "/" + blockName + "-" + meta);
GameRegistry.registerBlock(block, StrataBlockItem.class, "block." + modName + "." + blockName + "." + meta);
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/blueyu2/strata/StrataTexture.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public static String getDerivedOreName(String oreName, int depth, String baseNam
baseName = baseName.toLowerCase();

//TODO I CAN'T FUCKING BELIEVE IT WAS THAT SIMPLE TO FIX
return getDerivedStoneName(oreName, depth) + "+" + baseModName + "." + baseName;
return getDerivedStoneName(oreName, depth) + "." + baseModName + "." + baseName;
}

public boolean hasCustomLoader(IResourceManager manager, ResourceLocation location) {
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": "strata",
"name": "Strata",
"description": "Adds layers of stone, called strata, into the world.",
"version": "1.5.3",
"version": "1.5.5",
"mcversion": "1.7.10",
"url": "",
"updateUrl": "",
Expand Down

0 comments on commit 0ebe061

Please sign in to comment.