Thermalily rebalance.

This commit is contained in:
Lizbeth Rika committed 2015-02-02 21:27:31 +00:00
1 parent 6626246e3d
commit 366b7e1c9a
6 files changed
+53 -20

No files matched your search

@@ -10,25 +10,39 @@
*/
package vazkii.botania.common.block.subtile.generating;
import java.util.ArrayList;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.api.subtile.SubTileGenerating;
import vazkii.botania.common.Botania;
import vazkii.botania.common.core.helper.ItemNBTHelper;
import vazkii.botania.common.lexicon.LexiconData;
public class SubTileHydroangeas extends SubTileGenerating {
private static final String TAG_BURN_TIME = "burnTime";
int burnTime = 0;
private static final String TAG_COOLDOWN = "cooldown";
int burnTime, cooldown;
@Override
public void onUpdate() {
super.onUpdate();
if(cooldown > 0) {
cooldown--;
for(int i = 0; i < 3; i++)
Botania.proxy.wispFX(supertile.getWorldObj(), supertile.xCoord + 0.5 + Math.random() * 0.2 - 0.1, supertile.yCoord + 0.5 + Math.random() * 0.2 - 0.1, supertile.zCoord + 0.5 + Math.random() * 0.2 - 0.1, 0.1F, 0.1F, 0.1F, (float) Math.random() / 6, (float) -Math.random() / 30);
return;
}
boolean didSomething = false;
if(burnTime == 0) {
@@ -59,15 +73,19 @@ public class SubTileHydroangeas extends SubTileGenerating {
burnTime += getBurnTime();
playSound();
}
if(didSomething)
sync();
}
} else {
if(supertile.getWorldObj().rand.nextInt(8) == 0)
doBurnParticles();
burnTime--;
if(burnTime == 0) {
cooldown = getCooldown();
didSomething = true;
}
}
if(didSomething)
sync();
}
@Override
@@ -115,6 +133,7 @@ public class SubTileHydroangeas extends SubTileGenerating {
super.writeToPacketNBT(cmp);
cmp.setInteger(TAG_BURN_TIME, burnTime);
cmp.setInteger(TAG_COOLDOWN, cooldown);
}
@Override
@@ -122,8 +141,23 @@ public class SubTileHydroangeas extends SubTileGenerating {
super.readFromPacketNBT(cmp);
burnTime = cmp.getInteger(TAG_BURN_TIME);
cooldown = cmp.getInteger(TAG_COOLDOWN);
}
@Override
public ArrayList<ItemStack> getDrops(ArrayList<ItemStack> list) {
ArrayList<ItemStack> drops = super.getDrops(list);
if(cooldown > 0)
ItemNBTHelper.setInt(drops.get(0), TAG_COOLDOWN, getCooldown());
return drops;
}
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack stack) {
super.onBlockPlacedBy(world, x, y, z, entity, stack);
cooldown = ItemNBTHelper.getInt(stack, TAG_COOLDOWN, 0);
}
@Override
public boolean canGeneratePassively() {
return burnTime > 0;
@@ -134,5 +168,9 @@ public class SubTileHydroangeas extends SubTileGenerating {
boolean rain = supertile.getWorldObj().getWorldChunkManager().getBiomeGenAt(supertile.xCoord, supertile.zCoord).getIntRainfall() > 0 && (supertile.getWorldObj().isRaining() || supertile.getWorldObj().isThundering());
return rain ? 3 : 4;
}
public int getCooldown() {
return 0;
}
}
@@ -44,11 +44,6 @@ public class SubTileThermalily extends SubTileHydroangeas {
return Blocks.lava;
}
@Override
public Block getBlockToSearchBelow() {
return ConfigHandler.thermalilyObsidian ? Blocks.obsidian : null;
}
@Override
public void playSound() {
supertile.getWorldObj().playSoundEffect(supertile.xCoord, supertile.yCoord, supertile.zCoord, "botania:thermalily", 0.2F, 1F);
@@ -61,17 +56,22 @@ public class SubTileThermalily extends SubTileHydroangeas {
@Override
public int getBurnTime() {
return 3500;
return 875;
}
@Override
public int getValueForPassiveGeneration() {
return 2;
return 12;
}
@Override
public int getMaxMana() {
return 250;
}
@Override
public int getCooldown() {
return 9600;
}
}
@@ -50,7 +50,6 @@ public final class ConfigHandler {
public static int spreaderPositionShift = 1;
public static boolean flowerForceCheck = true;
public static boolean enderPickpocketEnabled = true;
public static boolean thermalilyObsidian = false;
public static int hardcorePassiveGeneration = -1;
public static boolean fallenKanadeEnabled = true;
@@ -144,9 +143,6 @@ public final class ConfigHandler {
desc = "Set to false to disable the ability for the Hand of Ender to pickpocket other players' ender chests.";
enderPickpocketEnabled = loadPropBool("enderPickpocket.enabled", desc, enderPickpocketEnabled);
desc = "Set to true to only allow the Thermalily to absorb Lava if there's Obsidian below it. Another config option for the Blood Magic balance freaks.";
thermalilyObsidian = loadPropBool("thermalily.obsidian", desc, thermalilyObsidian);
desc = "Set to anything other than -1 for passive generation flowers (dayblooms, nightshades, hydroangeas) to die after a specific amount of ticks. 24000 is 2 minecraft days, that's a recomended value.";
hardcorePassiveGeneration = loadPropInt("passiveWither.time", desc, hardcorePassiveGeneration);
@@ -77,7 +77,7 @@ public final class ModPetalRecipes {
nightshadeRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_NIGHTSHADE), black, black, purple, gray);
endoflameRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_ENDOFLAME), brown, red, redMana, brownMana, lightGray);
hydroangeasRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_HYDROANGEAS), blueMana, blue, pink, cyan, cyan, cyanMana);
thermalilyRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_THERMALILY), red, orangeMana, orange, runeEarth, runeFire, pixieDust);
thermalilyRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_THERMALILY), red, orangeMana, orange, runeEarth, runeFire);
arcaneRoseRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_ARCANE_ROSE), pink, pinkMana, pinkMana, lime, purple, purpleMana, runeMana);
munchdewRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_MUNCHDEW), lime, limeMana, green, red, redMana, white, whiteMana, runeGluttony);
entropinnyumRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_ENTROPINNYUM), red, redMana, gray, grayMana, white, whiteMana, runeWrath, runeFire);
@@ -420,8 +420,8 @@ public final class LexiconData {
hydroangeas = new BLexiconEntry(LibLexicon.GFLOWER_HYDROANGEAS, categoryGenerationFlowers);
hydroangeas.setLexiconPages(new PageText(ConfigHandler.hardcorePassiveGeneration > 0 ? "0a" : "0"), new PageImage("2", LibResources.ENTRY_HYDROANGEAS), new PagePetalRecipe("1", ModPetalRecipes.hydroangeasRecipe));
thermalily = new ALexiconEntry(LibLexicon.GFLOWER_THERMALILY, categoryGenerationFlowers);
thermalily.setLexiconPages(new PageText(ConfigHandler.thermalilyObsidian ? "0a" : "0"), new PagePetalRecipe("1", ModPetalRecipes.thermalilyRecipe));
thermalily = new BLexiconEntry(LibLexicon.GFLOWER_THERMALILY, categoryGenerationFlowers);
thermalily.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.thermalilyRecipe));
arcaneRose = new BLexiconEntry(LibLexicon.GFLOWER_ARCANE_ROSE, categoryGenerationFlowers);
arcaneRose.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.arcaneRoseRecipe));