mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-12 08:17:29 +00:00
Adding config values for Hibeescus.
Adding redstone sensitivity to Hibeescus to not pick up princesses/queens when it has a signal. Adding extra information to Hibeescus lexicon entry.
This commit is contained in:
1 parent
223aba18a4
commit
c62db23f79
3 files changed
+34
-5
No files matched your search
@@ -104,6 +104,8 @@ public class BotaniaHelper {
|
||||
public static double hiveacynthRainResistRate;
|
||||
public static double hiveacynthPrincessSpawnRate;
|
||||
public static double hiveacynthPristineRate;
|
||||
public static double hibeescusTicksMultiplier;
|
||||
public static double hibeescusManaCostMultiplier;
|
||||
|
||||
public static boolean isActive() {
|
||||
return isBotaniaActive;
|
||||
@@ -198,8 +200,16 @@ public class BotaniaHelper {
|
||||
hiveacynthPrincessSpawnRate = p.getDouble();
|
||||
|
||||
p = configuration.get(Config.CATEGORY_BOTANIA, "hiveacynthPristineRate", 0.15);
|
||||
p.comment = "Rate at which the Hiveacynth will produce a Pristine Princess, when it produces a princess. Default: 0.15. Setting to 0 will disable.";
|
||||
p.comment = "Rate at which the Hiveacynth will produce a Pristine Princess, when it produces a princess. Default: 0.15. Setting to 0 will disable, setting to 1 will make every Princess produced pristine..";
|
||||
hiveacynthPristineRate = p.getDouble();
|
||||
|
||||
p = configuration.get(Config.CATEGORY_BOTANIA, "hibeescusManaCostMultiplier", 1.0);
|
||||
p.comment = "Multiplier on Hibeescus mana cost, base 10,000. Default 1.0. Setting to 0 makes you a huge cheater. <3";
|
||||
hibeescusManaCostMultiplier = p.getDouble();
|
||||
|
||||
p = configuration.get(Config.CATEGORY_BOTANIA, "hibeescusTicksMultiplier", 1.0);
|
||||
p.comment = "Multiplier for Hibeescus operation tick time. Multiplied against 1.5 Minecraft days with some extra randomness. Default: 1.0. Setting to 0 makes you a huge cheater. <3";
|
||||
hibeescusTicksMultiplier = p.getDouble();
|
||||
}
|
||||
|
||||
public static boolean requestMana(ItemStack stack, EntityPlayer player, int manaPerDamage, int charges) {
|
||||
|
||||
@@ -116,6 +116,7 @@ public class BotaniaAPIDistanceHelper {
|
||||
entryHibeescus = new BotaniaLexiconEntry("tile.botania:flower." + SubTileHibeescus.NAME + ".name", BotaniaAPI.categoryFunctionalFlowers);
|
||||
entryHibeescus.setLexiconPages(BotaniaAPI.internalHandler.textPage("magicbees.botania.lexicon.hibeescus.0"),
|
||||
BotaniaAPI.internalHandler.textPage("magicbees.botania.lexicon.hibeescus.1"),
|
||||
BotaniaAPI.internalHandler.textPage("magicbees.botania.lexicon.hibeescus.2"),
|
||||
BotaniaAPI.internalHandler.petalRecipePage("magicbees.botania.lexicon.hibeescus.crafting", hibeescusRecipe)
|
||||
);
|
||||
|
||||
|
||||
@@ -4,11 +4,16 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import magicbees.bees.BeeManager;
|
||||
import magicbees.main.utils.compat.BotaniaHelper;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.subtile.SubTileFunctional;
|
||||
import forestry.api.apiculture.EnumBeeType;
|
||||
import forestry.api.apiculture.IBee;
|
||||
@@ -16,7 +21,8 @@ import forestry.api.apiculture.IBee;
|
||||
public class SubTileHibeescus extends SubTileFunctional {
|
||||
|
||||
public static final String NAME = "hibeescus";
|
||||
private final int MANA_PER_OPERATION = 100000;
|
||||
private final int MANA_PER_OPERATION = 10000;
|
||||
// Ticks per second * seconds per minute * real-time minutes
|
||||
private final int OPERATION_TICKS_TIME = 20 * 60 * 15;
|
||||
private final int RANGE = 1;
|
||||
|
||||
@@ -26,11 +32,14 @@ public class SubTileHibeescus extends SubTileFunctional {
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
if (supertile.getWorldObj().isRemote) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (beeSlot != null && this.mana >= MANA_PER_OPERATION) {
|
||||
progressOperation();
|
||||
}
|
||||
else if (beeSlot == null && this.supertile.getWorldObj().getTotalWorldTime() % 10 == 0) {
|
||||
else if (beeSlot == null && this.supertile.getWorldObj().getTotalWorldTime() % 10 == 0 && redstoneSignal == 0) {
|
||||
findBeeItemToHold();
|
||||
}
|
||||
}
|
||||
@@ -68,7 +77,10 @@ public class SubTileHibeescus extends SubTileFunctional {
|
||||
ItemStack item = itemEntity.getEntityItem();
|
||||
if (isItemPrincessOrQueen(item)) {
|
||||
beeSlot = itemEntity.getEntityItem();
|
||||
operationTicksRemaining = OPERATION_TICKS_TIME;
|
||||
operationTicksRemaining = (long)(OPERATION_TICKS_TIME * BotaniaHelper.hibeescusTicksMultiplier);
|
||||
if (operationTicksRemaining > 0) {
|
||||
operationTicksRemaining += supertile.getWorldObj().rand.nextInt((int)(operationTicksRemaining * 0.02));
|
||||
}
|
||||
|
||||
// Princesses and Queens don't stack, but YOU NEVER KNOW.
|
||||
item.stackSize -= 1;
|
||||
@@ -131,7 +143,13 @@ public class SubTileHibeescus extends SubTileFunctional {
|
||||
|
||||
@Override
|
||||
public int getMaxMana() {
|
||||
return MANA_PER_OPERATION;
|
||||
return (int)(MANA_PER_OPERATION * BotaniaHelper.hibeescusManaCostMultiplier);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon() {
|
||||
return BotaniaAPI.getSignatureForName(NAME).getIconForStack(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user