From eb71d3b7eaea9d76aa2e15aa1c598366a7556275 Mon Sep 17 00:00:00 2001 From: Lizbeth Rika Date: Thu, 5 Mar 2015 19:34:25 +0000 Subject: [PATCH] THE REBALANCING Rebalanced mana generation. All values are relative to the values previous to this release. - Dayblooms had their delay reduced, now 20% faster overall. - Nightshades produce exactly as much as Dayblooms. So 140% faster overall. - Hydroangeas will instantly grab water after they're done with the last drink. A single block of water lasts for 4x as long to prevent sound/update spam. 127% faster overall. - Rosa Arcanas will produce twice as much mana per XP point. They also have 4x as much of an internal buffer. 100% faster overall. - Endoflames had no changes. - Munchdews had the amount that a leaf produces increased tenfold and their internal buffer increased fiftyfold. If they spend more than 5 ticks without eating any leaves they'll go in a 80 second cooldown period. 900% faster overall. - Gourmaryllises have a higher multiplier for the amount that a piece of food produces and a larger internal buffer. 255% faster overall. - Narslimmuses have a higher multiplier for the amount that a slime produces. 412% faster overall. - Thermalilies had their cooldown lowered from 8 minutes to 6 minutes. 31% (+ a negligible number thanks to inheriting the dilligence upgrade from the Hydroangeas) faster overall. - Entropinnyums had no changes. - Kekimuruses had their cooldown increased and amount of mana per slice drastically increased. 75% faster and 181 more resource efficient. - Spectroluses had no changes. --- .../subtile/generating/SubTileArcaneRose.java | 4 +- .../subtile/generating/SubTileDaybloom.java | 2 +- .../generating/SubTileGourmaryllis.java | 4 +- .../generating/SubTileHydroangeas.java | 43 +++--- .../subtile/generating/SubTileKekimurus.java | 6 +- .../subtile/generating/SubTileMunchdew.java | 144 +++++++++++++----- .../subtile/generating/SubTileNarslimmus.java | 2 +- .../subtile/generating/SubTileNightshade.java | 2 +- .../subtile/generating/SubTileThermalily.java | 2 +- .../botania/common/lexicon/LexiconData.java | 2 +- .../resources/assets/botania/lang/en_US.lang | 7 +- 11 files changed, 137 insertions(+), 81 deletions(-) diff --git a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileArcaneRose.java b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileArcaneRose.java index ddffedd39..9bae0802c 100644 --- a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileArcaneRose.java +++ b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileArcaneRose.java @@ -32,7 +32,7 @@ public class SubTileArcaneRose extends SubTileGenerating { for(EntityPlayer player : players) if(ExperienceHelper.getPlayerXP(player) >= 1 && player.onGround) { ExperienceHelper.drainPlayerXP(player, 1); - mana += 12; + mana += 24; sync(); return; } @@ -45,7 +45,7 @@ public class SubTileArcaneRose extends SubTileGenerating { @Override public int getMaxMana() { - return 300; + return 1200; } @Override diff --git a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileDaybloom.java b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileDaybloom.java index 39bba62aa..7bbc582ef 100644 --- a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileDaybloom.java +++ b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileDaybloom.java @@ -36,7 +36,7 @@ public class SubTileDaybloom extends SubTileGenerating { @Override public int getDelayBetweenPassiveGeneration() { - return 30 + (int) (getSurroundingFlowers() * 7.5); + return 25 + (int) (getSurroundingFlowers() * 7.5); } @Override diff --git a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileGourmaryllis.java b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileGourmaryllis.java index 64a2f546f..88ac9f75a 100644 --- a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileGourmaryllis.java +++ b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileGourmaryllis.java @@ -47,7 +47,7 @@ public class SubTileGourmaryllis extends SubTileGenerating { if(stack != null && stack.getItem() instanceof ItemFood) { if(cooldown == 0) { int val = ((ItemFood) stack.getItem()).func_150905_g(stack); - storedMana = val * val * 18; + storedMana = val * val * 64; cooldown = val * 10; supertile.getWorldObj().playSoundEffect(supertile.xCoord, supertile.yCoord, supertile.zCoord, "random.eat", 0.2F, 0.5F + (float) Math.random() * 0.5F); sync(); @@ -74,7 +74,7 @@ public class SubTileGourmaryllis extends SubTileGenerating { @Override public int getMaxMana() { - return 2400; + return 8000; } @Override diff --git a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileHydroangeas.java b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileHydroangeas.java index 6bf8830cf..cc051a548 100644 --- a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileHydroangeas.java +++ b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileHydroangeas.java @@ -11,7 +11,9 @@ package vazkii.botania.common.block.subtile.generating; import java.util.ArrayList; -import java.util.Random; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.entity.EntityLivingBase; @@ -30,6 +32,8 @@ public class SubTileHydroangeas extends SubTileGenerating { private static final String TAG_BURN_TIME = "burnTime"; private static final String TAG_COOLDOWN = "cooldown"; + private static final int[][] OFFSETS = { { 0, 1 }, { 0, -1 }, { 1, 0 }, { -1, 0 }, { -1, 1 }, { -1, -1 }, { 1, 1 }, { 1, -1 } }; + int burnTime, cooldown; @Override @@ -46,34 +50,25 @@ public class SubTileHydroangeas extends SubTileGenerating { boolean didSomething = false; if(burnTime == 0) { - if(ticksExisted % 10L == 0) - if(mana < getMaxMana() && !supertile.getWorldObj().isRemote) { - Random random = new Random(); - int randomInt = random.nextInt(3); - int randomInt2 = random.nextInt(3); - int randomBoolean = random.nextBoolean() ? 1 : -1; - int[] positions = new int[] {supertile.xCoord + randomBoolean, supertile.zCoord + random.nextInt(1) }; - if(randomInt == 0) - positions[0] = supertile.xCoord; - else if(randomInt == 1) - positions[0] = supertile.xCoord + 1; - else if(randomInt == 2) - positions[0] = supertile.xCoord - 1; - - if(randomInt2 == 0) - positions[1] = supertile.zCoord; - else if(randomInt2 == 1) - positions[1] = supertile.zCoord + 1; - else if(randomInt2 == 2) - positions[1] = supertile.zCoord - 1; - + if(mana < getMaxMana() && !supertile.getWorldObj().isRemote) { + List offsets = Arrays.asList(OFFSETS); + Collections.shuffle(offsets); + + for(int[] offsetArray : offsets) { + int[] positions = { + supertile.xCoord + offsetArray[0], + supertile.zCoord + offsetArray[1] + }; if(supertile.getWorldObj().getBlock(positions[0], supertile.yCoord, positions[1]) == getBlockToSearchFor() && (getBlockToSearchBelow() == null || supertile.getWorldObj().getBlock(positions[0], supertile.yCoord - 1, positions[1]) == getBlockToSearchBelow()) && supertile.getWorldObj().getBlockMetadata(positions[0], supertile.yCoord, positions[1]) == 0) { supertile.getWorldObj().setBlockToAir(positions[0], supertile.yCoord, positions[1]); didSomething = true; burnTime += getBurnTime(); playSound(); + break; } } + + } } else { if(supertile.getWorldObj().rand.nextInt(8) == 0) doBurnParticles(); @@ -106,11 +101,11 @@ public class SubTileHydroangeas extends SubTileGenerating { } public void playSound() { - supertile.getWorldObj().playSoundEffect(supertile.xCoord, supertile.yCoord, supertile.zCoord, "random.drink", 0.05F, 0.5F + (float) Math.random() * 0.5F); + supertile.getWorldObj().playSoundEffect(supertile.xCoord, supertile.yCoord, supertile.zCoord, "random.drink", 0.02F, 0.5F + (float) Math.random() * 0.5F); } public int getBurnTime() { - return 10; + return 40; } @Override diff --git a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileKekimurus.java b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileKekimurus.java index d0240eaa0..dc55fce54 100644 --- a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileKekimurus.java +++ b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileKekimurus.java @@ -22,9 +22,9 @@ public class SubTileKekimurus extends SubTileGenerating { public void onUpdate() { super.onUpdate(); - int mana = 640; + int mana = 1800; - if(getMaxMana() - this.mana >= mana && !supertile.getWorldObj().isRemote && ticksExisted % 50 == 0) { + if(getMaxMana() - this.mana >= mana && !supertile.getWorldObj().isRemote && ticksExisted % 80 == 0) { int range = 5; for(int i = 0; i < range * 2 + 1; i++) for(int j = 0; j < range * 2 + 1; j++) @@ -61,7 +61,7 @@ public class SubTileKekimurus extends SubTileGenerating { @Override public int getMaxMana() { - return 4200; + return 9001; } } diff --git a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileMunchdew.java b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileMunchdew.java index 9714946fc..df0941f8f 100644 --- a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileMunchdew.java +++ b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileMunchdew.java @@ -16,61 +16,121 @@ import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ChunkCoordinates; +import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import vazkii.botania.api.lexicon.LexiconEntry; import vazkii.botania.api.subtile.SubTileGenerating; import vazkii.botania.common.core.handler.ConfigHandler; +import vazkii.botania.common.core.helper.ItemNBTHelper; import vazkii.botania.common.lexicon.LexiconData; public class SubTileMunchdew extends SubTileGenerating { + private static final String TAG_COOLDOWN = "cooldown"; + private static final String TAG_ATE_ONCE = "ateOnce"; + + boolean ateOnce = false; + int ticksWithoutEating = -1; + int cooldown = 0; + @Override public void onUpdate() { super.onUpdate(); - int manaPerLeaf = 16; - if(getMaxMana() - mana >= manaPerLeaf && !supertile.getWorldObj().isRemote && ticksExisted % 4 == 0) { - List coords = new ArrayList(); - int range = 8; - int rangeY = 16; - - int x = supertile.xCoord; - int y = supertile.yCoord; - int z = supertile.zCoord; - - for(int i = -range; i < range + 1; i++) - for(int j = 0; j < rangeY; j++) - for(int k = -range; k < range + 1; k++) { - int xp = x + i; - int yp = y + j; - int zp = z + k; - Block block = supertile.getWorldObj().getBlock(xp, yp, zp); - if(block.getMaterial() == Material.leaves) { - boolean exposed = false; - for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) - if(supertile.getWorldObj().getBlock(xp + dir.offsetX, yp + dir.offsetY, zp + dir.offsetZ).isAir(supertile.getWorldObj(), xp + dir.offsetX, yp + dir.offsetY, zp + dir.offsetZ)) { - exposed = true; - break; - } - - if(exposed) - coords.add(new ChunkCoordinates(xp, yp, zp)); - } - } - - if(coords.isEmpty()) - return; - - Collections.shuffle(coords); - ChunkCoordinates breakCoords = coords.get(0); - Block block = supertile.getWorldObj().getBlock(breakCoords.posX, breakCoords.posY, breakCoords.posZ); - int meta = supertile.getWorldObj().getBlockMetadata(breakCoords.posX, breakCoords.posY, breakCoords.posZ); - supertile.getWorldObj().setBlockToAir(breakCoords.posX, breakCoords.posY, breakCoords.posZ); - if(ConfigHandler.blockBreakParticles) - supertile.getWorldObj().playAuxSFX(2001, breakCoords.posX, breakCoords.posY, breakCoords.posZ, Block.getIdFromBlock(block) + (meta << 12)); - mana += manaPerLeaf; + if(cooldown > 0) { + System.out.println(cooldown); + cooldown--; + ticksWithoutEating = 0; + return; } + + int manaPerLeaf = 160; + eatLeaves : { + if(getMaxMana() - mana >= manaPerLeaf && !supertile.getWorldObj().isRemote && ticksExisted % 4 == 0) { + List coords = new ArrayList(); + int range = 8; + int rangeY = 16; + + int x = supertile.xCoord; + int y = supertile.yCoord; + int z = supertile.zCoord; + + for(int i = -range; i < range + 1; i++) + for(int j = 0; j < rangeY; j++) + for(int k = -range; k < range + 1; k++) { + int xp = x + i; + int yp = y + j; + int zp = z + k; + Block block = supertile.getWorldObj().getBlock(xp, yp, zp); + if(block.getMaterial() == Material.leaves) { + boolean exposed = false; + for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) + if(supertile.getWorldObj().getBlock(xp + dir.offsetX, yp + dir.offsetY, zp + dir.offsetZ).isAir(supertile.getWorldObj(), xp + dir.offsetX, yp + dir.offsetY, zp + dir.offsetZ)) { + exposed = true; + break; + } + + if(exposed) + coords.add(new ChunkCoordinates(xp, yp, zp)); + } + } + + if(coords.isEmpty()) + break eatLeaves; + + Collections.shuffle(coords); + ChunkCoordinates breakCoords = coords.get(0); + Block block = supertile.getWorldObj().getBlock(breakCoords.posX, breakCoords.posY, breakCoords.posZ); + int meta = supertile.getWorldObj().getBlockMetadata(breakCoords.posX, breakCoords.posY, breakCoords.posZ); + supertile.getWorldObj().setBlockToAir(breakCoords.posX, breakCoords.posY, breakCoords.posZ); + ticksWithoutEating = 0; + ateOnce = true; + if(ConfigHandler.blockBreakParticles) + supertile.getWorldObj().playAuxSFX(2001, breakCoords.posX, breakCoords.posY, breakCoords.posZ, Block.getIdFromBlock(block) + (meta << 12)); + mana += manaPerLeaf; + } + } + + if(ateOnce) { + ticksWithoutEating++; + if(ticksWithoutEating >= 5) + cooldown = 1600; + } + + } + + @Override + public void writeToPacketNBT(NBTTagCompound cmp) { + super.writeToPacketNBT(cmp); + + cmp.setInteger(TAG_COOLDOWN, cooldown); + cmp.setBoolean(TAG_ATE_ONCE, ateOnce); + } + + @Override + public void readFromPacketNBT(NBTTagCompound cmp) { + super.readFromPacketNBT(cmp); + + cooldown = cmp.getInteger(TAG_COOLDOWN); + ateOnce = cmp.getBoolean(TAG_ATE_ONCE); + } + + @Override + public ArrayList getDrops(ArrayList list) { + ArrayList drops = super.getDrops(list); + if(cooldown > 0) + ItemNBTHelper.setInt(drops.get(0), TAG_COOLDOWN, cooldown); + 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 @@ -80,7 +140,7 @@ public class SubTileMunchdew extends SubTileGenerating { @Override public int getMaxMana() { - return 200; + return 10000; } @Override diff --git a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileNarslimmus.java b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileNarslimmus.java index 58ca7a849..4507343e8 100644 --- a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileNarslimmus.java +++ b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileNarslimmus.java @@ -39,7 +39,7 @@ public class SubTileNarslimmus extends SubTileGenerating { if(slime.getEntityData().getBoolean(TAG_WORLD_SPAWNED)) { int size = slime.getSlimeSize(); int mul = (int) Math.pow(2, size); - int mana = 160 * mul; + int mana = 820 * mul; if(!slime.worldObj.isRemote) { slime.setDead(); slime.worldObj.playSoundAtEntity(slime, "mob.slime." + (size > 1 ? "big" : "small"), 1F, 0.02F); diff --git a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileNightshade.java b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileNightshade.java index 127a23478..bdde16e6d 100644 --- a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileNightshade.java +++ b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileNightshade.java @@ -17,7 +17,7 @@ public class SubTileNightshade extends SubTileDaybloom { @Override public int getDelayBetweenPassiveGeneration() { - return super.getDelayBetweenPassiveGeneration() * 2; + return (int) super.getDelayBetweenPassiveGeneration(); } @Override diff --git a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileThermalily.java b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileThermalily.java index 888063653..233ae9ec3 100644 --- a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileThermalily.java +++ b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileThermalily.java @@ -70,7 +70,7 @@ public class SubTileThermalily extends SubTileHydroangeas { @Override public int getCooldown() { - return 9600; + return 7200; } } diff --git a/src/main/java/vazkii/botania/common/lexicon/LexiconData.java b/src/main/java/vazkii/botania/common/lexicon/LexiconData.java index 6f36456d9..a2f2ac855 100644 --- a/src/main/java/vazkii/botania/common/lexicon/LexiconData.java +++ b/src/main/java/vazkii/botania/common/lexicon/LexiconData.java @@ -458,7 +458,7 @@ public final class LexiconData { arcaneRose.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.arcaneRoseRecipe)); munchdew = new BLexiconEntry(LibLexicon.GFLOWER_MUNCHDEW, categoryGenerationFlowers); - munchdew.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.munchdewRecipe)); + munchdew.setLexiconPages(new PageText("0"), new PageText("1"), new PagePetalRecipe("2", ModPetalRecipes.munchdewRecipe)); entropinnyum = new BLexiconEntry(LibLexicon.GFLOWER_ENTROPINNYUM, categoryGenerationFlowers); entropinnyum.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.entropinnyumRecipe)); diff --git a/src/main/resources/assets/botania/lang/en_US.lang b/src/main/resources/assets/botania/lang/en_US.lang index 583f1ac96..d44bfe07c 100644 --- a/src/main/resources/assets/botania/lang/en_US.lang +++ b/src/main/resources/assets/botania/lang/en_US.lang @@ -1532,8 +1532,8 @@ botania.page.daybloom5=&oHow could it be that what you need the most can leave y # -- NIGHTSHADE botania.entry.nightshade=Nightshade -botania.page.nightshade0=The &1Nightshade&0 is the dark counterpart of the &1Daybloom&0, as it generates &4Mana&0 passively in any situation the &1Daybloom&0 can not, as long as it's nighttime, albeit at half the speed.
Similarly to their shining counterpart, they suffer diminishing returns from having any adjacent. -botania.page.nightshade0a=The &1Nightshade&0 is the dark counterpart of the &1Daybloom&0, as it generates &4Mana&0 passively in any situation the &1Daybloom&0 can not, as long as it's nighttime, albeit at half the speed.Alike its shining counterpart, they suffer diminishing returns from having any adjacent and are not very resistant, and some time they'll wither and die off. +botania.page.nightshade0=The &1Nightshade&0 is the dark counterpart of the &1Daybloom&0, as it generates &4Mana&0 passively in any situation the &1Daybloom&0 can not, as long as it's nighttime
Similarly to their shining counterpart, they suffer diminishing returns from having any adjacent. +botania.page.nightshade0a=The &1Nightshade&0 is the dark counterpart of the &1Daybloom&0, as it generates &4Mana&0 passively in any situation the &1Daybloom&0 can not, as long as it's nighttime. Alike its shining counterpart, they suffer diminishing returns from having any adjacent and are not very resistant, and some time they'll wither and die off. botania.page.nightshade1=&oThe shadow of the day&r. # -- ENDOFLAME @@ -1562,7 +1562,8 @@ botania.page.arcanerose1=&oWhen this card is Summoned, toss a coin&r. # -- MUNCHDEW botania.entry.munchdew=Munchdew botania.page.munchdew0=Generating the form of natural energy that is &4Mana&0 should be a pretty good process when done via other living materials. By using the &1Munchdew&0, any &1Leaves&0 near the flower will get munched up and converted into &4Mana&0.
It's to note that, though, no saplings or any other items will be dropped from the leaves. -botania.page.munchdew1=&oYou pay for dinner, Shibazaki&r. +botania.page.munchdew1=This flower outputs a hefty amount of mana per tree eaten.
However, after if finishes eating all the available leaves, when left without any, it'll take a break from doing so and will only be able to eat again after a bit over a minute. +botania.page.munchdew2=&oYou pay for dinner, Shibazaki&r. # -- ENTROPINNYUM botania.entry.entropinnyum=Entropinnyum