From e4f17b7b40503fd34d9dae447802453480b9577c Mon Sep 17 00:00:00 2001 From: hacatu Date: Fri, 8 Sep 2023 20:38:41 +0000 Subject: Add BarnardaC bee effect, enhance tooltip and waila for iapiary (#2255) * Added BarnardaC bee effect, added harder alternative mutation for indium bee * Improved tooltip and waila hud for iapiary * Shorten effect name for beealyzer * Moved Effects to own files, cached constants * Refactor constant names --- .../basic/GT_MetaTileEntity_IndustrialApiary.java | 25 ++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'src/main/java/gregtech/common') diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java index de1640e958..e43b1a305c 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java @@ -144,7 +144,13 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM aNameRegional, aTier, 4, - new String[] { "BEES GOES BRRRR", EnumChatFormatting.GRAY + AuthorKuba }, + new String[] { "BEES GOES BRRRR", EnumChatFormatting.GRAY + AuthorKuba, + "Effective production chance as a percent is", "2.8 * b^0.52 * (p + t)^0.52 * s^0.37", + "where b is the base production chance as a percent,", + "p is the production modifier (2 w/o upgrades, or 4 * 1.2^n with n production upgrades),", + "t is 8 for the industrial apiary, and", "s is the speed value for the bee", + "Outputs are generated at the end of every bee tick (...)", + "Primary outputs are rolled once with base chance, once with half base" }, 6, 9, "IndustrialApiary.png", @@ -1457,6 +1463,11 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM currenttip.add( "Current Queen: " + EnumChatFormatting.GREEN + StatCollector.translateToLocal(tag.getString("queen"))); } + if (tag.hasKey("dummyProduction")) { + currenttip.add( + "Effective Production: " + EnumChatFormatting.AQUA + + String.format("b^0.52 * %.2f", tag.getFloat("dummyProduction"))); + } if (tag.hasKey("errors")) { NBTTagCompound errorNbt = tag.getCompoundTag("errors"); for (int i = 0; i < errorNbt.getInteger("size"); i++) { @@ -1472,12 +1483,18 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM int z) { super.getWailaNBTData(player, tile, tag, world, x, y, z); if (usedQueen != null) { + IBeeGenome genome = beeRoot.getMember(usedQueen) + .getGenome(); tag.setString( "queen", - beeRoot.getMember(usedQueen) - .getGenome() - .getPrimary() + genome.getPrimary() .getUnlocalizedName()); + float prodModifier = getProductionModifier(genome, 0f); + prodModifier += beeRoot.getBeekeepingMode(world) + .getBeeModifier() + .getProductionModifier(genome, prodModifier); + float dummyProduction = 100f * Bee.getFinalChance(0.01f, genome.getSpeed(), prodModifier, 8f); + tag.setFloat("dummyProduction", dummyProduction); } if (hasErrors()) { NBTTagCompound errorNbt = new NBTTagCompound(); -- cgit