Leaf Generator booklet entry, crafting and localization

This commit is contained in:
Ellpeck 2015-10-01 12:11:38 +02:00
parent df720bb569
commit a7e63fc174
6 changed files with 28 additions and 4 deletions

View file

@ -91,6 +91,7 @@ public class InitBooklet{
new BookletChapter("solarPanel", entryGeneratingRF, new ItemStack(InitBlocks.blockFurnaceSolar), new PageTextOnly(1).addTextReplacement("<rf>", ConfigIntValues.FURNACE_SOLAR_ENERGY_PRODUCED.getValue()), new PageCrafting(2, BlockCrafting.recipeSolar).setNoText());
new BookletChapter("heatCollector", entryGeneratingRF, new ItemStack(InitBlocks.blockHeatCollector), new PageTextOnly(1).addTextReplacement("<rf>", ConfigIntValues.HEAT_COLLECTOR_ENERGY_PRODUCED.getValue()).addTextReplacement("<min>", ConfigIntValues.HEAT_COLLECTOR_BLOCKS.getValue()), new PageCrafting(2, BlockCrafting.recipeHeatCollector).setNoText());
new BookletChapter("canola", entryGeneratingRF, new ItemStack(InitBlocks.blockFermentingBarrel), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal())).addTextReplacement("<pressRF>", ConfigIntValues.PRESS_ENERGY_USED.getValue()).addTextReplacement("<canola>", ConfigIntValues.PRESS_MB_PRODUCED.getValue()).addTextReplacement("<rf>", ConfigIntValues.OIL_GEN_ENERGY_PRODUCED.getValue()), new PageCrafting(2, BlockCrafting.recipeCanolaPress).setNoText(), new PageCrafting(3, BlockCrafting.recipeFermentingBarrel).setNoText(), new PageCrafting(4, BlockCrafting.recipeOilGen).setNoText());
new BookletChapter("leafGen", entryGeneratingRF, new ItemStack(InitBlocks.blockLeafGenerator), new PageTextOnly(1).addTextReplacement("<rf>", ConfigIntValues.LEAF_GENERATOR_ENERGY_PRODUCED.getValue()), new PageCrafting(2, BlockCrafting.recipeLeafGen));
//No RF Using Items
new BookletChapter("wings", entryItemsNonRF, new ItemStack(InitItems.itemWingsOfTheBats), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BAT_WING.ordinal())), new PageCrafting(2, ItemCrafting.recipeWings).setNoText());

View file

