mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-11 16:07:38 +00:00
Tools in autocrafting (#653)
This commit is contained in:
1 parent
7b43826d05
commit
7ec2ad132e
16 files changed
+324
-105
No files matched your search
@@ -1,5 +1,7 @@
|
||||
package codechicken.nei.recipe.stackinfo;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -55,4 +57,15 @@ public class DefaultStackStringifyHandler implements IStackStringifyHandler {
|
||||
|
||||
return fluidStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<ItemStack> getContainerItem(ItemStack stack) {
|
||||
|
||||
if (stack.getItem().hasContainerItem(stack)) {
|
||||
return Optional.ofNullable(stack.getItem().getContainerItem(stack));
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user