Skip to content
This repository has been archived by the owner on Oct 31, 2021. It is now read-only.

Commit

Permalink
Resolve #1
Browse files Browse the repository at this point in the history
  • Loading branch information
3TUSK committed Sep 29, 2018
1 parent 8e6acd4 commit 2ba9dfe
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/main/java/snownee/cuisine/blocks/BlockChoppingBoard.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package snownee.cuisine.blocks;

import java.util.List;
import java.util.stream.Collectors;

import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
Expand Down Expand Up @@ -249,9 +250,14 @@ public void breakBlock(World worldIn, BlockPos pos, IBlockState state)

public static NonNullList<ItemStack> getSuitableCovers()
{
NonNullList<ItemStack> items = OreUtil.getItemsFromOre("logWood", 1);
items.removeIf(i -> !(i.getItem() instanceof ItemBlock));
return items;
// TODO We probably want to expose the NonNullList constructor that allows custom delegates
List<ItemStack> items = OreUtil.getItemsFromOre("logWood", 1)
.stream()
.filter(i -> i.getItem() instanceof ItemBlock)
.collect(Collectors.toList());
NonNullList<ItemStack> results = NonNullList.create();
results.addAll(items);
return results;
}

@Override
Expand Down

0 comments on commit 2ba9dfe

Please sign in to comment.