mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +01:00
Fixed & Changed Reconstructor Recipe Handler a bit, restructured Reconstructor's main booklet page
This commit is contained in:
parent
f24f398656
commit
2e312db996
7 changed files with 100 additions and 55 deletions
|
@ -26,8 +26,8 @@ import ellpeck.actuallyadditions.items.InitItems;
|
||||||
import ellpeck.actuallyadditions.items.metalists.TheFoods;
|
import ellpeck.actuallyadditions.items.metalists.TheFoods;
|
||||||
import ellpeck.actuallyadditions.items.metalists.TheMiscItems;
|
import ellpeck.actuallyadditions.items.metalists.TheMiscItems;
|
||||||
import ellpeck.actuallyadditions.items.metalists.TheSpecialDrops;
|
import ellpeck.actuallyadditions.items.metalists.TheSpecialDrops;
|
||||||
|
import ellpeck.actuallyadditions.recipe.ReconstructorRecipeHandler;
|
||||||
import ellpeck.actuallyadditions.util.Util;
|
import ellpeck.actuallyadditions.util.Util;
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.crafting.IRecipe;
|
import net.minecraft.item.crafting.IRecipe;
|
||||||
|
|
||||||
|
@ -56,12 +56,12 @@ public class InitBooklet{
|
||||||
//Getting Started
|
//Getting Started
|
||||||
chapterIntro = new BookletChapter("intro", entryGettingStarted, new ItemStack(InitItems.itemLexicon), new PageTextOnly(1), new PageTextOnly(2), new PageTextOnly(3));
|
chapterIntro = new BookletChapter("intro", entryGettingStarted, new ItemStack(InitItems.itemLexicon), new PageTextOnly(1), new PageTextOnly(2), new PageTextOnly(3));
|
||||||
new BookletChapter("bookTutorial", entryGettingStarted, new ItemStack(InitItems.itemLexicon), new PageTextOnly(1), new PageTextOnly(2), new PageCrafting(3, ItemCrafting.recipeBook));
|
new BookletChapter("bookTutorial", entryGettingStarted, new ItemStack(InitItems.itemLexicon), new PageTextOnly(1), new PageTextOnly(2), new PageCrafting(3, ItemCrafting.recipeBook));
|
||||||
new BookletChapterReconstructor("crystals", entryGettingStarted, new ItemStack(InitBlocks.blockAtomicReconstructor), new PageTextOnly(1).addTextReplacement("<rf>", ConfigIntValues.RECONSTRUCTOR_BASE_ENERGY_USE.getValue()), new PageTextOnly(2), new PagePicture(3, "pageAtomicReconstructor", 0).setNoText(), new PageTextOnly(4), new PageCrafting(5, BlockCrafting.recipeAtomicReconstructor).setNoText(), new PageCrafting(6, ItemCrafting.recipeLens).setNoText(), new PageReconstructor(7, new ItemStack(InitItems.itemColorLens)).setNoText()).setSpecial();
|
new BookletChapterReconstructor("crystals", entryGettingStarted, new ItemStack(InitBlocks.blockAtomicReconstructor), new PageTextOnly(1).addTextReplacement("<rf>", ConfigIntValues.RECONSTRUCTOR_BASE_ENERGY_USE.getValue()), new PageTextOnly(2), new PagePicture(3, "pageAtomicReconstructor", 0).setNoText(), new PageTextOnly(4), new PageCrafting(5, BlockCrafting.recipeAtomicReconstructor).setNoText(), new PageCrafting(6, ItemCrafting.recipeLens).setNoText(), new PageReconstructor(7, ReconstructorRecipeHandler.recipeColorLens).setNoText()).setSpecial();
|
||||||
new BookletChapter("coalGen", entryGettingStarted, new ItemStack(InitBlocks.blockCoalGenerator), new PageCrafting(1, BlockCrafting.recipeCoalGen).addTextReplacement("<rf>", ConfigIntValues.COAL_GEN_ENERGY_PRODUCED.getValue()));
|
new BookletChapter("coalGen", entryGettingStarted, new ItemStack(InitBlocks.blockCoalGenerator), new PageCrafting(1, BlockCrafting.recipeCoalGen).addTextReplacement("<rf>", ConfigIntValues.COAL_GEN_ENERGY_PRODUCED.getValue()));
|
||||||
new BookletChapter("craftingIngs", 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.recipeStoneCase).setNoText(), new PageCrafting(6, BlockCrafting.recipeEnderPearlBlock).setNoText(), new PageCrafting(7, BlockCrafting.recipeEnderCase).setNoText(), new PageCrafting(8, ItemCrafting.recipeRing).setNoText(), new PageCrafting(9, ItemCrafting.recipeKnifeHandle).setNoText(), new PageCrafting(10, ItemCrafting.recipeKnifeBlade).setNoText(), new PageCrafting(11, ItemCrafting.recipeKnife).setNoText(), new PageCrafting(12, ItemCrafting.recipeDough).setNoText(), new PageCrafting(13, ItemCrafting.recipeRiceDough).setNoText(), new PageCrafting(14, BlockCrafting.recipeIronCase).setNoText()).setImportant();
|
new BookletChapter("craftingIngs", 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.recipeStoneCase).setNoText(), new PageCrafting(6, BlockCrafting.recipeEnderPearlBlock).setNoText(), new PageCrafting(7, BlockCrafting.recipeEnderCase).setNoText(), new PageCrafting(8, ItemCrafting.recipeRing).setNoText(), new PageCrafting(9, ItemCrafting.recipeKnifeHandle).setNoText(), new PageCrafting(10, ItemCrafting.recipeKnifeBlade).setNoText(), new PageCrafting(11, ItemCrafting.recipeKnife).setNoText(), new PageCrafting(12, ItemCrafting.recipeDough).setNoText(), new PageCrafting(13, ItemCrafting.recipeRiceDough).setNoText(), new PageCrafting(14, BlockCrafting.recipeIronCase).setNoText()).setImportant();
|
||||||
|
|
||||||
//Miscellaneous
|
//Miscellaneous
|
||||||
new BookletChapter("miscReconstructor", entryMisc, new ItemStack(InitBlocks.blockTestifiBucksWhiteWall), new PageTextOnly(1), new PageReconstructor(2, new ItemStack(Blocks.soul_sand)).setNoText(), new PageReconstructor(3, new ItemStack(InitBlocks.blockTestifiBucksWhiteWall)), new PageReconstructor(4, new ItemStack(InitBlocks.blockTestifiBucksGreenWall)).setNoText()).setImportant();
|
new BookletChapter("miscReconstructor", entryMisc, new ItemStack(InitBlocks.blockTestifiBucksWhiteWall), new PageTextOnly(1), new PageReconstructor(2, ReconstructorRecipeHandler.recipeSoulSand).setNoText(), new PageReconstructor(3, ReconstructorRecipeHandler.recipeWhiteWall), new PageReconstructor(4, ReconstructorRecipeHandler.recipeGreenWall).setNoText(), new PageReconstructor(5, ReconstructorRecipeHandler.colorConversionRecipes)).setImportant();
|
||||||
new BookletChapter("bookStand", entryMisc, new ItemStack(InitBlocks.blockBookletStand), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeBookStand));
|
new BookletChapter("bookStand", entryMisc, new ItemStack(InitBlocks.blockBookletStand), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeBookStand));
|
||||||
new BookletChapter("quartz", entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), new PageTextOnly(1).setStack(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal())).addTextReplacement("<lowest>", ConfigIntValues.BLACK_QUARTZ_MIN_HEIGHT.getValue()).addTextReplacement("<highest>", ConfigIntValues.BLACK_QUARTZ_MAX_HEIGHT.getValue()), new PageTextOnly(2).setStack(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal())), new PageCrafting(3, BlockCrafting.recipeQuartzBlock).setNoText(), new PageCrafting(4, BlockCrafting.recipeQuartzPillar).setNoText(), new PageCrafting(5, BlockCrafting.recipeQuartzChiseled).setNoText());
|
new BookletChapter("quartz", entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), new PageTextOnly(1).setStack(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal())).addTextReplacement("<lowest>", ConfigIntValues.BLACK_QUARTZ_MIN_HEIGHT.getValue()).addTextReplacement("<highest>", ConfigIntValues.BLACK_QUARTZ_MAX_HEIGHT.getValue()), new PageTextOnly(2).setStack(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal())), new PageCrafting(3, BlockCrafting.recipeQuartzBlock).setNoText(), new PageCrafting(4, BlockCrafting.recipeQuartzPillar).setNoText(), new PageCrafting(5, BlockCrafting.recipeQuartzChiseled).setNoText());
|
||||||
new BookletChapter("cloud", entryMisc, new ItemStack(InitBlocks.blockSmileyCloud), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeSmileyCloud).setNoText()).setSpecial();
|
new BookletChapter("cloud", entryMisc, new ItemStack(InitBlocks.blockSmileyCloud), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeSmileyCloud).setNoText()).setSpecial();
|
||||||
|
|
|
@ -45,9 +45,7 @@ public class BookletChapterReconstructor extends BookletChapter{
|
||||||
}
|
}
|
||||||
}.setNoText());
|
}.setNoText());
|
||||||
|
|
||||||
for(int i = 0; i < ReconstructorRecipeHandler.RECIPES_FOR_BOOKLET_PAGE; i++){
|
allPages.add(new PageReconstructor(allPages.size()+1, ReconstructorRecipeHandler.mainPageRecipes).setNoText());
|
||||||
allPages.add(new PageReconstructor(allPages.size()+1, ReconstructorRecipeHandler.recipes.get(i).getFirstOutput()).setNoText());
|
|
||||||
}
|
|
||||||
|
|
||||||
return allPages.toArray(new BookletPage[allPages.size()]);
|
return allPages.toArray(new BookletPage[allPages.size()]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,7 +140,7 @@ public class PageCrafting extends BookletPage{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateScreen(int ticksElapsed){
|
public void updateScreen(int ticksElapsed){
|
||||||
if(ticksElapsed%30 == 0){
|
if(ticksElapsed%15 == 0){
|
||||||
if(this.recipePos+1 >= this.recipes.length){
|
if(this.recipePos+1 >= this.recipes.length){
|
||||||
this.recipePos = 0;
|
this.recipePos = 0;
|
||||||
}
|
}
|
||||||
|
@ -152,18 +152,22 @@ public class PageCrafting extends BookletPage{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack[] getItemStacksForPage(){
|
public ItemStack[] getItemStacksForPage(){
|
||||||
if(this.recipes != null && this.recipes.length > 0 && this.recipes[0] != null){
|
if(this.recipes != null){
|
||||||
ItemStack output = this.recipes[0].getRecipeOutput();
|
ItemStack[] stacks = new ItemStack[this.recipes.length];
|
||||||
if(output != null){
|
for(int i = 0; i < this.recipes.length; i++){
|
||||||
if(!this.arePageStacksWildcard){
|
ItemStack output = this.recipes[i].getRecipeOutput();
|
||||||
return new ItemStack[]{output};
|
if(output != null){
|
||||||
}
|
if(!this.arePageStacksWildcard){
|
||||||
else{
|
stacks[i] = output;
|
||||||
ItemStack wildcardOutput = output.copy();
|
}
|
||||||
wildcardOutput.setItemDamage(Util.WILDCARD);
|
else{
|
||||||
return new ItemStack[]{wildcardOutput};
|
ItemStack wildcardOutput = output.copy();
|
||||||
|
wildcardOutput.setItemDamage(Util.WILDCARD);
|
||||||
|
stacks[i] = wildcardOutput;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return stacks;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,27 +21,39 @@ import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.EnumChatFormatting;
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class PageReconstructor extends BookletPage{
|
public class PageReconstructor extends BookletPage{
|
||||||
|
|
||||||
private final ItemStack result;
|
private ReconstructorRecipeHandler.Recipe[] recipes;
|
||||||
private final ItemStack input;
|
private int recipePos;
|
||||||
|
|
||||||
public PageReconstructor(int id, ItemStack result){
|
public PageReconstructor(int id, ReconstructorRecipeHandler.Recipe... recipes){
|
||||||
this(id, null, result);
|
super(id);
|
||||||
|
this.recipes = recipes;
|
||||||
|
this.addToPagesWithItemStackData();
|
||||||
}
|
}
|
||||||
|
|
||||||
public PageReconstructor(int id, ItemStack input, ItemStack result){
|
public PageReconstructor(int id, ArrayList<ReconstructorRecipeHandler.Recipe> recipes){
|
||||||
super(id);
|
this(id, recipes.toArray(new ReconstructorRecipeHandler.Recipe[recipes.size()]));
|
||||||
this.result = result;
|
}
|
||||||
this.input = input;
|
|
||||||
this.addToPagesWithItemStackData();
|
@Override
|
||||||
|
public void updateScreen(int ticksElapsed){
|
||||||
|
if(ticksElapsed%15 == 0){
|
||||||
|
if(this.recipePos+1 >= this.recipes.length){
|
||||||
|
this.recipePos = 0;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.recipePos++;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void renderPre(GuiBooklet gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){
|
public void renderPre(GuiBooklet gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){
|
||||||
if(this.input != null || this.getInputForOutput(this.result) != null){
|
if(this.recipes[this.recipePos] != null){
|
||||||
gui.mc.getTextureManager().bindTexture(ClientProxy.bulletForMyValentine ? GuiBooklet.resLocValentine : GuiBooklet.resLoc);
|
gui.mc.getTextureManager().bindTexture(ClientProxy.bulletForMyValentine ? GuiBooklet.resLocValentine : GuiBooklet.resLoc);
|
||||||
gui.drawTexturedModalRect(gui.guiLeft+37, gui.guiTop+20, 188, 154, 60, 60);
|
gui.drawTexturedModalRect(gui.guiLeft+37, gui.guiTop+20, 188, 154, 60, 60);
|
||||||
}
|
}
|
||||||
|
@ -50,8 +62,8 @@ public class PageReconstructor extends BookletPage{
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public void render(GuiBooklet gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){
|
public void render(GuiBooklet gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){
|
||||||
ItemStack input = this.input != null ? this.input : this.getInputForOutput(this.result);
|
ReconstructorRecipeHandler.Recipe recipe = this.recipes[this.recipePos];
|
||||||
if(input == null){
|
if(recipe == null){
|
||||||
gui.mc.fontRenderer.drawSplitString(EnumChatFormatting.DARK_RED+StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".recipeDisabled"), gui.guiLeft+14, gui.guiTop+15, 115, 0);
|
gui.mc.fontRenderer.drawSplitString(EnumChatFormatting.DARK_RED+StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".recipeDisabled"), gui.guiLeft+14, gui.guiTop+15, 115, 0);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -59,7 +71,7 @@ public class PageReconstructor extends BookletPage{
|
||||||
gui.mc.fontRenderer.drawString(strg, gui.guiLeft+gui.xSize/2-gui.mc.fontRenderer.getStringWidth(strg)/2, gui.guiTop+10, 0);
|
gui.mc.fontRenderer.drawString(strg, gui.guiLeft+gui.xSize/2-gui.mc.fontRenderer.getStringWidth(strg)/2, gui.guiTop+10, 0);
|
||||||
|
|
||||||
//Lens
|
//Lens
|
||||||
ItemStack lens = this.getRecipeForOutput(this.result).type.lens;
|
ItemStack lens = recipe.type.lens;
|
||||||
strg = lens == null ? StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".noLens") : lens.getItem().getItemStackDisplayName(lens);
|
strg = lens == null ? StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".noLens") : lens.getItem().getItemStackDisplayName(lens);
|
||||||
gui.mc.fontRenderer.drawString(strg, gui.guiLeft+gui.xSize/2-gui.mc.fontRenderer.getStringWidth(strg)/2, gui.guiTop+75, 0);
|
gui.mc.fontRenderer.drawString(strg, gui.guiLeft+gui.xSize/2-gui.mc.fontRenderer.getStringWidth(strg)/2, gui.guiTop+75, 0);
|
||||||
}
|
}
|
||||||
|
@ -69,11 +81,11 @@ public class PageReconstructor extends BookletPage{
|
||||||
gui.mc.fontRenderer.drawSplitString(text, gui.guiLeft+14, gui.guiTop+100, 115, 0);
|
gui.mc.fontRenderer.drawSplitString(text, gui.guiLeft+14, gui.guiTop+100, 115, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(input != null){
|
if(recipe != null){
|
||||||
renderItem(gui, new ItemStack(InitBlocks.blockAtomicReconstructor), gui.guiLeft+37+22, gui.guiTop+20+21, 1.0F);
|
renderItem(gui, new ItemStack(InitBlocks.blockAtomicReconstructor), gui.guiLeft+37+22, gui.guiTop+20+21, 1.0F);
|
||||||
for(int i = 0; i < 2; i++){
|
for(int i = 0; i < 2; i++){
|
||||||
for(int x = 0; x < 2; x++){
|
for(int x = 0; x < 2; x++){
|
||||||
ItemStack stack = x == 0 ? input : this.result;
|
ItemStack stack = x == 0 ? this.getInputForRecipe(recipe) : recipe.getFirstOutput();
|
||||||
if(stack.getItemDamage() == Util.WILDCARD){
|
if(stack.getItemDamage() == Util.WILDCARD){
|
||||||
stack.setItemDamage(0);
|
stack.setItemDamage(0);
|
||||||
}
|
}
|
||||||
|
@ -96,30 +108,22 @@ public class PageReconstructor extends BookletPage{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack[] getItemStacksForPage(){
|
public ItemStack[] getItemStacksForPage(){
|
||||||
return this.result == null ? new ItemStack[0] : new ItemStack[]{this.result};
|
if(this.recipes != null){
|
||||||
}
|
ItemStack[] stacks = new ItemStack[this.recipes.length];
|
||||||
|
for(int i = 0; i < this.recipes.length; i++){
|
||||||
private ReconstructorRecipeHandler.Recipe getRecipeForOutput(ItemStack output){
|
stacks[i] = this.recipes[i].getFirstOutput();
|
||||||
for(ReconstructorRecipeHandler.Recipe recipe : ReconstructorRecipeHandler.recipes){
|
|
||||||
List<ItemStack> stacks = OreDictionary.getOres(recipe.output, false);
|
|
||||||
for(ItemStack stack : stacks){
|
|
||||||
if(output.isItemEqual(stack)){
|
|
||||||
return recipe;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
return stacks;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private ItemStack getInputForOutput(ItemStack output){
|
private ItemStack getInputForRecipe(ReconstructorRecipeHandler.Recipe recipe){
|
||||||
ReconstructorRecipeHandler.Recipe recipe = this.getRecipeForOutput(output);
|
List<ItemStack> stacks = OreDictionary.getOres(recipe.input, false);
|
||||||
if(recipe != null){
|
if(stacks != null && !stacks.isEmpty() && stacks.get(0) != null){
|
||||||
List<ItemStack> inputs = OreDictionary.getOres(recipe.input, false);
|
ItemStack copy = stacks.get(0).copy();
|
||||||
if(inputs != null && !inputs.isEmpty() && inputs.get(0) != null){
|
copy.stackSize = 1;
|
||||||
ItemStack input = inputs.get(0).copy();
|
return copy;
|
||||||
input.stackSize = 1;
|
|
||||||
return input;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,46 +25,76 @@ import java.util.Objects;
|
||||||
public class ReconstructorRecipeHandler{
|
public class ReconstructorRecipeHandler{
|
||||||
|
|
||||||
public static ArrayList<Recipe> recipes = new ArrayList<Recipe>();
|
public static ArrayList<Recipe> recipes = new ArrayList<Recipe>();
|
||||||
public static final int RECIPES_FOR_BOOKLET_PAGE = 12;
|
|
||||||
|
public static ArrayList<Recipe> mainPageRecipes = new ArrayList<Recipe>();
|
||||||
|
public static Recipe recipeColorLens;
|
||||||
|
public static Recipe recipeSoulSand;
|
||||||
|
public static Recipe recipeGreenWall;
|
||||||
|
public static Recipe recipeWhiteWall;
|
||||||
|
public static ArrayList<Recipe> colorConversionRecipes = new ArrayList<Recipe>();
|
||||||
|
|
||||||
public static void init(){
|
public static void init(){
|
||||||
//Crystal Blocks
|
//Crystal Blocks
|
||||||
addRecipe("blockRedstone", "blockCrystalRed", 400);
|
addRecipe("blockRedstone", "blockCrystalRed", 400);
|
||||||
|
mainPageRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
|
||||||
addRecipe("blockLapis", "blockCrystalBlue", 400);
|
addRecipe("blockLapis", "blockCrystalBlue", 400);
|
||||||
|
mainPageRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
|
||||||
addRecipe("blockDiamond", "blockCrystalLightBlue", 6000);
|
addRecipe("blockDiamond", "blockCrystalLightBlue", 6000);
|
||||||
|
mainPageRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
|
||||||
addRecipe("blockEmerald", "blockCrystalGreen", 10000);
|
addRecipe("blockEmerald", "blockCrystalGreen", 10000);
|
||||||
|
mainPageRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
|
||||||
addRecipe("blockCoal", "blockCrystalBlack", 600);
|
addRecipe("blockCoal", "blockCrystalBlack", 600);
|
||||||
|
mainPageRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
|
||||||
addRecipe("blockIron", "blockCrystalWhite", 800);
|
addRecipe("blockIron", "blockCrystalWhite", 800);
|
||||||
|
mainPageRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
|
||||||
|
|
||||||
//Crystal Items
|
//Crystal Items
|
||||||
addRecipe("dustRedstone", "crystalRed", 40);
|
addRecipe("dustRedstone", "crystalRed", 40);
|
||||||
|
mainPageRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
|
||||||
addRecipe("gemLapis", "crystalBlue", 40);
|
addRecipe("gemLapis", "crystalBlue", 40);
|
||||||
|
mainPageRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
|
||||||
addRecipe("gemDiamond", "crystalLightBlue", 600);
|
addRecipe("gemDiamond", "crystalLightBlue", 600);
|
||||||
|
mainPageRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
|
||||||
addRecipe("gemEmerald", "crystalGreen", 1000);
|
addRecipe("gemEmerald", "crystalGreen", 1000);
|
||||||
|
mainPageRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
|
||||||
addRecipe("coal", "crystalBlack", 60);
|
addRecipe("coal", "crystalBlack", 60);
|
||||||
|
mainPageRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
|
||||||
addRecipe("ingotIron", "crystalWhite", 80);
|
addRecipe("ingotIron", "crystalWhite", 80);
|
||||||
|
mainPageRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
|
||||||
|
|
||||||
//Lenses
|
//Lenses
|
||||||
addRecipe("itemLens", "itemColorLens", 5000);
|
addRecipe("itemLens", "itemColorLens", 5000);
|
||||||
addRecipe("itemColorLens", "itemLens", 5000);
|
addRecipe("itemColorLens", "itemLens", 5000);
|
||||||
|
recipeColorLens = Util.GetRecipes.lastReconstructorRecipe();
|
||||||
|
|
||||||
//Misc
|
//Misc
|
||||||
if(ConfigCrafting.RECONSTRUCTOR_MISC.isEnabled()){
|
if(ConfigCrafting.RECONSTRUCTOR_MISC.isEnabled()){
|
||||||
addRecipe("sand", "soulSand", 20000);
|
addRecipe("sand", "soulSand", 20000);
|
||||||
|
recipeSoulSand = Util.GetRecipes.lastReconstructorRecipe();
|
||||||
addRecipe("blockQuartz", "blockWhiteBrick", 10);
|
addRecipe("blockQuartz", "blockWhiteBrick", 10);
|
||||||
|
recipeWhiteWall = Util.GetRecipes.lastReconstructorRecipe();
|
||||||
addRecipe("blockQuartz", "blockGreenBrick", 10, LensType.COLOR);
|
addRecipe("blockQuartz", "blockGreenBrick", 10, LensType.COLOR);
|
||||||
|
recipeGreenWall = Util.GetRecipes.lastReconstructorRecipe();
|
||||||
|
|
||||||
//Colors
|
//Colors
|
||||||
for(int i = 0; i < TheColoredLampColors.values().length-1; i++){
|
for(int i = 0; i < TheColoredLampColors.values().length-1; i++){
|
||||||
addRecipe("dye"+TheColoredLampColors.values()[i].name, "dye"+TheColoredLampColors.values()[i+1].name, 2000, LensType.COLOR);
|
addRecipe("dye"+TheColoredLampColors.values()[i].name, "dye"+TheColoredLampColors.values()[i+1].name, 2000, LensType.COLOR);
|
||||||
|
colorConversionRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
|
||||||
addRecipe("wool"+TheColoredLampColors.values()[i].name, "wool"+TheColoredLampColors.values()[i+1].name, 2000, LensType.COLOR);
|
addRecipe("wool"+TheColoredLampColors.values()[i].name, "wool"+TheColoredLampColors.values()[i+1].name, 2000, LensType.COLOR);
|
||||||
|
colorConversionRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
|
||||||
addRecipe("clay"+TheColoredLampColors.values()[i].name, "clay"+TheColoredLampColors.values()[i+1].name, 2000, LensType.COLOR);
|
addRecipe("clay"+TheColoredLampColors.values()[i].name, "clay"+TheColoredLampColors.values()[i+1].name, 2000, LensType.COLOR);
|
||||||
|
colorConversionRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
|
||||||
addRecipe("blockGlass"+TheColoredLampColors.values()[i].name, "blockGlass"+TheColoredLampColors.values()[i+1].name, 2000, LensType.COLOR);
|
addRecipe("blockGlass"+TheColoredLampColors.values()[i].name, "blockGlass"+TheColoredLampColors.values()[i+1].name, 2000, LensType.COLOR);
|
||||||
|
colorConversionRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
|
||||||
}
|
}
|
||||||
addRecipe("dye"+TheColoredLampColors.values()[15].name, "dye"+TheColoredLampColors.values()[0].name, 2000, LensType.COLOR);
|
addRecipe("dye"+TheColoredLampColors.values()[15].name, "dye"+TheColoredLampColors.values()[0].name, 2000, LensType.COLOR);
|
||||||
|
colorConversionRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
|
||||||
addRecipe("wool"+TheColoredLampColors.values()[15].name, "wool"+TheColoredLampColors.values()[0].name, 2000, LensType.COLOR);
|
addRecipe("wool"+TheColoredLampColors.values()[15].name, "wool"+TheColoredLampColors.values()[0].name, 2000, LensType.COLOR);
|
||||||
|
colorConversionRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
|
||||||
addRecipe("clay"+TheColoredLampColors.values()[15].name, "clay"+TheColoredLampColors.values()[0].name, 2000, LensType.COLOR);
|
addRecipe("clay"+TheColoredLampColors.values()[15].name, "clay"+TheColoredLampColors.values()[0].name, 2000, LensType.COLOR);
|
||||||
|
colorConversionRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
|
||||||
addRecipe("blockGlass"+TheColoredLampColors.values()[15].name, "blockGlass"+TheColoredLampColors.values()[0].name, 2000, LensType.COLOR);
|
addRecipe("blockGlass"+TheColoredLampColors.values()[15].name, "blockGlass"+TheColoredLampColors.values()[0].name, 2000, LensType.COLOR);
|
||||||
|
colorConversionRecipes.add(Util.GetRecipes.lastReconstructorRecipe());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,8 +135,10 @@ public class ReconstructorRecipeHandler{
|
||||||
|
|
||||||
public ItemStack getFirstOutput(){
|
public ItemStack getFirstOutput(){
|
||||||
List<ItemStack> stacks = OreDictionary.getOres(this.output, false);
|
List<ItemStack> stacks = OreDictionary.getOres(this.output, false);
|
||||||
if(stacks != null && !stacks.isEmpty()){
|
if(stacks != null && !stacks.isEmpty() && stacks.get(0) != null){
|
||||||
return stacks.get(0);
|
ItemStack stack = stacks.get(0).copy();
|
||||||
|
stack.stackSize = 1;
|
||||||
|
return stack;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ package ellpeck.actuallyadditions.util;
|
||||||
|
|
||||||
import cpw.mods.fml.common.FMLCommonHandler;
|
import cpw.mods.fml.common.FMLCommonHandler;
|
||||||
import ellpeck.actuallyadditions.recipe.CrusherRecipeRegistry;
|
import ellpeck.actuallyadditions.recipe.CrusherRecipeRegistry;
|
||||||
|
import ellpeck.actuallyadditions.recipe.ReconstructorRecipeHandler;
|
||||||
import net.minecraft.block.BlockDispenser;
|
import net.minecraft.block.BlockDispenser;
|
||||||
import net.minecraft.dispenser.BehaviorDefaultDispenseItem;
|
import net.minecraft.dispenser.BehaviorDefaultDispenseItem;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
|
@ -61,6 +62,11 @@ public class Util{
|
||||||
|
|
||||||
public static class GetRecipes{
|
public static class GetRecipes{
|
||||||
|
|
||||||
|
public static ReconstructorRecipeHandler.Recipe lastReconstructorRecipe(){
|
||||||
|
ArrayList<ReconstructorRecipeHandler.Recipe> list = ReconstructorRecipeHandler.recipes;
|
||||||
|
return list.get(list.size()-1);
|
||||||
|
}
|
||||||
|
|
||||||
public static CrusherRecipeRegistry.CrusherRecipe lastCrusherRecipe(){
|
public static CrusherRecipeRegistry.CrusherRecipe lastCrusherRecipe(){
|
||||||
ArrayList<CrusherRecipeRegistry.CrusherRecipe> list = CrusherRecipeRegistry.recipes;
|
ArrayList<CrusherRecipeRegistry.CrusherRecipe> list = CrusherRecipeRegistry.recipes;
|
||||||
return list.get(list.size()-1);
|
return list.get(list.size()-1);
|
||||||
|
|
|
@ -611,8 +611,9 @@ booklet.actuallyadditions.chapter.bookTutorial.text.2=<imp>The Buttons at the to
|
||||||
booklet.actuallyadditions.chapter.bookTutorial.text.3=If you, for some reason, want to craft this book again, just take a <item>piece of paper<r> and a <item>canola seed<r> which you can find randomly generated and craft them together!
|
booklet.actuallyadditions.chapter.bookTutorial.text.3=If you, for some reason, want to craft this book again, just take a <item>piece of paper<r> and a <item>canola seed<r> which you can find randomly generated and craft them together!
|
||||||
|
|
||||||
booklet.actuallyadditions.chapter.miscReconstructor.name=Useful Reconstructor Recipes
|
booklet.actuallyadditions.chapter.miscReconstructor.name=Useful Reconstructor Recipes
|
||||||
booklet.actuallyadditions.chapter.miscReconstructor.text.1=There are some additional recipes for the <item>Atomic Reconstructor<r> that could be very useful to you. <n>These include <imp>decor blocks and items<r> as well as some <imp>useful conversions<r>. Flip through the following pages to see them all. <n><n>For example, by firing at <imp>Wool, Stained Clay, Stained Glass and Dye<r> with a <item>Lens: Color<r> multiple times, you can <imp>cycle through<r> all of their colors.
|
booklet.actuallyadditions.chapter.miscReconstructor.text.1=There are some additional recipes for the <item>Atomic Reconstructor<r> that could be very useful to you. <n>These include <imp>decor blocks and items<r> as well as some <imp>useful conversions<r>. Flip through the following pages to see them all.
|
||||||
booklet.actuallyadditions.chapter.miscReconstructor.text.3=The <item>Ethetic Quartz Blocks<r> are Quartz Blocks spruced up. <n>They can be crafted into <imp>stairs<r>, <imp>slabs<r> and <imp>walls<r> with the same recipes as cobblestone has. <n><n><i>No, not misspelled
|
booklet.actuallyadditions.chapter.miscReconstructor.text.3=The <item>Ethetic Quartz Blocks<r> are Quartz Blocks spruced up. <n>They can be crafted into <imp>stairs<r>, <imp>slabs<r> and <imp>walls<r> with the same recipes as cobblestone has. <n><n><i>No, not misspelled
|
||||||
|
booklet.actuallyadditions.chapter.miscReconstructor.text.5=By firing at <imp>Wool, Stained Clay, Stained Glass and Dye<r> with a <item>Lens: Color<r> multiple times, you can <imp>cycle through<r> all of their colors.
|
||||||
|
|
||||||
booklet.actuallyadditions.chapter.bookStand.name=Manual Stand
|
booklet.actuallyadditions.chapter.bookStand.name=Manual Stand
|
||||||
booklet.actuallyadditions.chapter.bookStand.text.1=The <item>Manual Stand<r> is a block that is supposed to mainly be used on <imp>Servers<r>. <n>You can, provided you are the person who <imp>placed it down<r>, set a page in the GUI that will <imp>open when someone else accesses it<r> by pressing the "Set Page"-button while being on the desired page. <n>The Manual Stand <imp>does not save<r> pages another player navigated to, meaing re-accessing the Stand will cause it to always <imp>end up on the page speficied<r> by the placer.
|
booklet.actuallyadditions.chapter.bookStand.text.1=The <item>Manual Stand<r> is a block that is supposed to mainly be used on <imp>Servers<r>. <n>You can, provided you are the person who <imp>placed it down<r>, set a page in the GUI that will <imp>open when someone else accesses it<r> by pressing the "Set Page"-button while being on the desired page. <n>The Manual Stand <imp>does not save<r> pages another player navigated to, meaing re-accessing the Stand will cause it to always <imp>end up on the page speficied<r> by the placer.
|
||||||
|
|
Loading…
Reference in a new issue