From c31424944d60de6dfe9a57cdacd627a999d90b0e Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Wed, 20 Jul 2016 11:16:27 +0200 Subject: [PATCH] Lens of Disenchanting recipe and doc --- .../mod/booklet/InitBooklet.java | 2 ++ .../mod/config/values/ConfigCrafting.java | 1 + .../mod/crafting/ItemCrafting.java | 17 +++++++++++++++++ .../mod/items/lens/LensDisenchanting.java | 2 +- .../assets/actuallyadditions/lang/en_US.lang | 3 +++ 5 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java index fc2d3d8e9..9e298dcd9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java @@ -25,6 +25,7 @@ import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues; import de.ellpeck.actuallyadditions.mod.crafting.*; import de.ellpeck.actuallyadditions.mod.gen.OreGen; import de.ellpeck.actuallyadditions.mod.items.InitItems; +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; @@ -96,6 +97,7 @@ public final class InitBooklet{ new BookletChapter("lensColor", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(InitItems.itemColorLens), new PageTextOnly(1), new PageReconstructor(2, LensRecipeHandler.recipeColorLens).setNoText()); new BookletChapter("lensDeath", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(InitItems.itemDamageLens), new PageTextOnly(1), new PageReconstructor(2, LensRecipeHandler.recipeDamageLens).setNoText()); new BookletChapter("lensDetonation", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(InitItems.itemExplosionLens), new PageTextOnly(1), new PageReconstructor(2, LensRecipeHandler.recipeExplosionLens).setNoText()); + new BookletChapter("lensDisenchanting", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(InitItems.itemDisenchantingLens), new PageTextOnly(1).addTextReplacement("", LensDisenchanting.ENERGY_USE), new PageCrafting(2, ItemCrafting.recipeDisenchantingLens).setNoText()).setSpecial(); //No RF Using Blocks new BookletChapter("itemStorage", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockLaserRelayItemWhitelist), new PageTextOnly(1), new PageTextOnly(2), new PageCrafting(3, BlockCrafting.recipeLaserRelayItem).setNoText().setPageStacksWildcard(), new PageCrafting(4, BlockCrafting.recipeLaserRelayItemWhitelist).setNoText().setPageStacksWildcard(), new PageCrafting(5, BlockCrafting.recipeItemInterface).setNoText()).setImportant(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigCrafting.java b/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigCrafting.java index 747f4b384..df753cac2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigCrafting.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigCrafting.java @@ -155,6 +155,7 @@ public enum ConfigCrafting{ LASER_WRENCH("Laser Wrench", ConfigCategories.ITEMS_CRAFTING), CHEST_TO_CRATE_UPGRADE("Chest To Crate Upgrade", ConfigCategories.ITEMS_CRAFTING), + DISENCHANTING_LENS("Disenchanting Lens", ConfigCategories.ITEMS_CRAFTING), CRATE_KEEPER("Crate Keeper", ConfigCategories.ITEMS_CRAFTING), DRILL_CORE("Drill Core", ConfigCategories.ITEMS_CRAFTING), ATOMIC_RECONSTRUCTOR("Atomic Reconstructor", ConfigCategories.BLOCKS_CRAFTING), diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ItemCrafting.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ItemCrafting.java index 57a0c6103..37745879a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ItemCrafting.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ItemCrafting.java @@ -83,6 +83,7 @@ public final class ItemCrafting{ public static IRecipe recipeSpawnerChanger; public static IRecipe recipeFilter; public static IRecipe recipePlayerProbe; + public static IRecipe recipeDisenchantingLens; public static void init(){ @@ -115,6 +116,22 @@ public final class ItemCrafting{ recipeChestToCrateUpgrade = RecipeUtil.lastIRecipe(); } + //Disenchanting Lens + if(ConfigCrafting.DISENCHANTING_LENS.isEnabled()){ + ItemStack crystal = new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemDisenchantingLens), + new ItemStack(Blocks.ENCHANTING_TABLE), + crystal.copy(), + crystal.copy(), + crystal.copy(), + crystal.copy(), + crystal.copy(), + crystal.copy(), + crystal.copy(), + new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()))); + recipeDisenchantingLens = RecipeUtil.lastIRecipe(); + } + //Filter if(ConfigCrafting.FILTER.isEnabled()){ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFilter), diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDisenchanting.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDisenchanting.java index 5b7aa5a6e..5c55f10f2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDisenchanting.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDisenchanting.java @@ -31,7 +31,7 @@ import java.util.Map; public class LensDisenchanting extends Lens{ - private static final int ENERGY_USE = 250000; + public static final int ENERGY_USE = 250000; @Override public boolean invoke(IBlockState hitState, BlockPos hitBlock, IAtomicReconstructor tile){ diff --git a/src/main/resources/assets/actuallyadditions/lang/en_US.lang b/src/main/resources/assets/actuallyadditions/lang/en_US.lang index 0b1e453b0..1bd29c218 100644 --- a/src/main/resources/assets/actuallyadditions/lang/en_US.lang +++ b/src/main/resources/assets/actuallyadditions/lang/en_US.lang @@ -884,6 +884,9 @@ booklet.actuallyadditions.chapter.lensDeath.text.1=The Lens of Certain Dea booklet.actuallyadditions.chapter.lensDetonation.name=Lens of Detonation booklet.actuallyadditions.chapter.lensDetonation.text.1=The Lens of Detonation will create a firey explosion around the block the laser hits. Be careful with this. Seriously. (With this lens, the laser also goes 3 times as far!) +booklet.actuallyadditions.chapter.lensDisenchanting.name=Lens of Disenchanting +booklet.actuallyadditions.chapter.lensDisenchanting.text.1=The Lens of Disenchanting can be used to tranfer a single enchantment from an enchanted item to either a Book or an already Enchanted Book. This can be achieved by throwing the two items in front of the laser, but they have to be together in one blockspace. When they are hit by the laser, the topmost enchantment from the non-book item is removed and added onto the book. However, this uses RF. + booklet.actuallyadditions.chapter.miscDecorStuffsAndThings.name=Some Decor booklet.actuallyadditions.chapter.miscDecorStuffsAndThings.text.1=Sometimes, when you build, you notice there is just not enough decor blocks. Well, we present to you: Ethetic Blocks! These are some quartz-like decor blocks with lovely patterns that can also be converted into Stairs, Slabs and Walls using the usual, well-known recipe patterns.