@ -89,6 +89,7 @@ public enum ConfigCrafting{
CANOLA_PRESS("Canola Press", ConfigCategories.BLOCKS_CRAFTING),
FERMENTING_BARREL("Fermenting Barrel", ConfigCategories.BLOCKS_CRAFTING),
COAL_GENERATOR("Coal Generator", ConfigCategories.BLOCKS_CRAFTING),
LEAF_GENERATOR("Leaf Generator", ConfigCategories.BLOCKS_CRAFTING),
OIL_GENERATOR("Oil Generator", ConfigCategories.BLOCKS_CRAFTING),
PHANTOMFACE("Phantomface", ConfigCategories.BLOCKS_CRAFTING),
PHANTOM_CONNECTOR("Phantom Connector", ConfigCategories.ITEMS_CRAFTING),

View file

@ -160,7 +160,11 @@ public enum ConfigIntValues{
ORE_MAGNET_MAX_TIMER("Ore Magnet: Max Timer", ConfigCategories.MACHINE_VALUES, 20, 1, 2000, "The approximate Time it takes for the Ore Magnet to search for a new block to mine"),
ORE_MAGNET_RANGE("Ore Magnet: Range", ConfigCategories.MACHINE_VALUES, 10, 1, 60, "The range of the Ore Magnet"),
ORE_MAGNET_OIL_USE("Ore Magnet: Oil Use", ConfigCategories.MACHINE_VALUES, 30, 0, 5000, "The amount of oil the Ore Magnet uses every Block"),
ORE_MAGNET_ENERGY_USE("Ore Magnet: Energy USe", ConfigCategories.MACHINE_VALUES, 250, 10, 10000, "The amount of Energy the Ore Magnet uses every tick");
ORE_MAGNET_ENERGY_USE("Ore Magnet: Energy USe", ConfigCategories.MACHINE_VALUES, 250, 10, 10000, "The amount of Energy the Ore Magnet uses every tick"),
LEAF_GENERATOR_ENERGY_PRODUCED("Leaf Generator: Energy Produce", ConfigCategories.MACHINE_VALUES, 20, 1, 10000, "How much Energy the Leaf Generator produces per Leaf broken"),
LEAF_GENERATOR_COOLDOWN_TIME("Leaf Generator: Cooldown Time", ConfigCategories.MACHINE_VALUES, 5, 0, 100, "The amount of ticks that it takes util another Leaf gets proken"),
LEAF_GENERATOR_RANGE("Leaf Generator: Range", ConfigCategories.MACHINE_VALUES, 5, 1, 100, "The radius of a leaf generator");
public final String name;
public final String category;

View file

@ -73,6 +73,7 @@ public class BlockCrafting{
public static IRecipe recipeCanolaPress;
public static IRecipe[] recipesLamps = new IRecipe[BlockColoredLamp.allLampTypes.length];
public static IRecipe recipePowerer;
public static IRecipe recipeLeafGen;
public static void init(){
@ -308,6 +309,18 @@ public class BlockCrafting{
recipeCoalGen = Util.lastIRecipe();
}
//Leaf Generator
if(ConfigCrafting.LEAF_GENERATOR.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLeafGenerator),
"IEI", "GLG", "ICI",
'I', "ingotIron",
'G', "ingotGold",
'E', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
'L', "treeLeaves",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeLeafGen = Util.lastIRecipe();
}
//Enderpearl Block
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()),
"EE", "EE",

View file

@ -12,6 +12,7 @@ package ellpeck.actuallyadditions.tile;
import cofh.api.energy.EnergyStorage;
import cofh.api.energy.IEnergyProvider;
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
import ellpeck.actuallyadditions.util.WorldPos;
import ellpeck.actuallyadditions.util.WorldUtil;
import net.minecraft.block.Block;
@ -32,14 +33,14 @@ public class TileEntityLeafGenerator extends TileEntityBase implements IEnergyPr
public void updateEntity(){
if(!worldObj.isRemote){
if(this.nextUseCounter >= 5){ //TODO Config
if(this.nextUseCounter >= ConfigIntValues.LEAF_GENERATOR_COOLDOWN_TIME.getValue()){
this.nextUseCounter = 0;
int energyProducedPerLeaf = 20; //TODO Config
int energyProducedPerLeaf = ConfigIntValues.LEAF_GENERATOR_ENERGY_PRODUCED.getValue();
if(energyProducedPerLeaf <= this.storage.getMaxEnergyStored()-this.storage.getEnergyStored()){
ArrayList<WorldPos> breakPositions = new ArrayList<WorldPos>();
int range = 5; //TODO Config
int range = ConfigIntValues.LEAF_GENERATOR_RANGE.getValue();
for(int reachX = -range; reachX < range+1; reachX++){
for(int reachZ = -range; reachZ < range+1; reachZ++){
for(int reachY = -range; reachY < range+1; reachY++){

View file

@ -88,6 +88,7 @@ tile.actuallyadditions.blockFlax.name=Flax Plant
tile.actuallyadditions.blockCoffeeMachine.name=Coffee Machine
tile.actuallyadditions.blockXPSolidifier.name=Experience Solidifier
tile.actuallyadditions.blockSmileyCloud.name=Smiley Cloud
tile.actuallyadditions.blockLeafGenerator.name=Leaf-Eating Generator
#ESD
tile.actuallyadditions.blockInputter.name=ESD
@ -527,3 +528,6 @@ booklet.actuallyadditions.chapter.waterRemovalRing.text.1=The <item>Ring Of Liqu
booklet.actuallyadditions.chapter.batteries.name=Batteries
booklet.actuallyadditions.chapter.batteries.text.1=<item>Batteries<r> are a good way to store RF to move around. They can be <imp>charged in an Energizer<r> and <imp>discharged in an Enervator<r>.
booklet.actuallyadditions.chapter.leafGen.name=Leaf-Eating Generator
booklet.actuallyadditions.chapter.leafGen.text.1=The <item>Leaf Generator<r> can generate <imp>RF<r> just by being placed alongside some <item>Leaves<r>. <n>It will destroy the leaves, generating <imp><rf> RF per leaf broken<r> in the process. <n>By right-clicking the generator, you can see how much RF it has stored.
booklet.actuallyadditions.chapter.leafGen.text.2=<i>Munchy