Changed Laser Relay recipes to use the Reconstructor

Closes #494
This commit is contained in:
Ellpeck 2016-12-18 12:08:32 +01:00
parent 3a40edd7a0
commit ad7eb9ac73
4 changed files with 23 additions and 21 deletions

View file

@ -189,8 +189,8 @@ public final class InitBooklet{
//Laser Relays
chaptersIntroduction[8] = new BookletChapter("laserIntro", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitItems.itemLaserWrench), new PageTextOnly(1), new PageTextOnly(2).addTextReplacement("<range>", TileEntityLaserRelay.MAX_DISTANCE), new PageCrafting(3, ItemCrafting.recipeLaserWrench)).setImportant();
new BookletChapter("laserRelays", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitBlocks.blockLaserRelay), new PageTextOnly(1), new PageTextOnly(2).addTextReplacement("<cap1>", TileEntityLaserRelayEnergy.CAP).addTextReplacement("<cap2>", TileEntityLaserRelayEnergyAdvanced.CAP).addTextReplacement("<cap3>", TileEntityLaserRelayEnergyExtreme.CAP), new PagePicture(3, "page_laser_relay", 0).setNoText(), new PageCrafting(4, BlockCrafting.recipeLaserRelay).setWildcard().setNoText(), new PageCrafting(5, BlockCrafting.recipeLaserRelayAdvanced).setWildcard().setNoText(), new PageCrafting(6, BlockCrafting.recipeLaserRelayExtreme).setWildcard().setNoText());
new BookletChapter("itemStorage", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitBlocks.blockLaserRelayItemWhitelist), new PageTextOnly(1), new PageTextOnly(2), new PagePicture(3, "page_item_laser_relay_basic", 78), new PagePicture(4, "page_item_laser_relay_fail", 84), new PagePicture(5, "page_item_laser_relay_transfer", 78), new PagePicture(6, "page_item_laser_relay_whitelist_chest", 76), new PagePicture(7, "page_item_laser_relay_whitelist_interface", 75), new PagePicture(8, "page_item_laser_relay_system", 75), new PageTextOnly(9), new PageCrafting(10, BlockCrafting.recipeLaserRelayItem).setWildcard().setNoText(), new PageCrafting(11, BlockCrafting.recipeLaserRelayItemWhitelist).setWildcard().setNoText(), new PageCrafting(12, BlockCrafting.recipeItemInterface).setNoText());
new BookletChapter("fluidLaser", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitBlocks.blockLaserRelayFluids), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFluidLaser).setNoText());
new BookletChapter("itemStorage", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitBlocks.blockLaserRelayItemWhitelist), new PageTextOnly(1), new PageTextOnly(2), new PagePicture(3, "page_item_laser_relay_basic", 78), new PagePicture(4, "page_item_laser_relay_fail", 84), new PagePicture(5, "page_item_laser_relay_transfer", 78), new PagePicture(6, "page_item_laser_relay_whitelist_chest", 76), new PagePicture(7, "page_item_laser_relay_whitelist_interface", 75), new PagePicture(8, "page_item_laser_relay_system", 75), new PageTextOnly(9), new PageReconstructor(10, LensRecipeHandler.recipeItemLaser).setWildcard().setNoText(), new PageCrafting(11, BlockCrafting.recipeLaserRelayItemWhitelist).setWildcard().setNoText(), new PageCrafting(12, BlockCrafting.recipeItemInterface).setNoText());
new BookletChapter("fluidLaser", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitBlocks.blockLaserRelayFluids), new PageTextOnly(1), new PageReconstructor(2, LensRecipeHandler.recipeFluidLaser).setWildcard().setNoText());
//No RF Using Blocks
new BookletChapter("breaker", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockBreaker), new PageCrafting(1, BlockCrafting.recipeBreaker).setWildcard(), new PageCrafting(2, BlockCrafting.recipePlacer).setWildcard(), new PageCrafting(3, BlockCrafting.recipeLiquidPlacer).setWildcard(), new PageCrafting(4, BlockCrafting.recipeLiquidCollector).setWildcard());

View file

