diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/InitBooklet.java b/src/main/java/ellpeck/actuallyadditions/booklet/InitBooklet.java index b7127da72..5817ed6d9 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/InitBooklet.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/InitBooklet.java @@ -62,7 +62,7 @@ public class InitBooklet{ 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 - new BookletChapter("reconstructorLenses", entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeLens).setNoText(), new PageReconstructor(3, ReconstructorRecipeHandler.recipeColorLens), new PageReconstructor(4, ReconstructorRecipeHandler.colorConversionRecipes).setNoText(), new PageReconstructor(5, ReconstructorRecipeHandler.recipeExplosionLens)).setImportant(); + new BookletChapter("reconstructorLenses", entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeLens).setNoText(), new PageReconstructor(3, ReconstructorRecipeHandler.recipeColorLens), new PageReconstructor(4, ReconstructorRecipeHandler.colorConversionRecipes).setNoText(), new PageReconstructor(5, ReconstructorRecipeHandler.recipeExplosionLens), new PageReconstructor(6, ReconstructorRecipeHandler.recipeDamageLens)).setImportant(); new BookletChapter("miscDecorStuffsAndThings", entryMisc, new ItemStack(InitBlocks.blockTestifiBucksGreenWall), new PageTextOnly(1), new PageReconstructor(2, ReconstructorRecipeHandler.recipeWhiteWall).setNoText(), new PageReconstructor(3, ReconstructorRecipeHandler.recipeGreenWall).setNoText()); 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("", OreGen.QUARTZ_MIN).addTextReplacement("", OreGen.QUARTZ_MAX), 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()); diff --git a/src/main/java/ellpeck/actuallyadditions/communication/InterModCommunications.java b/src/main/java/ellpeck/actuallyadditions/communication/InterModCommunications.java index ce647a5d5..3765dde45 100644 --- a/src/main/java/ellpeck/actuallyadditions/communication/InterModCommunications.java +++ b/src/main/java/ellpeck/actuallyadditions/communication/InterModCommunications.java @@ -112,7 +112,7 @@ public class InterModCommunications{ if(ReconstructorRecipeHandler.LensType.values().length > lensType && input != null && output != null){ ReconstructorRecipeHandler.LensType type = ReconstructorRecipeHandler.LensType.values()[lensType]; - if(type.canAddRecipesFor){ + if(type.hasRecipes){ ReconstructorRecipeHandler.addRecipe(input, output, energyUse, type); ModUtil.LOGGER.info("Reconstructor Recipe that was sent from Mod "+message.getSender()+" has been registered successfully: "+input+" -> "+output+" @ "+energyUse+" with LensType "+lensType); } diff --git a/src/main/java/ellpeck/actuallyadditions/creative/CreativeTab.java b/src/main/java/ellpeck/actuallyadditions/creative/CreativeTab.java index 62c6edbb0..8de49d0ca 100644 --- a/src/main/java/ellpeck/actuallyadditions/creative/CreativeTab.java +++ b/src/main/java/ellpeck/actuallyadditions/creative/CreativeTab.java @@ -112,6 +112,7 @@ public class CreativeTab extends CreativeTabs{ add(InitItems.itemColorLens); add(InitItems.itemExplosionLens); + add(InitItems.itemDamageLens); add(InitItems.itemLaserWrench); add(InitItems.itemChestToCrateUpgrade); diff --git a/src/main/java/ellpeck/actuallyadditions/items/InitItems.java b/src/main/java/ellpeck/actuallyadditions/items/InitItems.java index ff40f2588..e83ff86e8 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/InitItems.java +++ b/src/main/java/ellpeck/actuallyadditions/items/InitItems.java @@ -132,6 +132,7 @@ public class InitItems{ public static Item itemCrystal; public static Item itemColorLens; public static Item itemExplosionLens; + public static Item itemDamageLens; public static void init(){ ModUtil.LOGGER.info("Initializing Items..."); @@ -142,6 +143,9 @@ public class InitItems{ itemExplosionLens = new ItemLens("itemExplosionLens", ReconstructorRecipeHandler.LensType.DETONATION); ItemUtil.register(itemExplosionLens); + itemDamageLens = new ItemLens("itemDamageLens", ReconstructorRecipeHandler.LensType.JUST_DAMAGE); + ItemUtil.register(itemDamageLens); + itemCrystal = new ItemCrystal(); ItemUtil.register(itemCrystal); diff --git a/src/main/java/ellpeck/actuallyadditions/ore/InitOreDict.java b/src/main/java/ellpeck/actuallyadditions/ore/InitOreDict.java index 1e12b6b2f..fba39b811 100644 --- a/src/main/java/ellpeck/actuallyadditions/ore/InitOreDict.java +++ b/src/main/java/ellpeck/actuallyadditions/ore/InitOreDict.java @@ -118,6 +118,7 @@ public class InitOreDict{ addOre(InitItems.itemColorLens, "itemColorLens"); addOre(InitItems.itemExplosionLens, "itemExplosionLens"); + addOre(InitItems.itemDamageLens, "itemDamageLens"); addOre(InitItems.itemMisc, TheMiscItems.LENS.ordinal(), "itemLens"); } diff --git a/src/main/java/ellpeck/actuallyadditions/recipe/ReconstructorRecipeHandler.java b/src/main/java/ellpeck/actuallyadditions/recipe/ReconstructorRecipeHandler.java index 01a502cc0..7e0d38445 100644 --- a/src/main/java/ellpeck/actuallyadditions/recipe/ReconstructorRecipeHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/recipe/ReconstructorRecipeHandler.java @@ -32,6 +32,7 @@ public class ReconstructorRecipeHandler{ public static Recipe recipeGreenWall; public static Recipe recipeWhiteWall; public static Recipe recipeExplosionLens; + public static Recipe recipeDamageLens; public static ArrayList colorConversionRecipes = new ArrayList(); public static void init(){ @@ -68,7 +69,9 @@ public class ReconstructorRecipeHandler{ recipeColorLens = Util.GetRecipes.lastReconstructorRecipe(); addRecipe("itemColorLens", "itemExplosionLens", 5000); recipeExplosionLens = Util.GetRecipes.lastReconstructorRecipe(); - addRecipe("itemExplosionLens", "itemLens", 5000); + addRecipe("itemExplosionLens", "itemDamageLens", 5000); + recipeDamageLens = Util.GetRecipes.lastReconstructorRecipe(); + addRecipe("itemDamageLens", "itemLens", 5000); //Misc if(ConfigCrafting.RECONSTRUCTOR_MISC.isEnabled()){ @@ -106,7 +109,7 @@ public class ReconstructorRecipeHandler{ } public static void addRecipe(String input, String output, int energyUse, LensType type){ - if(type.canAddRecipesFor){ + if(type.hasRecipes){ recipes.add(new Recipe(input, output, energyUse, type)); } } @@ -153,13 +156,14 @@ public class ReconstructorRecipeHandler{ NONE(true), COLOR(true), - DETONATION(false); + DETONATION(false), + JUST_DAMAGE(false); public ItemStack lens; - public boolean canAddRecipesFor; + public boolean hasRecipes; - LensType(boolean canAddRecipesFor){ - this.canAddRecipesFor = canAddRecipesFor; + LensType(boolean hasRecipes){ + this.hasRecipes = hasRecipes; } public float[] getColor(){ @@ -170,6 +174,9 @@ public class ReconstructorRecipeHandler{ else if(this == DETONATION){ return new float[]{158F/255F, 43F/255F, 39F/255F}; } + else if(this == JUST_DAMAGE){ + return new float[]{188F/255F, 222F/255F, 1F}; + } else return new float[]{27F/255F, 109F/255F, 1F}; } @@ -178,7 +185,7 @@ public class ReconstructorRecipeHandler{ } public int getDistance(){ - return this == DETONATION ? 30 : 10; + return this == DETONATION ? 30 : (this == JUST_DAMAGE ? 15 : 10); } } diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityAtomicReconstructor.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityAtomicReconstructor.java index 57401af0a..04fce6df1 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityAtomicReconstructor.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityAtomicReconstructor.java @@ -62,7 +62,9 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple int distance = currentLens.getDistance(); for(int i = 0; i < distance; i++){ WorldPos hitBlock = WorldUtil.getCoordsFromSide(sideToManipulate, worldObj, xCoord, yCoord, zCoord, i); - this.damagePlayer(hitBlock.getX(), hitBlock.getY(), hitBlock.getZ()); + + float damage = currentLens == ReconstructorRecipeHandler.LensType.JUST_DAMAGE ? 20F : 5F; + this.damagePlayer(hitBlock.getX(), hitBlock.getY(), hitBlock.getZ(), damage); if(hitBlock != null){ if(!hitBlock.getBlock().isAir(hitBlock.getWorld(), hitBlock.getX(), hitBlock.getY(), hitBlock.getZ())){ @@ -77,7 +79,7 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple } } //Conversion Recipes - else{ + else if(currentLens.hasRecipes){ int range = 2; //Converting the Blocks @@ -164,10 +166,10 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple } @SuppressWarnings("unchecked") - public void damagePlayer(int x, int y, int z){ + public void damagePlayer(int x, int y, int z, float damage){ ArrayList entities = (ArrayList)worldObj.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(x, y, z, x+1, y+1, z+1)); for(EntityLivingBase entity : entities){ - entity.attackEntityFrom(DamageSources.DAMAGE_ATOMIC_RECONSTRUCTOR, 16F); + entity.attackEntityFrom(DamageSources.DAMAGE_ATOMIC_RECONSTRUCTOR, damage); } } diff --git a/src/main/resources/assets/actuallyadditions/lang/en_US.lang b/src/main/resources/assets/actuallyadditions/lang/en_US.lang index 182be9614..bee83c6cb 100644 --- a/src/main/resources/assets/actuallyadditions/lang/en_US.lang +++ b/src/main/resources/assets/actuallyadditions/lang/en_US.lang @@ -310,6 +310,7 @@ item.actuallyadditions.itemCrystalWhite.name=Enori Crystal item.actuallyadditions.itemMiscLens.name=Lens item.actuallyadditions.itemColorLens.name=Lens of Color item.actuallyadditions.itemExplosionLens.name=Lens of Detonation +item.actuallyadditions.itemDamageLens.name=Lens of Certain Death #Tooltips tooltip.actuallyadditions.onSuffix.desc=On @@ -618,7 +619,8 @@ booklet.actuallyadditions.chapter.bookStand.text.2=Stand on it booklet.actuallyadditions.chapter.reconstructorLenses.name=Reconstructor Lenses booklet.actuallyadditions.chapter.reconstructorLenses.text.1=The Atomic Reconstructor, by default, can only convert some blocks. This can be changed, however, with Lenses. They can be, once crafted, attached to the Reconstructor via right-clicking the Reconstructor with them in hand. To remove them, right-click it with an empty hand. Lenses have lots of different features and uses, as you can see on the following pages. booklet.actuallyadditions.chapter.reconstructorLenses.text.3=The Lens of Color can mainly be used to change the colors of Wool, Stained Clay, Stained Glass and Dye, as you can see on the following pages. It has some other uses, too, though. -booklet.actuallyadditions.chapter.reconstructorLenses.text.4=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.reconstructorLenses.text.5=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.reconstructorLenses.text.6=The Lens of Certain Death will, instead of converting or exploding blocks, do nothing to the environment, but deal lots of damage, enough, in fact, to kill a player in a single hit. 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. \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/textures/items/itemDamageLens.png b/src/main/resources/assets/actuallyadditions/textures/items/itemDamageLens.png new file mode 100644 index 000000000..ebe2a9186 Binary files /dev/null and b/src/main/resources/assets/actuallyadditions/textures/items/itemDamageLens.png differ