Skip to content

Commit daf7bea

Browse files
committed
fixed a bug with strict mode
1 parent 97f3698 commit daf7bea

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ allprojects {
2929
}
3030

3131

32-
version = "1.0.1"
32+
version = "1.0.2"
3333
group= "cyano.orespawn"
3434
archivesBaseName = "OreSpawn_1.9.4"
3535

src/main/java/cyano/orespawn/OreSpawn.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class OreSpawn
4747
public static final String NAME ="Ore Spawn";
4848
/** Version number, in Major.Minor.Build format. The minor number is increased whenever a change
4949
* is made that has the potential to break compatibility with other mods that depend on this one. */
50-
public static final String VERSION = "1.0.1";
50+
public static final String VERSION = "1.0.2";
5151

5252
/** All ore-spawn files discovered in the ore-spawn folder */
5353
public static final List<Path> oreSpawnConfigFiles = new LinkedList<>();
@@ -60,7 +60,7 @@ public class OreSpawn
6060
/** Ignores other mods telling this mod not to generate ore */
6161
public static boolean forceOreGen = false;
6262
/** Ignore non-existant blocks instead of erroring */
63-
public static boolean ignoreNonExistant = false;
63+
public static boolean ignoreNonExistant = true;
6464
/** location of ore-spawn files */
6565
public static Path oreSpawnFolder = null;
6666

@@ -78,10 +78,10 @@ public void preInit(FMLPreInitializationEvent event)
7878
"If true, then default Minecraft ore generation will be handled exclusively by orespawn .json files \n"
7979
+ "(vanilla ore generation will be disabled)");
8080

81-
forceOreGen = config.getBoolean("force_ore_generation", "options", forceOreGen,
81+
forceOreGen = config.getBoolean("force_ore_generation", "options", forceOreGen,
8282
"If true, then ore generation cannot be disabled by other mods.");
8383

84-
forceOreGen = config.getBoolean("ignore_nonexistant_blocks", "options", forceOreGen,
84+
ignoreNonExistant = config.getBoolean("ignore_missing_blocks", "options", ignoreNonExistant,
8585
"If true, then references to non-existant blocks in the .json files will be ingored without causing an error.");
8686

8787

src/main/java/cyano/orespawn/worldgen/OreSpawnData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public OreSpawnData(Block oreBlock, int metaDataValue, int minHeight, int maxHei
4040

4141
public static OreSpawnData parseOreSpawnData(JsonObject jsonEntry){
4242
String blockName = jsonEntry.get("blockID").getAsString();
43-
if(Block.getBlockFromName(blockName) == null){
43+
if(blockName == null || Block.getBlockFromName(blockName) == null){
4444
// block does not exist!
4545
if(OreSpawn.ignoreNonExistant) {
4646
FMLLog.warning("%s: ignoring orespawn data for %s because that block does not exist",OreSpawn.MODID,blockName);

0 commit comments

Comments
 (0)