mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 10:55:17 +00:00
Fix mana clip attaching destroying lenses after recipe preview
This commit is contained in:
1 parent
f49e3bdb37
commit
ef982f1e9e
1 file changed
+8
-1
@@ -15,6 +15,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipeSerializer;
|
||||
import net.minecraft.item.crafting.SpecialRecipe;
|
||||
import net.minecraft.item.crafting.SpecialRecipeSerializer;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.common.item.ItemManaGun;
|
||||
@@ -65,8 +66,8 @@ public class ManaGunClipRecipe extends SpecialRecipe {
|
||||
return ItemStack.EMPTY;
|
||||
|
||||
ItemStack lens = ItemManaGun.getLens(gun);
|
||||
ItemManaGun.setLens(gun, ItemStack.EMPTY);
|
||||
ItemStack gunCopy = gun.copy();
|
||||
ItemManaGun.setLens(gunCopy, ItemStack.EMPTY);
|
||||
ItemManaGun.setClip(gunCopy, true);
|
||||
ItemManaGun.setLensAtPos(gunCopy, lens, 0);
|
||||
return gunCopy;
|
||||
@@ -77,6 +78,12 @@ public class ManaGunClipRecipe extends SpecialRecipe {
|
||||
return width * height >= 2;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public NonNullList<ItemStack> getRemainingItems(CraftingInventory inv) {
|
||||
return NonNullList.withSize(inv.getSizeInventory(), ItemStack.EMPTY);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeSerializer<?> getSerializer() {
|
||||
|
||||
Reference in new issue
Block a user