aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/tileentities/machines/basic
diff options
context:
space:
mode:
authorhacatu <hacatu5000@gmail.com>2023-09-08 20:38:41 +0000
committerGitHub <noreply@github.com>2023-09-08 22:38:41 +0200
commite4f17b7b40503fd34d9dae447802453480b9577c (patch)
treee5d8d6eb5c0caaa87ba40f8fb2e62740f3e1ad3f /src/main/java/gregtech/common/tileentities/machines/basic
parent7e18bbad926a8b142113ecd59e428db08209b4de (diff)
downloadGT5-Unofficial-e4f17b7b40503fd34d9dae447802453480b9577c.tar.gz
GT5-Unofficial-e4f17b7b40503fd34d9dae447802453480b9577c.tar.bz2
GT5-Unofficial-e4f17b7b40503fd34d9dae447802453480b9577c.zip
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
Diffstat (limited to 'src/main/java/gregtech/common/tileentities/machines/basic')
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java25
1 files changed, 21 insertions, 4 deletions
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();