mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-22 13:09:42 +00:00
The dandelifeon produces a lot more mana per cell now, however, whenever a cell is eaten, the board is wiped. Also added an "warning: experimental" page to the entry.
This commit is contained in:
1 parent
218aec3016
commit
16e87bcc94
3 files changed
+14
-6
No files matched your search
+11
-4
@@ -28,7 +28,7 @@ public class SubTileDandelifeon extends SubTileGenerating {
|
||||
private static final int RANGE = 12;
|
||||
private static final int SPEED = 10;
|
||||
private static final int MAX_GENERATIONS = 60;
|
||||
private static final int MANA_PER_GEN = 35;
|
||||
private static final int MANA_PER_GEN = 150;
|
||||
|
||||
private static final int[][] ADJACENT_BLOCKS = new int[][] {
|
||||
{ -1, -1 },
|
||||
@@ -52,6 +52,7 @@ public class SubTileDandelifeon extends SubTileGenerating {
|
||||
void runSimulation() {
|
||||
int[][] table = getCellTable();
|
||||
List<int[]> changes = new ArrayList();
|
||||
boolean wipe = false;
|
||||
|
||||
for(int i = 0; i < table.length; i++)
|
||||
for(int j = 0; j < table[0].length; j++) {
|
||||
@@ -70,24 +71,30 @@ public class SubTileDandelifeon extends SubTileGenerating {
|
||||
|
||||
int xdist = Math.abs(i - RANGE);
|
||||
int zdist = Math.abs(j - RANGE);
|
||||
int allowDist = newVal == 1 && gen == 0 ? 3 : 1;
|
||||
int allowDist = 1;
|
||||
if(xdist <= allowDist && zdist <= allowDist && newVal > -1) {
|
||||
gen = newVal;
|
||||
newVal = gen == 1 ? -1 : -2;
|
||||
}
|
||||
|
||||
if(newVal != gen)
|
||||
if(newVal != gen) {
|
||||
changes.add(new int[] { i, j, newVal, gen });
|
||||
if(newVal == -2)
|
||||
wipe = true;
|
||||
}
|
||||
}
|
||||
|
||||
int x = supertile.xCoord;
|
||||
int y = supertile.yCoord;
|
||||
int z = supertile.zCoord;
|
||||
|
||||
|
||||
for(int[] change : changes) {
|
||||
int px = x - RANGE + change[0];
|
||||
int pz = z - RANGE + change[1];
|
||||
int val = change[2];
|
||||
if(val != -2 && wipe)
|
||||
val = -1;
|
||||
|
||||
int old = change[3];
|
||||
|
||||
setBlockForGeneration(px, y, pz, val, old);
|
||||
|
||||
@@ -571,7 +571,7 @@ public final class LexiconData {
|
||||
spectrolus.setLexiconPages(new PageText("0"), new PageText("1"), new PagePetalRecipe("2", ModPetalRecipes.spectrolusRecipe));
|
||||
|
||||
dandelifeon = new ALexiconEntry(LibLexicon.GFLOWER_DANDELIFEON, categoryGenerationFlowers);
|
||||
dandelifeon.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"), new PageText("3"), new PageText("4"), new PageText("5"), new PageText("6"), new PageText("10"), new PageText("7"), new PagePetalRecipe("8", ModPetalRecipes.dandelifeonRecipe), new PageCraftingRecipe("9", ModCraftingRecipes.recipeCellBlock));
|
||||
dandelifeon.setLexiconPages(new PageText("_w"), new PageText("0"), new PageText("1"), new PageText("2"), new PageText("3"), new PageText("4"), new PageText("5"), new PageText("6"), new PageText("10"), new PageText("7"), new PagePetalRecipe("8", ModPetalRecipes.dandelifeonRecipe), new PageCraftingRecipe("9", ModCraftingRecipes.recipeCellBlock));
|
||||
|
||||
// DEVICES ENTRIES
|
||||
pylon = new BLexiconEntry(LibLexicon.DEVICE_PYLON, categoryDevices);
|
||||
|
||||
@@ -2446,6 +2446,7 @@ botania.page.spectrolus2=&oTaste the Rainbow&r.
|
||||
|
||||
# -- DANDELIFEON
|
||||
botania.entry.dandelifeon=Dandelifeon
|
||||
botania.page.dandelifeon_w=Warning: This feature is experimental.<br>It may, and probably will change in the future. Do not get too attached to it.
|
||||
botania.page.dandelifeon0=The &1Dandelifeon&0 is a flower not recommended for those faint of heart.<br>While it's possibly the strongest available generating flower within the botanist's toolbelt, it's also one of the less straightforward to put to work.
|
||||
botania.page.dandelifeon1=This flower makes use of a cellular automata known as &4Conway's Game of Life&0. The area for this procedure is a 25x25 square centered around the &1Dandelifeon&0 itself.<br>While the flower has a redstone signal, twice every second it'll step the game once.
|
||||
botania.page.dandelifeon2=The game is executed with the concept of &4Cells&0. The 25x25 area can be seen as a grid of 25 by 25 cells<br>Cells may be live or dead, live if the block in that position is a &1Cellular Block&0 (read on) or dead if it's anything else. &4Neighbours&0 are the eight blocks in the same plane around any one cell.
|
||||
@@ -2453,7 +2454,7 @@ botania.page.dandelifeon3=Every step of the game, the following transitions migh
|
||||
botania.page.dandelifeon4=All of the transitions happen at the same time.<br>Aside from those, a few aditional rules not present in a typical simulation of &4Conway's Game of Life&0 are also present in the &1Dadelifeon&0 procedures, listed in the following pages.
|
||||
botania.page.dandelifeon5=All cells have an age, starting at zero. Whenever a cell lives on, by having two or three neighbours, its age inreases by one. Whenever a dead cell becomes a live cell, the age of the new live cell is equal to the age of the oldest neighbour, plus one. Any cells older than sixty generations will die during the next step.
|
||||
botania.page.dandelifeon6=Second off, the 3x3 zone centered around the &1Dandelifeon&0 itself is not habitable by cells. Any live cells that would exist in that area are turned into &4Mana&0 instead. The older the cell that would be created, the more &4Mana&0 it makes. Age zero cells produce no &4Mana&0.
|
||||
botania.page.dandelifeon10=The 7x7 zone centered around the &1Dandelifeon&0, excluding the 3x3 zone mentioned in the previous page can also not be habited by Age zero cells.<br>A few other restrictions apply to cells, having two different &1Dandelifeon&0 flowers affect the same cell will kill it. Lastly, any cell will die if moved by any other means than the &1Dandelifeon&0 itself.
|
||||
botania.page.dandelifeon10=Whenever any live cells are absorbed by the 3x3 zone in the center, all other cells in the board die.<br>A few other restrictions apply to cells, such as having two different &1Dandelifeon&0 flowers affect the same cell will kill it. Lastly, any cell will die if moved by any other means than the &1Dandelifeon&0 itself.
|
||||
botania.page.dandelifeon7=&1Cellular Blocks&0 are crafted with &1Cactus&0, &1Carrots&0 and &1Potatoes&0, and are extremely fragile, they may not be picked once placed down or moved by &1Pistons&0 and may not be created (through having 3 live neighbours on a dead cell) on any block that isn't air.<br>If not within the range of a &1Dandelifeon&0 they work as normal building blocks.
|
||||
botania.page.dandelifeon8=&oCellCraft^2&r.
|
||||
botania.page.dandelifeon9=Creating &1Cellular Blocks&0
|
||||
|
||||
Reference in new issue
Block a user