Skip to content

Commit 9ec650d

Browse files
committed
fix for turning new worlds into swiss cheese after removing mods
1 parent daf7bea commit 9ec650d

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
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.2"
32+
version = "1.0.3"
3333
group= "cyano.orespawn"
3434
archivesBaseName = "OreSpawn_1.9.4"
3535

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

Lines changed: 1 addition & 1 deletion
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.2";
50+
public static final String VERSION = "1.0.3";
5151

5252
/** All ore-spawn files discovered in the ore-spawn folder */
5353
public static final List<Path> oreSpawnConfigFiles = new LinkedList<>();

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import com.google.gson.JsonObject;
55
import cyano.orespawn.OreSpawn;
66
import net.minecraft.block.Block;
7+
import net.minecraft.init.Blocks;
78
import net.minecraft.util.ResourceLocation;
89
import net.minecraftforge.fml.common.FMLLog;
910
import net.minecraftforge.fml.common.registry.GameData;
@@ -21,6 +22,8 @@ public class OreSpawnData {
2122

2223
public final Block ore;
2324
public final int metaData;
25+
26+
public static final OreSpawnData EMPTY_PLACEHOLDER = new OreSpawnData(Blocks.STONE,0,1,127,0,1,1,Collections.EMPTY_LIST);
2427

2528
public OreSpawnData(Block oreBlock, int metaDataValue, int minHeight, int maxHeight, float spawnFrequency, int spawnQuantity, int spawnQuantityVariation, Collection<String> biomes){
2629
this.spawnQuantity = spawnQuantity;
@@ -44,6 +47,7 @@ public static OreSpawnData parseOreSpawnData(JsonObject jsonEntry){
4447
// block does not exist!
4548
if(OreSpawn.ignoreNonExistant) {
4649
FMLLog.warning("%s: ignoring orespawn data for %s because that block does not exist",OreSpawn.MODID,blockName);
50+
return EMPTY_PLACEHOLDER;
4751
}else{
4852
throw new IllegalArgumentException(String.format("Ore block with ID %s does not exist!",blockName));
4953
}

0 commit comments

Comments
 (0)