mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 11:19:19 +00:00
Fixed the Dandelifeon not generating mana properly.
This commit is contained in:
1 parent
e3feebbfb5
commit
e569ee9803
1 file changed
+4
-7
+4
-7
@@ -52,6 +52,7 @@ public class SubTileDandelifeon extends SubTileGenerating {
|
||||
void runSimulation() {
|
||||
int[][] table = getCellTable();
|
||||
List<int[]> changes = new ArrayList();
|
||||
List<TileCell> cells = new ArrayList();
|
||||
boolean wipe = false;
|
||||
|
||||
for(int i = 0; i < table.length; i++)
|
||||
@@ -122,7 +123,7 @@ public class SubTileDandelifeon extends SubTileGenerating {
|
||||
int getCellGeneration(int x, int y, int z) {
|
||||
TileEntity tile = supertile.getWorldObj().getTileEntity(x, y, z);
|
||||
if(tile instanceof TileCell)
|
||||
return ((TileCell) tile).getGeneration();
|
||||
return ((TileCell) tile).isSameFlower(supertile) ? ((TileCell) tile).getGeneration() : 0;
|
||||
|
||||
return -1;
|
||||
}
|
||||
@@ -167,12 +168,8 @@ public class SubTileDandelifeon extends SubTileGenerating {
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if(gen == -2) {
|
||||
int val = prevGen * MANA_PER_GEN;
|
||||
if(tile instanceof TileCell) {
|
||||
if(((TileCell) tile).isSameFlower(supertile))
|
||||
mana = Math.min(getMaxMana(), mana + val);
|
||||
world.setBlockToAir(x, y, z);
|
||||
|
||||
}
|
||||
mana = Math.min(getMaxMana(), mana + val);
|
||||
//world.setBlockToAir(x, y, z);
|
||||
} else if(blockAt == ModBlocks.cellBlock) {
|
||||
if(gen < 0 || gen > MAX_GENERATIONS)
|
||||
world.setBlockToAir(x, y, z);
|
||||
|
||||
Reference in new issue
Block a user