mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-14 17:14:46 +00:00
Compare commits
8
Commits
master
...
4.6.11-pre
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a742300bde | ||
|
|
28ae5ebefb | ||
|
|
7ffee78d26 | ||
|
|
22ff1f569a | ||
|
|
6f399f1f96 | ||
|
|
c442981f36 | ||
|
|
6a4eb69f1a | ||
|
|
33fcde2341 |
No files matched your search
@@ -24,7 +24,7 @@ public class DefaultBeeModifier implements IBeeModifier {
|
||||
}
|
||||
|
||||
public float getProductionModifier(IBeeGenome genome, float currentModifier) {
|
||||
return 1.0f;
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
public float getFloweringModifier(IBeeGenome genome, float currentModifier) {
|
||||
|
||||
@@ -15,6 +15,6 @@ public class ApiaryBeeModifier extends DefaultBeeModifier {
|
||||
|
||||
@Override
|
||||
public float getProductionModifier(IBeeGenome genome, float currentModifier) {
|
||||
return 0.1f;
|
||||
return -0.9f; // results in 0.1 with no frames, see BeeHousingModifier,java
|
||||
}
|
||||
}
|
||||
@@ -49,7 +49,8 @@ public class BeeHousingModifier implements IBeeModifier {
|
||||
|
||||
@Override
|
||||
public float getProductionModifier(IBeeGenome genome, final float currentModifier) {
|
||||
float modifierValue = 1.0f;
|
||||
float modifierValue = 0.0f;// the "base" value of 1.0 should come from Bee.java or BeeKeepingMode.jave, that is,
|
||||
// it should be set at the call site
|
||||
for (IBeeModifier modifier : beeHousing.getBeeModifiers()) {
|
||||
modifierValue += modifier.getProductionModifier(genome, modifierValue + currentModifier);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ public class BeehouseBeeModifier extends DefaultBeeModifier {
|
||||
|
||||
@Override
|
||||
public float getProductionModifier(IBeeGenome genome, float currentModifier) {
|
||||
return 0.25f;
|
||||
return -0.75f;// results in 0.25 with no frames, see BeeHousingModifier,java
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -84,10 +84,12 @@ public class EventHandlerApiculture {
|
||||
String formatted = color.toString();
|
||||
|
||||
// Set symbol for if this value is additive or multiplicative
|
||||
if (additive) {
|
||||
if (!additive) {
|
||||
formatted += " x";
|
||||
} else if (value >= 0.0F) {
|
||||
formatted += " +";
|
||||
} else {
|
||||
formatted += " x";
|
||||
formatted += " "; // the "-" will be applied, but we still need a space or minecraft will crash
|
||||
}
|
||||
|
||||
// trim trailing zeroes if no decimal-precision is needed
|
||||
|
||||
@@ -514,8 +514,8 @@ public class Bee extends IndividualLiving implements IBee {
|
||||
|
||||
// Bee genetic speed * beehousing * beekeeping mode
|
||||
float speed = genome.getSpeed();
|
||||
float prodModifier = beeHousingModifier.getProductionModifier(genome, 1f)
|
||||
* beeModeModifier.getProductionModifier(genome, 1f);
|
||||
float prodModifier = beeHousingModifier.getProductionModifier(genome, 1f);
|
||||
prodModifier += beeModeModifier.getProductionModifier(genome, prodModifier);
|
||||
|
||||
// / Primary Products
|
||||
for (Map.Entry<ItemStack, Float> entry : primary.getProductChances().entrySet()) {
|
||||
@@ -551,6 +551,9 @@ public class Bee extends IndividualLiving implements IBee {
|
||||
}
|
||||
|
||||
public static float getFinalChance(float chance, float beeSpeed, float productionModifier, float t) {
|
||||
if (productionModifier + t <= 0f) {
|
||||
return 0;
|
||||
}
|
||||
chance *= 100f;
|
||||
return (float) (2.8 * Math.pow(chance, 0.52)
|
||||
* Math.pow((productionModifier + t), 0.52)
|
||||
|
||||
@@ -24,11 +24,19 @@ import forestry.api.apiculture.IBeekeepingMode;
|
||||
|
||||
public class BeekeepingMode implements IBeekeepingMode {
|
||||
|
||||
public static final IBeekeepingMode easy = new BeekeepingMode("EASY", 2.0f, 1.0f, 1.0f, false, false);
|
||||
public static final IBeekeepingMode normal = new BeekeepingMode("NORMAL", 1.0f, 1.0f, 1.0f, false, true);
|
||||
public static final IBeekeepingMode hard = new BeekeepingMode("HARD", 0.75f, 1.5f, 1.0f, false, true);
|
||||
public static final IBeekeepingMode hardcore = new BeekeepingMode("HARDCORE", 0.5f, 5.0f, 0.8f, true, true);
|
||||
public static final IBeekeepingMode insane = new BeekeepingMode("INSANE", 0.2f, 10.0f, 0.6f, true, true);
|
||||
public static final IBeekeepingMode easy = new BeekeepingMode("EASY", 2.0f, 1.0f, 0.0f, false, false);// original
|
||||
// multiplicative
|
||||
// modifier is
|
||||
// 1x
|
||||
public static final IBeekeepingMode normal = new BeekeepingMode("NORMAL", 1.0f, 1.0f, 0.0f, false, true);// orig 1x
|
||||
public static final IBeekeepingMode hard = new BeekeepingMode("HARD", 0.75f, 1.5f, 0.0f, false, true);// orig 1x;
|
||||
// this is the
|
||||
// default in
|
||||
// gtnh
|
||||
public static final IBeekeepingMode hardcore = new BeekeepingMode("HARDCORE", 0.5f, 5.0f, -0.2f, true, true);// orig
|
||||
// 0.8x
|
||||
public static final IBeekeepingMode insane = new BeekeepingMode("INSANE", 0.2f, 10.0f, -0.4f, true, true);// orig
|
||||
// 0.6x
|
||||
|
||||
private final Random rand;
|
||||
private final String name;
|
||||
|
||||
@@ -56,7 +56,7 @@ public class ItemHiveFrame extends ItemForestry implements IHiveFrame {
|
||||
|
||||
@Override
|
||||
public float getProductionModifier(IBeeGenome genome, float currentModifier) {
|
||||
return (currentModifier < 10f) ? 2f : 1f;
|
||||
return (currentModifier < 10.0f) ? 2.0f : 0.0f;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user