Disable ore validation as it was casing issues with ores in incorrect dimensions. Also add endstone to ore clear command.
This commit is contained in:
parent
0208ec58f2
commit
85b174929c
2 changed files with 17 additions and 15 deletions
|
@ -62,6 +62,7 @@ public class TechRebornDevCommand extends CommandBase {
|
|||
blocksToRemove.add(Blocks.GRASS);
|
||||
blocksToRemove.add(Blocks.DIRT);
|
||||
blocksToRemove.add(Blocks.STONE);
|
||||
blocksToRemove.add(Blocks.END_STONE);
|
||||
for (int x = 0; x < 25; x++) {
|
||||
for (int z = 0; z < 25; z++) {
|
||||
for (int y = 0; y < playerMP.posY; y++) {
|
||||
|
|
|
@ -134,21 +134,21 @@ public class TechRebornWorldGen implements IWorldGenerator {
|
|||
Type typeOfHashMap = new TypeToken<WorldGenConfig>() {
|
||||
}.getType();
|
||||
config = gson.fromJson(jsonString, typeOfHashMap);
|
||||
ArrayUtils.addAll(config.endOres, config.neatherOres, config.overworldOres).stream().forEach(oreConfig -> {
|
||||
if (oreConfig.minYHeight > oreConfig.maxYHeight) {
|
||||
printError(oreConfig.blockName + " ore generation value is invalid, the min y height is bigger than the max y height, this ore value will be disabled in code");
|
||||
|
||||
oreConfig.minYHeight = -1;
|
||||
oreConfig.maxYHeight = -1;
|
||||
}
|
||||
|
||||
if (oreConfig.minYHeight < 0 || oreConfig.maxYHeight < 0) {
|
||||
printError(oreConfig.blockName + " ore generation value is invalid, the min y height or the max y height is less than 0, this ore value will be disabled in code");
|
||||
oreConfig.minYHeight = -1;
|
||||
oreConfig.maxYHeight = -1;
|
||||
}
|
||||
|
||||
});
|
||||
// ArrayUtils.addAll(config.endOres, config.neatherOres, config.overworldOres).stream().forEach(oreConfig -> {
|
||||
// if (oreConfig.minYHeight > oreConfig.maxYHeight) {
|
||||
// printError(oreConfig.blockName + " ore generation value is invalid, the min y height is bigger than the max y height, this ore value will be disabled in code");
|
||||
//
|
||||
// oreConfig.minYHeight = -1;
|
||||
// oreConfig.maxYHeight = -1;
|
||||
// }
|
||||
//
|
||||
// if (oreConfig.minYHeight < 0 || oreConfig.maxYHeight < 0) {
|
||||
// printError(oreConfig.blockName + " ore generation value is invalid, the min y height or the max y height is less than 0, this ore value will be disabled in code");
|
||||
// oreConfig.minYHeight = -1;
|
||||
// oreConfig.maxYHeight = -1;
|
||||
// }
|
||||
//
|
||||
// });
|
||||
} catch (Exception e) {
|
||||
Core.logHelper.error(
|
||||
"The ores.json file was invalid, bad things are about to happen, I will try and save the world now :");
|
||||
|
@ -210,6 +210,7 @@ public class TechRebornWorldGen implements IWorldGenerator {
|
|||
predicate = BlockMatcher.forBlock(Blocks.NETHERRACK);
|
||||
} else if (world.provider.getDimension() == 1) {
|
||||
list.addAll(getAllGenOresFromList(config.endOres));
|
||||
|
||||
predicate = BlockMatcher.forBlock(Blocks.END_STONE);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue