Added stat counters for biomes and items
This commit is contained in:
parent
8b9080067d
commit
1479ee8a61
3 changed files with 9 additions and 3 deletions
|
@ -26,6 +26,8 @@ import biomesoplenty.common.init.ModBiomes;
|
||||||
public class GuiEventHandler
|
public class GuiEventHandler
|
||||||
{
|
{
|
||||||
public static int blockCount = 0;
|
public static int blockCount = 0;
|
||||||
|
public static int itemCount = 0;
|
||||||
|
public static int biomeCount = 0;
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
|
@ -59,9 +61,9 @@ public class GuiEventHandler
|
||||||
|
|
||||||
text.add("Progress:");
|
text.add("Progress:");
|
||||||
text.add("Blocks: " + blockCount);
|
text.add("Blocks: " + blockCount);
|
||||||
text.add("Items: 0");
|
text.add("Items: " + itemCount);
|
||||||
text.add("Entities: 0");
|
text.add("Entities: 0");
|
||||||
text.add("Biomes: 0");
|
text.add("Biomes: " + biomeCount);
|
||||||
|
|
||||||
createWorldGui.drawHoveringText(text, event.mouseX, event.mouseY);
|
createWorldGui.drawHoveringText(text, event.mouseX, event.mouseY);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,7 @@ import com.google.gson.JsonSyntaxException;
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
import biomesoplenty.common.biome.ExtendedBiomeRegistry;
|
import biomesoplenty.common.biome.ExtendedBiomeRegistry;
|
||||||
import biomesoplenty.common.biome.overworld.BiomeGenAlps;
|
import biomesoplenty.common.biome.overworld.BiomeGenAlps;
|
||||||
|
import biomesoplenty.common.handler.GuiEventHandler;
|
||||||
import biomesoplenty.common.util.config.JsonBiome;
|
import biomesoplenty.common.util.config.JsonBiome;
|
||||||
import biomesoplenty.common.world.WorldTypeBOP;
|
import biomesoplenty.common.world.WorldTypeBOP;
|
||||||
import biomesoplenty.core.BiomesOPlenty;
|
import biomesoplenty.core.BiomesOPlenty;
|
||||||
|
@ -91,6 +92,7 @@ public class ModBiomes
|
||||||
private static Optional<BiomeGenBase> registerBiome(BiomeGenBase biome, String id)
|
private static Optional<BiomeGenBase> registerBiome(BiomeGenBase biome, String id)
|
||||||
{
|
{
|
||||||
biome.biomeID = getNextFreeBiomeId();
|
biome.biomeID = getNextFreeBiomeId();
|
||||||
|
GuiEventHandler.biomeCount++;
|
||||||
|
|
||||||
return loadOrCreateConfig(biome, id);
|
return loadOrCreateConfig(biome, id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@ import java.util.List;
|
||||||
|
|
||||||
import biomesoplenty.api.block.BOPBlocks;
|
import biomesoplenty.api.block.BOPBlocks;
|
||||||
import biomesoplenty.api.item.BOPItemHelper;
|
import biomesoplenty.api.item.BOPItemHelper;
|
||||||
|
import biomesoplenty.common.handler.GuiEventHandler;
|
||||||
import biomesoplenty.common.item.ItemGem;
|
import biomesoplenty.common.item.ItemGem;
|
||||||
import biomesoplenty.common.item.ItemMudball;
|
import biomesoplenty.common.item.ItemMudball;
|
||||||
import biomesoplenty.common.item.ItemWadingBoots;
|
import biomesoplenty.common.item.ItemWadingBoots;
|
||||||
|
@ -62,6 +63,7 @@ public class ModItems
|
||||||
{
|
{
|
||||||
item.setUnlocalizedName(name).setCreativeTab(CreativeTabBOP.instance);
|
item.setUnlocalizedName(name).setCreativeTab(CreativeTabBOP.instance);
|
||||||
GameRegistry.registerItem(item,name);
|
GameRegistry.registerItem(item,name);
|
||||||
|
GuiEventHandler.itemCount++;
|
||||||
|
|
||||||
// register sub types if there are any
|
// register sub types if there are any
|
||||||
if (FMLCommonHandler.instance().getSide() == Side.CLIENT)
|
if (FMLCommonHandler.instance().getSide() == Side.CLIENT)
|
||||||
|
|
Loading…
Reference in a new issue