mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-22 11:29:23 +01:00
Empowerer and empowered crystals doc
This commit is contained in:
parent
43a259886a
commit
643f1a696f
11 changed files with 197 additions and 2 deletions
|
@ -60,6 +60,7 @@ import java.util.List;
|
|||
public class GuiBooklet extends GuiScreen implements IBookletGui{
|
||||
|
||||
public static final ResourceLocation RES_LOC = AssetUtil.getBookletGuiLocation("guiBooklet");
|
||||
public static final ResourceLocation RES_LOC_ADDON = AssetUtil.getBookletGuiLocation("guiBookletAddon");
|
||||
public static final ResourceLocation RES_LOC_HALLOWEEN = AssetUtil.getBookletGuiLocation("guiBookletHalloween");
|
||||
public static final ResourceLocation RES_LOC_CHRISTMAS = AssetUtil.getBookletGuiLocation("guiBookletChristmas");
|
||||
public static final ResourceLocation RES_LOC_VALENTINE = AssetUtil.getBookletGuiLocation("guiBookletValentinesDay");
|
||||
|
|
|
@ -28,6 +28,7 @@ import de.ellpeck.actuallyadditions.mod.items.lens.LensDisenchanting;
|
|||
import de.ellpeck.actuallyadditions.mod.items.lens.LensRecipeHandler;
|
||||
import de.ellpeck.actuallyadditions.mod.items.metalists.TheFoods;
|
||||
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
|
||||
import de.ellpeck.actuallyadditions.mod.recipe.EmpowererHandler;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.*;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Util;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
@ -70,6 +71,12 @@ public final class InitBooklet{
|
|||
}
|
||||
new BookletChapter("crystals", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitBlocks.blockAtomicReconstructor), crystalPages.toArray(new BookletPage[crystalPages.size()])).setSpecial();
|
||||
new BookletChapter("coalGen", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitBlocks.blockCoalGenerator), new PageCrafting(1, BlockCrafting.recipeCoalGen).addTextReplacement("<rf>", TileEntityCoalGenerator.PRODUCE).setPageStacksWildcard());
|
||||
ArrayList<BookletPage> empowererPages = new ArrayList<BookletPage>();
|
||||
empowererPages.addAll(Arrays.asList(new PageTextOnly(1), new PagePicture(2, "pageEmpowerer", 137), new PageCrafting(3, BlockCrafting.recipeEmpowerer).setNoText(), new PageCrafting(4, BlockCrafting.recipeDisplayStand), new PageCrafting(5, MiscCrafting.RECIPES_EMPOWERED_CRYSTALS).setNoText(), new PageCrafting(6, MiscCrafting.RECIPES_EMPOWERED_CRYSTAL_BLOCKS).setNoText()));
|
||||
for(int i = 0; i < EmpowererHandler.MAIN_PAGE_RECIPES.size(); i++){
|
||||
empowererPages.add(new PageEmpowerer(7+i, EmpowererHandler.MAIN_PAGE_RECIPES.get(i)).setNoText());
|
||||
}
|
||||
new BookletChapter("empowerer", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitBlocks.blockEmpowerer), empowererPages.toArray(new BookletPage[empowererPages.size()])).setSpecial();
|
||||
new BookletChapter("craftingIngs", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeCoil).setNoText(), new PageCrafting(3, ItemCrafting.recipeCoilAdvanced).setNoText(), new PageCrafting(4, BlockCrafting.recipeCase).setNoText(), new PageCrafting(5, BlockCrafting.recipeEnderPearlBlock).setNoText(), new PageCrafting(6, BlockCrafting.recipeEnderCase).setNoText(), new PageCrafting(7, ItemCrafting.recipeRing).setNoText(), new PageCrafting(8, ItemCrafting.recipeKnifeHandle).setNoText(), new PageCrafting(9, ItemCrafting.recipeKnifeBlade).setNoText(), new PageCrafting(10, ItemCrafting.recipeKnife).setNoText(), new PageCrafting(11, ItemCrafting.recipeDough).setNoText(), new PageCrafting(12, ItemCrafting.recipeRiceDough).setNoText(), new PageCrafting(13, BlockCrafting.recipeIronCase).setNoText(), new PageCrafting(14, ItemCrafting.recipeLens).setNoText()).setImportant();
|
||||
new BookletChapter("rf", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(Items.REDSTONE), new PageTextOnly(1));
|
||||
|
||||
|
|
|
@ -0,0 +1,154 @@
|
|||
/*
|
||||
* This file ("PageEmpowerer.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2016 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.booklet.page;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.internal.IBookletGui;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.EmpowererRecipe;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.LensConversionRecipe;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.GuiBooklet;
|
||||
import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy;
|
||||
import de.ellpeck.actuallyadditions.mod.util.*;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class PageEmpowerer extends BookletPageAA{
|
||||
|
||||
private final EmpowererRecipe[] recipes;
|
||||
private int recipePos;
|
||||
|
||||
public PageEmpowerer(int id, ArrayList<EmpowererRecipe> recipes){
|
||||
this(id, recipes.toArray(new EmpowererRecipe[recipes.size()]));
|
||||
}
|
||||
|
||||
public PageEmpowerer(int id, EmpowererRecipe... recipes){
|
||||
super(id);
|
||||
this.recipes = recipes;
|
||||
this.addToPagesWithItemStackData();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderPre(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){
|
||||
if(this.recipes[this.recipePos] != null){
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(GuiBooklet.RES_LOC_ADDON);
|
||||
gui.drawRect(gui.getGuiLeft()+22, gui.getGuiTop()+20, 0, 0, 94, 58);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void render(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){
|
||||
EmpowererRecipe recipe = this.recipes[this.recipePos];
|
||||
if(recipe == null){
|
||||
StringUtil.drawSplitString(Minecraft.getMinecraft().fontRendererObj, TextFormatting.DARK_RED+StringUtil.localize("booklet."+ModUtil.MOD_ID+".recipeDisabled"), gui.getGuiLeft()+14, gui.getGuiTop()+15, 115, 0, false);
|
||||
}
|
||||
else{
|
||||
String strg = "Empowerer";
|
||||
Minecraft.getMinecraft().fontRendererObj.drawString(strg, gui.getGuiLeft()+gui.getXSize()/2-Minecraft.getMinecraft().fontRendererObj.getStringWidth(strg)/2, gui.getGuiTop()+10, 0);
|
||||
}
|
||||
|
||||
String text = gui.getCurrentEntrySet().getCurrentPage().getText();
|
||||
if(text != null && !text.isEmpty()){
|
||||
StringUtil.drawSplitString(Minecraft.getMinecraft().fontRendererObj, text, gui.getGuiLeft()+14, gui.getGuiTop()+100, 115, 0, false);
|
||||
}
|
||||
|
||||
if(recipe != null){
|
||||
for(int i = 0; i < 2; i++){
|
||||
for(int count = 0; count < 6; count++){
|
||||
ItemStack stack;
|
||||
int x;
|
||||
int y;
|
||||
switch(count){
|
||||
case 0:
|
||||
stack = recipe.input;
|
||||
x =21;
|
||||
y = 21;
|
||||
break;
|
||||
case 1:
|
||||
stack = recipe.modifier1;
|
||||
x = 21;
|
||||
y = 1;
|
||||
break;
|
||||
case 2:
|
||||
stack = recipe.modifier2;
|
||||
x = 41;
|
||||
y = 21;
|
||||
break;
|
||||
case 3:
|
||||
stack = recipe.modifier3;
|
||||
x = 21;
|
||||
y = 41;
|
||||
break;
|
||||
case 4:
|
||||
stack = recipe.modifier4;
|
||||
x = 1;
|
||||
y = 21;
|
||||
break;
|
||||
default:
|
||||
stack = recipe.output;
|
||||
x = 77;
|
||||
y = 21;
|
||||
break;
|
||||
}
|
||||
|
||||
if(stack.getItemDamage() == Util.WILDCARD){
|
||||
stack.setItemDamage(0);
|
||||
}
|
||||
|
||||
int xShow = gui.getGuiLeft()+22+x;
|
||||
int yShow = gui.getGuiTop()+20+y;
|
||||
if(i != 1){
|
||||
AssetUtil.renderStackToGui(stack, xShow, yShow, 1.0F);
|
||||
}
|
||||
else{
|
||||
if(mouseX >= xShow && mouseX <= xShow+16 && mouseY >= yShow && mouseY <= yShow+16){
|
||||
gui.renderTooltipAndTransferButton(this, stack, mouseX, mouseY, x != 5, mousePressed);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void updateScreen(int ticksElapsed){
|
||||
if(ticksElapsed%15 == 0){
|
||||
if(this.recipePos+1 >= this.recipes.length){
|
||||
this.recipePos = 0;
|
||||
}
|
||||
else{
|
||||
this.recipePos++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack[] getItemStacksForPage(){
|
||||
if(this.recipes != null){
|
||||
ArrayList<ItemStack> stacks = new ArrayList<ItemStack>();
|
||||
for(EmpowererRecipe recipe : this.recipes){
|
||||
if(recipe != null){
|
||||
stacks.add(recipe.output);
|
||||
}
|
||||
}
|
||||
return stacks.toArray(new ItemStack[stacks.size()]);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -172,7 +172,8 @@ public enum ConfigCrafting{
|
|||
TINY_COAL("Tiny Coal", ConfigCategories.ITEMS_CRAFTING),
|
||||
|
||||
BAG("Bag", ConfigCategories.ITEMS_CRAFTING),
|
||||
VOID_BAG("Void Bag", ConfigCategories.ITEMS_CRAFTING);
|
||||
VOID_BAG("Void Bag", ConfigCategories.ITEMS_CRAFTING),
|
||||
EMPOWERER("Empowerer", ConfigCategories.BLOCKS_CRAFTING);
|
||||
|
||||
public final String name;
|
||||
public final String category;
|
||||
|
|
|
@ -93,10 +93,22 @@ public final class BlockCrafting{
|
|||
public static IRecipe recipePlayerInterface;
|
||||
public static IRecipe recipeDisplayStand;
|
||||
public static IRecipe recipeShockSuppressor;
|
||||
public static IRecipe recipeEmpowerer;
|
||||
public static IRecipe[] recipesTinyTorch = new IRecipe[2];
|
||||
|
||||
public static void init(){
|
||||
|
||||
//Empowerer
|
||||
if(ConfigCrafting.EMPOWERER.isEnabled()){
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockEmpowerer),
|
||||
" R ", " B ", "CDC",
|
||||
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
|
||||
'B', new ItemStack(InitItems.itemBatteryDouble, 1, Util.WILDCARD),
|
||||
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
|
||||
'D', new ItemStack(InitBlocks.blockDisplayStand)));
|
||||
recipeEmpowerer = RecipeUtil.lastIRecipe();
|
||||
}
|
||||
|
||||
//Tiny Torch
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockTinyTorch, 2),
|
||||
"C",
|
||||
|
|
|
@ -11,20 +11,29 @@
|
|||
package de.ellpeck.actuallyadditions.mod.recipe;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.EmpowererRecipe;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.LensConversionRecipe;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.items.InitItems;
|
||||
import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals;
|
||||
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
|
||||
import de.ellpeck.actuallyadditions.mod.util.RecipeUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public final class EmpowererHandler{
|
||||
|
||||
public static final ArrayList<EmpowererRecipe> MAIN_PAGE_RECIPES = new ArrayList<EmpowererRecipe>();
|
||||
|
||||
public static void init(){
|
||||
ItemStack m = new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal());
|
||||
for(int i = 0; i < TheCrystals.values().length; i++){
|
||||
float[] color = TheCrystals.values()[i].conversionColorParticles;
|
||||
ActuallyAdditionsAPI.addEmpowererRecipe(new ItemStack(InitItems.itemCrystal, 1, i), new ItemStack(InitItems.itemCrystalEmpowered, 1, i), m, m, m, m, 50000, 200, color);
|
||||
MAIN_PAGE_RECIPES.add(RecipeUtil.lastEmpowererRecipe());
|
||||
ActuallyAdditionsAPI.addEmpowererRecipe(new ItemStack(InitBlocks.blockCrystal, 1, i), new ItemStack(InitBlocks.blockCrystalEmpowered, 1, i), m, m, m, m, 500000, 2000, color);
|
||||
MAIN_PAGE_RECIPES.add(RecipeUtil.lastEmpowererRecipe());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ import de.ellpeck.actuallyadditions.api.lens.LensConversion;
|
|||
import de.ellpeck.actuallyadditions.api.recipe.CrusherRecipe;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.EmpowererRecipe;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.LensConversionRecipe;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
|
@ -42,6 +43,11 @@ public final class RecipeUtil{
|
|||
return recipe instanceof IRecipe ? (IRecipe)recipe : null;
|
||||
}
|
||||
|
||||
public static EmpowererRecipe lastEmpowererRecipe(){
|
||||
List<EmpowererRecipe> list = ActuallyAdditionsAPI.EMPOWERER_RECIPES;
|
||||
return list.get(list.size()-1);
|
||||
}
|
||||
|
||||
public static List<ItemStack> getCrusherRecipeOutputOnes(CrusherRecipe recipe){
|
||||
return doRecipeOrWhatever(recipe.outputOneStack, recipe.outputOne, recipe.outputOneAmount);
|
||||
}
|
||||
|
|
|
@ -981,4 +981,9 @@ booklet.actuallyadditions.chapter.worms.text.1=The <item>Worms<r> are a pretty u
|
|||
booklet.actuallyadditions.chapter.worms.text.2=<i>A worm at work
|
||||
|
||||
booklet.actuallyadditions.chapter.bags.name=Bag and Void Bag
|
||||
booklet.actuallyadditions.chapter.bags.text.1=<item>Bags<r> are an easy way to <imp>transport items around<r>, however, they have some additional functions. <n>First of all, in their GUI that is accessed by <imp>right-clicking<r>, they can be set to automatically <imp>suck up items on the ground<r>. Also, they have a couple of <imp>filter slots<r> where you can configure what can actually go into the bags. <n><n><item>Void Bags<r> have the same functionality as normal bags, however, they <imp>remove items<r> from the world instead of storing them.
|
||||
booklet.actuallyadditions.chapter.bags.text.1=<item>Bags<r> are an easy way to <imp>transport items around<r>, however, they have some additional functions. <n>First of all, in their GUI that is accessed by <imp>right-clicking<r>, they can be set to automatically <imp>suck up items on the ground<r>. Also, they have a couple of <imp>filter slots<r> where you can configure what can actually go into the bags. <n><n><item>Void Bags<r> have the same functionality as normal bags, however, they <imp>remove items<r> from the world instead of storing them.
|
||||
|
||||
booklet.actuallyadditions.chapter.empowerer.name=Empowerer
|
||||
booklet.actuallyadditions.chapter.empowerer.text.1=The <item>Empowerer<r> is a mid-tier block that can be used to <imp>empower<r> crystals and other items. <n>To use it, items that should be empowered can be <imp>right-clicked onto the Empowerer<r>, and empowering items need to be placed on <item>Display Stands<r> that are <imp>two blocks away<r>, like seen in the <imp>picture on the next page<r>. <n>To then activate the process, <imp>every Display Stand needs to be powered with a lot of RF<r> that is then drained to empower the item on the Empowerer.
|
||||
booklet.actuallyadditions.chapter.empowerer.text.2=<i>The placement of the <item>Display Stands<r>
|
||||
booklet.actuallyadditions.chapter.empowerer.text.4=The <item>Display Stand<r> can also be used for other things! See the <imp>Blocks that use RF<r> section for more info about it!
|
Binary file not shown.
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 16 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
Loading…
Reference in a new issue