@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.booklet.page;
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
import de.ellpeck.actuallyadditions.api.recipe.LensConversionRecipe;
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet;
import de.ellpeck.actuallyadditions.mod.util.Util;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.client.config.GuiUtils;
@ -21,6 +22,7 @@ import java.util.List;
public class PageReconstructor extends BookletPage{
private final LensConversionRecipe recipe;
private boolean isWildcard;
public PageReconstructor(int localizationKey, LensConversionRecipe recipe){
super(localizationKey);
@ -54,10 +56,19 @@ public class PageReconstructor extends BookletPage{
super.getItemStacksForPage(list);
if(this.recipe != null){
list.add(this.recipe.outputStack);
ItemStack copy = this.recipe.outputStack.copy();
if(this.isWildcard){
copy.setItemDamage(Util.WILDCARD);
}
list.add(copy);
}
}
public BookletPage setWildcard(){
this.isWildcard = true;
return this;
}
@Override
public int getSortingPriority(){
return 20;

View file

@ -86,7 +86,6 @@ public final class BlockCrafting{
public static IRecipe recipeMiner;
public static IRecipe recipeFireworkBox;
public static IRecipe recipePhantomRedstoneface;
public static IRecipe recipeLaserRelayItem;
public static IRecipe recipeLaserRelayItemWhitelist;
public static IRecipe recipeItemInterface;
public static IRecipe recipePlayerInterface;
@ -94,7 +93,6 @@ public final class BlockCrafting{
public static IRecipe recipeShockSuppressor;
public static IRecipe recipeEmpowerer;
public static IRecipe[] recipesTinyTorch = new IRecipe[2];
public static IRecipe recipeFluidLaser;
public static IRecipe recipeDistributorItem;
public static IRecipe recipeBioReactor;
public static IRecipe recipeFarmer;
@ -237,7 +235,7 @@ public final class BlockCrafting{
recipeAtomicReconstructor = RecipeUtil.lastIRecipe();
//Laser Relay
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLaserRelay, 2),
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLaserRelay, 6),
"OBO", "RCR", "OBO",
'B', new ItemStack(Blocks.REDSTONE_BLOCK),
'O', new ItemStack(Blocks.OBSIDIAN),
@ -259,12 +257,6 @@ public final class BlockCrafting{
'X', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal())));
recipeLaserRelayExtreme = RecipeUtil.lastIRecipe();
//Item Laser Relay
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockLaserRelayItem),
new ItemStack(InitBlocks.blockLaserRelay),
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeLaserRelayItem = RecipeUtil.lastIRecipe();
//Whitelist Item Laser Relay
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockLaserRelayItemWhitelist),
new ItemStack(InitBlocks.blockLaserRelayItem),
@ -273,12 +265,6 @@ public final class BlockCrafting{
new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal())));
recipeLaserRelayItemWhitelist = RecipeUtil.lastIRecipe();
//Fluid Laser Relay
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockLaserRelayFluids),
new ItemStack(InitBlocks.blockLaserRelay),
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal())));
recipeFluidLaser = RecipeUtil.lastIRecipe();
//Item Interface
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockItemViewer),
"OBO", "RCR", "OBO",

View file

@ -40,6 +40,8 @@ public final class LensRecipeHandler{
public static LensConversionRecipe recipeNetherWart;
public static LensConversionRecipe recipePrismarine;
public static LensConversionRecipe recipeCrystallizedCanolaSeed;
public static LensConversionRecipe recipeItemLaser;
public static LensConversionRecipe recipeFluidLaser;
public static void init(){
//Crystal Blocks
@ -73,15 +75,18 @@ public final class LensRecipeHandler{
//Lenses
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()), new ItemStack(InitItems.itemColorLens), 5000);
recipeColorLens = RecipeUtil.lastReconstructorRecipe();
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(InitItems.itemColorLens), new ItemStack(InitItems.itemExplosionLens), 5000);
recipeExplosionLens = RecipeUtil.lastReconstructorRecipe();
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(InitItems.itemExplosionLens), new ItemStack(InitItems.itemDamageLens), 5000);
recipeDamageLens = RecipeUtil.lastReconstructorRecipe();
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(InitItems.itemDamageLens), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()), 5000);
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(InitBlocks.blockLaserRelay), new ItemStack(InitBlocks.blockLaserRelayFluids), 2000);
recipeFluidLaser = RecipeUtil.lastReconstructorRecipe();
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(InitBlocks.blockLaserRelayFluids), new ItemStack(InitBlocks.blockLaserRelayItem), 2000);
recipeItemLaser = RecipeUtil.lastReconstructorRecipe();
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(InitBlocks.blockLaserRelayItem), new ItemStack(InitBlocks.blockLaserRelay), 2000);
//Misc
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Blocks.SAND), new ItemStack(Blocks.SOUL_SAND), 20000);
recipeSoulSand = RecipeUtil.lastReconstructorRecipe();