Make the logger less spammy

This commit is contained in:
Technus 2017-03-15 18:01:25 +01:00
parent eee7f5f4bc
commit 51cc55d916
3 changed files with 17 additions and 11 deletions

Binary file not shown.

View file

@ -1,8 +1,8 @@
package gregtech.common;
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Materials;
import gregtech.api.util.GT_Log;
import gregtech.api.world.GT_Worldgen;
import gregtech.common.blocks.GT_TileEntity_Ores;
import gregtech.loaders.misc.GT_Achievements;
@ -14,6 +14,8 @@ import net.minecraft.world.chunk.IChunkProvider;
import java.util.ArrayList;
import java.util.Random;
import static gregtech.api.enums.GT_Values.D1;
public class GT_Worldgen_GT_Ore_Layer
extends GT_Worldgen {
public static ArrayList<GT_Worldgen_GT_Ore_Layer> sList = new ArrayList();
@ -102,8 +104,8 @@ public class GT_Worldgen_GT_Ore_Layer
}
}
}
if (GT_Values.D1) {
System.out.println(
if (D1) {
GT_Log.out.println(
"Generated Orevein:" + this.mWorldGenName +
" @ dim="+aDimensionType+
" chunkX="+aChunkX+

View file

@ -1,8 +1,8 @@
package gregtech.common;
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Materials;
import gregtech.api.util.GT_Log;
import gregtech.api.world.GT_Worldgen;
import gregtech.common.blocks.GT_TileEntity_Ores;
import net.minecraft.item.ItemStack;
@ -11,6 +11,8 @@ import net.minecraft.world.chunk.IChunkProvider;
import java.util.Random;
import static gregtech.api.enums.GT_Values.D1;
public class GT_Worldgen_GT_Ore_SmallPieces
extends GT_Worldgen {
public final short mMinY;
@ -43,20 +45,22 @@ public class GT_Worldgen_GT_Ore_SmallPieces
if (!isGenerationAllowed(aWorld, aDimensionType, ((aDimensionType == -1) && (this.mNether)) || ((aDimensionType == 0) && (this.mOverworld)) || ((aDimensionType == 1) && (this.mEnd)) ? aDimensionType : aDimensionType ^ 0xFFFFFFFF)) {
return false;
}
int count=0;
if (this.mMeta > 0) {
int i = 0;
for (int j = Math.max(1, this.mAmount / 2 + aRandom.nextInt(this.mAmount) / 2); i < j; i++) {
GT_TileEntity_Ores.setOreBlock(aWorld, aChunkX + aRandom.nextInt(16), this.mMinY + aRandom.nextInt(Math.max(1, this.mMaxY - this.mMinY)), aChunkZ + aRandom.nextInt(16), this.mMeta, true);
if(GT_Values.D1){
System.out.println(
"Small Ore:" + this.mWorldGenName +
count++;
}
}
if(D1){
GT_Log.out.println(
"Small Ore:" + this.mWorldGenName +
" @ dim="+aDimensionType+
" chunkX="+aChunkX+
" chunkZ="+aChunkZ+
" ore="+new ItemStack(GregTech_API.sBlockOres1,1,mMeta).getDisplayName()
);
}
}
" ore="+count+" "+new ItemStack(GregTech_API.sBlockOres1,1,mMeta).getDisplayName()
);
}
return true;
}