Dropped the nerfhammer on Dayblooms and Nightshades.

This commit is contained in:
Vasco Lavos committed 2014-06-06 21:49:13 +01:00
1 parent 76efbda1bc
commit 63c00489ad
4 files changed
+35 -4

No files matched your search

@@ -11,12 +11,19 @@
*/
package vazkii.botania.common.block.subtile.generating;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.api.subtile.SubTileGenerating;
import vazkii.botania.common.block.tile.TileSpecialFlower;
import vazkii.botania.common.lexicon.LexiconData;
public class SubTileDaybloom extends SubTileGenerating {
private static final ForgeDirection[] CARDINAL_DIRECTIONS = new ForgeDirection[] {
ForgeDirection.NORTH, ForgeDirection.SOUTH, ForgeDirection.EAST, ForgeDirection.WEST
};
@Override
public int getColor() {
return 0xFFFF00;
@@ -27,6 +34,25 @@ public class SubTileDaybloom extends SubTileGenerating {
boolean rain = supertile.getWorldObj().getWorldChunkManager().getBiomeGenAt(supertile.xCoord, supertile.zCoord).getIntRainfall() > 0 && (supertile.getWorldObj().isRaining() || supertile.getWorldObj().isThundering());
return !supertile.getWorldObj().isRemote && supertile.getWorldObj().isDaytime() && !rain && supertile.getWorldObj().canBlockSeeTheSky(supertile.xCoord, supertile.yCoord + 1, supertile.zCoord);
}
@Override
public int getDelayBetweenPassiveGeneration() {
return 30 + (int) (getSurroundingFlowers() * 7.5);
}
public int getSurroundingFlowers() {
int flowers = 0;
for(ForgeDirection dir : CARDINAL_DIRECTIONS) {
TileEntity tile = supertile.getWorldObj().getTileEntity(supertile.xCoord + dir.offsetX, supertile.yCoord, supertile.zCoord + dir.offsetZ);
if(tile != null && tile instanceof TileSpecialFlower) {
TileSpecialFlower flower = (TileSpecialFlower) tile;
if(flower.getSubTile() != null && flower.getSubTile().getClass() == getClass())
flowers++;
}
}
return flowers;
}
@Override
public boolean shouldSyncPassiveGeneration() {
@@ -23,7 +23,7 @@ public class SubTileNightshade extends SubTileDaybloom {
@Override
public boolean canGeneratePassively() {
return !super.canGeneratePassively();
return !super.canGeneratePassively() && !supertile.getWorldObj().isDaytime();
}
@Override
@@ -31,6 +31,10 @@ public class TileSpecialFlower extends TileMod implements ITileBound {
public String subTileName = "";
SubTileEntity subTile;
public SubTileEntity getSubTile() {
return subTile;
}
public void setSubTile(String name) {
subTileName = name;
+4 -3
View File
@@ -689,12 +689,13 @@ botania.page.gIntro2=It is important to keep in mind that these flowers memorize
# -- DAYBLOOM
botania.entry.daybloom=Daybloom
botania.page.daybloom0=The &1Daybloom&0 is the most basic and rudimentary &4Generating Flower&0. Simply put, it preforms a modified photosythesis process, in order to transform sunlight into &4Mana&0.<br>The process is rather slow, you think half a dozen to ten of these should get the job done, for now.
botania.page.daybloom1=&oStarting up a brand new day&r.
botania.page.daybloom0=The &1Daybloom&0 is the most basic and rudimentary &4Generating Flower&0. Simply put, it preforms a modified photosythesis process, in order to transform sunlight into &4Mana&0.<br>The process is rather slow, about ten or a dozen of these should get the job done, for now.
botania.page.daybloom1=An interesting thing to take in note is that these flowers tend to compete among themselves for what sunlight hits an area, thus having any others adjacent to it on any of the four cardinal directions will result in diminshing returns of &4Mana&0 production.
botania.page.daybloom2=&oStarting up a brand new day&r.
# -- 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, albeit at half the speed.
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, albeit at half the speed.<br>Similarly to their shining counterpart, they suffer diminishing returns from having any adjacent.
botania.page.nightshade1=&oThe shadow of the day&r.
# -- ENDOFLAME