Make Laser Relay crafting use the Reconstructor

This commit is contained in:
Ellpeck 2016-12-27 11:50:50 +01:00
parent 28f7fe4a2b
commit 5182fa8c4e
5 changed files with 23 additions and 25 deletions

View file

@ -163,8 +163,8 @@ public final class InitBooklet{
//Laser Relays
chaptersIntroduction[7] = 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).setNoText()).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, "pageLaserRelay", 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, "pageItemLaserRelayBasic", 78), new PagePicture(4, "pageItemLaserRelayFail", 84), new PagePicture(5, "pageItemLaserRelayTransfer", 78), new PagePicture(6, "pageItemLaserRelayWhitelistChest", 76), new PagePicture(7, "pageItemLaserRelayWhitelistInterface", 75), new PagePicture(8, "pageItemLaserRelaySystem", 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,7 +56,16 @@ 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;
}
}

View file

@ -132,10 +132,8 @@ public enum ConfigCrafting{
DIRECTIONAL_BREAKER("Long-Range Breaker", ConfigCategories.BLOCKS_CRAFTING),
RANGED_COLLECTOR("Ranged Collector", ConfigCategories.BLOCKS_CRAFTING),
LASER_RELAY("Laser Relay", ConfigCategories.BLOCKS_CRAFTING),
LASER_RELAY_ITEM("Item Laser Relay", ConfigCategories.BLOCKS_CRAFTING),
LASER_RELAY_ITEM_WHITELIST("Advanced Item Laser Relay", ConfigCategories.BLOCKS_CRAFTING),
LASER_WRENCH("Laser Wrench", ConfigCategories.ITEMS_CRAFTING),
LASER_RELAY_FLUIDS("Fluid Laser Relay", ConfigCategories.BLOCKS_CRAFTING),
CHEST_TO_CRATE_UPGRADE("Chest To Crate Upgrade", ConfigCategories.ITEMS_CRAFTING),
DISENCHANTING_LENS("Disenchanting Lens", ConfigCategories.ITEMS_CRAFTING),
MINING_LENS("Mining Lens", ConfigCategories.ITEMS_CRAFTING),

View file

@ -87,7 +87,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;
@ -95,8 +94,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;
@ -245,7 +242,7 @@ public final class BlockCrafting{
//Laser Relay
if(ConfigCrafting.LASER_RELAY.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLaserRelay, 2),
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLaserRelay, 4),
"OBO", "RCR", "OBO",
'B', new ItemStack(Blocks.REDSTONE_BLOCK),
'O', new ItemStack(Blocks.OBSIDIAN),
@ -268,14 +265,6 @@ public final class BlockCrafting{
recipeLaserRelayExtreme = RecipeUtil.lastIRecipe();
}
//Item Laser Relay
if(ConfigCrafting.LASER_RELAY_ITEM.isEnabled()){
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
if(ConfigCrafting.LASER_RELAY_ITEM_WHITELIST.isEnabled()){
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockLaserRelayItemWhitelist),
@ -286,14 +275,6 @@ public final class BlockCrafting{
recipeLaserRelayItemWhitelist = RecipeUtil.lastIRecipe();
}
//Fluid Laser Relay
if(ConfigCrafting.LASER_RELAY_FLUIDS.isEnabled()){
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
if(ConfigCrafting.ITEM_INTERFACE.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockItemViewer),

View file

@ -41,6 +41,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
@ -87,6 +89,12 @@ public final class LensRecipeHandler{
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
if(ConfigCrafting.RECONSTRUCTOR_MISC.isEnabled()){
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Blocks.SAND), new ItemStack(Blocks.SOUL_SAND), 20000);