From c6b6f1610a323f1fb2267ec7248ca084cff9a759 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 18 Dec 2016 11:29:23 +0100 Subject: [PATCH] Fix the Disenchanting lens deleting books Closes #482 --- .../actuallyadditions/mod/items/lens/LensDisenchanting.java | 2 +- src/main/resources/assets/actuallyadditions/lang/en_US.lang | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 2d802a109..f2dc3b8b4 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 @@ -43,7 +43,7 @@ public class LensDisenchanting extends Lens{ for(EntityItem item : items){ if(item != null && !item.isDead){ ItemStack stack = item.getEntityItem(); - if(StackUtil.isValid(stack)){ + if(StackUtil.isValid(stack) && StackUtil.getStackSize(stack) == 1){ Item stackItem = stack.getItem(); if(stackItem == Items.BOOK || stackItem == Items.ENCHANTED_BOOK){ if(book == null){ diff --git a/src/main/resources/assets/actuallyadditions/lang/en_US.lang b/src/main/resources/assets/actuallyadditions/lang/en_US.lang index 7028b1ef9..40a1bb302 100644 --- a/src/main/resources/assets/actuallyadditions/lang/en_US.lang +++ b/src/main/resources/assets/actuallyadditions/lang/en_US.lang @@ -986,7 +986,7 @@ 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 CF. +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 (more than one of every type won't work!), 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 CF. booklet.actuallyadditions.chapter.lensMining.name=Lens of the Miner booklet.actuallyadditions.chapter.lensMining.text.1=The Lens of the Miner can create ores out of blocks in its sight. When the laser hits a block of stone, it will convert it into different overworld ores, whereas a block of netherrack will be converted into nether ores. Each operation uses CF, however each operation requires additional power depending on the rarity of the ore that is generated.