diff --git a/src/main/java/vazkii/botania/common/block/BlockCell.java b/src/main/java/vazkii/botania/common/block/BlockCell.java index 555f6c912..d09ad8f94 100644 --- a/src/main/java/vazkii/botania/common/block/BlockCell.java +++ b/src/main/java/vazkii/botania/common/block/BlockCell.java @@ -13,17 +13,22 @@ package vazkii.botania.common.block; import java.util.ArrayList; import net.minecraft.block.material.Material; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import vazkii.botania.api.lexicon.ILexiconable; +import vazkii.botania.api.lexicon.LexiconEntry; import vazkii.botania.common.block.tile.TileCell; +import vazkii.botania.common.lexicon.LexiconData; import vazkii.botania.common.lib.LibBlockNames; -public class BlockCell extends BlockModContainer { +public class BlockCell extends BlockModContainer implements ILexiconable { public BlockCell() { super(Material.gourd); setBlockName(LibBlockNames.CELL_BLOCK); + setStepSound(soundTypeCloth); } @Override @@ -36,4 +41,9 @@ public class BlockCell extends BlockModContainer { return new TileCell(); } + @Override + public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) { + return LexiconData.dandelifeon; + } + } diff --git a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileDandelifeon.java b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileDandelifeon.java index 335dd4903..0fd96c134 100644 --- a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileDandelifeon.java +++ b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileDandelifeon.java @@ -16,10 +16,13 @@ import java.util.List; import net.minecraft.block.Block; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import vazkii.botania.api.lexicon.LexiconEntry; import vazkii.botania.api.subtile.RadiusDescriptor; import vazkii.botania.api.subtile.SubTileGenerating; import vazkii.botania.common.block.ModBlocks; import vazkii.botania.common.block.tile.TileCell; +import vazkii.botania.common.lexicon.LexiconData; +import vazkii.botania.common.lib.LibLexicon; public class SubTileDandelifeon extends SubTileGenerating { @@ -185,5 +188,10 @@ public class SubTileDandelifeon extends SubTileGenerating { public int getColor() { return 0x9c0a7e; } + + @Override + public LexiconEntry getEntry() { + return LexiconData.dandelifeon; + } } diff --git a/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java b/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java index b67f20901..18b844d4e 100644 --- a/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java +++ b/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java @@ -291,6 +291,7 @@ public final class ModCraftingRecipes { public static IRecipe recipeBifrost; public static IRecipe recipeAutocraftingHalo; public static List recipesPavement; + public static IRecipe recipeCellBlock; // Garden of Glass public static IRecipe recipeRootToSapling; @@ -1982,6 +1983,12 @@ public final class ModCraftingRecipes { addShapelessOreDictRecipe(new ItemStack(ModFluffBlocks.pavement, 3, 3), LibOreDict.LIVING_ROCK, "cobblestone", "gravel", new ItemStack(Items.redstone)); recipesPavement = BotaniaAPI.getLatestAddedRecipes(4); + // Cellular Block Recipe + GameRegistry.addRecipe(new ItemStack(ModBlocks.cellBlock, 3), + "CC", "CC", + 'C', new ItemStack(Blocks.cactus)); + recipeCellBlock = BotaniaAPI.getLatestAddedRecipe(); + /////////////////////////////////////////////////////////////////////////////////////////////////////////// // Storage Block/Nugget Recipes diff --git a/src/main/java/vazkii/botania/common/crafting/ModPetalRecipes.java b/src/main/java/vazkii/botania/common/crafting/ModPetalRecipes.java index 2b8a8c5fa..0009918a2 100644 --- a/src/main/java/vazkii/botania/common/crafting/ModPetalRecipes.java +++ b/src/main/java/vazkii/botania/common/crafting/ModPetalRecipes.java @@ -30,6 +30,7 @@ public final class ModPetalRecipes { public static final String runeWater = LibOreDict.RUNE[0], runeFire = LibOreDict.RUNE[1], runeEarth = LibOreDict.RUNE[2], runeAir = LibOreDict.RUNE[3], runeSpring = LibOreDict.RUNE[4], runeSummer = LibOreDict.RUNE[5], runeAutumn = LibOreDict.RUNE[6], runeWinter = LibOreDict.RUNE[7], runeMana = LibOreDict.RUNE[8], runeLust = LibOreDict.RUNE[9], runeGluttony = LibOreDict.RUNE[10], runeGreed = LibOreDict.RUNE[11], runeSloth = LibOreDict.RUNE[12], runeWrath = LibOreDict.RUNE[13], runeEnvy = LibOreDict.RUNE[14], runePride = LibOreDict.RUNE[15]; public static final String redstoneRoot = LibOreDict.REDSTONE_ROOT; public static final String pixieDust = LibOreDict.PIXIE_DUST; + public static final String gaiaSpirit = LibOreDict.LIFE_ESSENCE; public static RecipePetals pureDaisyRecipe; public static RecipePetals manastarRecipe; @@ -46,6 +47,7 @@ public final class ModPetalRecipes { public static RecipePetals gourmaryllisRecipe; public static RecipePetals narslimmusRecipe; public static RecipePetals spectrolusRecipe; + public static RecipePetals dandelifeonRecipe; public static RecipePetals jadedAmaranthusRecipe; public static RecipePetals bellethorneRecipe; @@ -89,7 +91,8 @@ public final class ModPetalRecipes { gourmaryllisRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_GOURMARYLLIS), lightGray, lightGrayMana, yellowMana, yellow, yellowMana, red, runeFire, runeSummer); narslimmusRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_NARSLIMMUS), lime, limeMana, green, greenMana, black, runeSummer, runeWater); spectrolusRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_SPECTROLUS), redMana, orangeMana, yellowMana, greenMana, blueMana, cyanMana, purpleMana, white, runeWinter, runeAir, pixieDust); - + dandelifeonRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_DANDELIFEON), purpleMana, purpleMana, limeMana, greenMana, runeWater, runeFire, runeEarth, runeAir, gaiaSpirit); + jadedAmaranthusRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_JADED_AMARANTHUS), purpleMana, purpleMana, lime, purple, green, runeSpring, redstoneRoot); bellethorneRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_BELLETHORN), redMana, redMana, cyan, cyan, red, redstoneRoot); dreadthorneRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_DREADTHORN), blackMana, purpleMana, cyan, cyan, black, purple, redstoneRoot); diff --git a/src/main/java/vazkii/botania/common/item/material/ItemManaResource.java b/src/main/java/vazkii/botania/common/item/material/ItemManaResource.java index c262ae675..a67ba651f 100644 --- a/src/main/java/vazkii/botania/common/item/material/ItemManaResource.java +++ b/src/main/java/vazkii/botania/common/item/material/ItemManaResource.java @@ -164,7 +164,7 @@ public class ItemManaResource extends ItemMod implements IFlowerComponent, IElve @Override public boolean canFit(ItemStack stack, IInventory apothecary) { int meta = stack.getItemDamage(); - return meta == 6 || meta == 8; + return meta == 6 || meta == 8 || meta == 5; } @Override diff --git a/src/main/java/vazkii/botania/common/lexicon/LexiconData.java b/src/main/java/vazkii/botania/common/lexicon/LexiconData.java index c7b90b6aa..8033bc3b5 100644 --- a/src/main/java/vazkii/botania/common/lexicon/LexiconData.java +++ b/src/main/java/vazkii/botania/common/lexicon/LexiconData.java @@ -136,6 +136,7 @@ public final class LexiconData { public static LexiconEntry gourmaryllis; public static LexiconEntry narslimmus; public static LexiconEntry spectrolus; + public static LexiconEntry dandelifeon; public static LexiconEntry pylon; public static LexiconEntry manaEnchanting; @@ -564,6 +565,9 @@ public final class LexiconData { spectrolus = new ALexiconEntry(LibLexicon.GFLOWER_SPECTROLUS, categoryGenerationFlowers); 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("7"), new PagePetalRecipe("8", ModPetalRecipes.dandelifeonRecipe), new PageCraftingRecipe("9", ModCraftingRecipes.recipeCellBlock)); + // DEVICES ENTRIES pylon = new BLexiconEntry(LibLexicon.DEVICE_PYLON, categoryDevices); pylon.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCraftingRecipes.recipePylon)); diff --git a/src/main/java/vazkii/botania/common/lib/LibLexicon.java b/src/main/java/vazkii/botania/common/lib/LibLexicon.java index 858bcba3a..3cf605a43 100644 --- a/src/main/java/vazkii/botania/common/lib/LibLexicon.java +++ b/src/main/java/vazkii/botania/common/lib/LibLexicon.java @@ -104,6 +104,7 @@ public final class LibLexicon { public static final String GFLOWER_GOURMARYLLIS = "gourmaryllis"; public static final String GFLOWER_NARSLIMMUS = "narslimmus"; public static final String GFLOWER_SPECTROLUS = "spectrolus"; + public static final String GFLOWER_DANDELIFEON = "dandelifeon"; public static final String DEVICE_PYLON = "pylon"; public static final String DEVICE_MANA_ENCHANTING = "manaEnchanting"; diff --git a/src/main/resources/assets/botania/lang/en_US.lang b/src/main/resources/assets/botania/lang/en_US.lang index 5ad47b1e4..2c4db1ef1 100644 --- a/src/main/resources/assets/botania/lang/en_US.lang +++ b/src/main/resources/assets/botania/lang/en_US.lang @@ -2323,6 +2323,19 @@ botania.page.spectrolus0=The &1Spectrolus&0 is a flower that's particularly fond botania.page.spectrolus1=While it consumes all &1Wool&0 around, it'll only create any mana if its of the color it wants, so haphazardly tossing &1Wool&0 at it is a wasteful strategy.
The color it'll absorb properly next can be seen by hovering over the flower with a &1Wand of the Forest&0. botania.page.spectrolus2=&oTaste the Rainbow&r. +# -- DANDELIFEON +botania.entry.dandelifeon=Dandelifeon +botania.page.dandelifeon0=The &1Dandelifeon&0 is a flower not recommended for those faint of heart.
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.
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 cells 25 by 25 cells
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. +botania.page.dandelifeon3=Every step of the game, the following transitions might happen: &41)&0 Any live cell with fewer than two or more than three live neighbours dies. &42)&0 Any live cell with exactly two or three live neigbours lives on. &43)&0 Any dead cell with exactly three live neigbours becomes a live cell. +botania.page.dandelifeon4=All of the transitions happen at the same time.
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.dandelifeon7=&1Cellular Blocks&0 are crafted with &1Cactus&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.
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 + # - MAGICAL APPARATUS # -- MANA PYLON botania.entry.pylon=Mana Pylon