Replaced all instances of Guava's Optional type with Java 8's Optional type, as discussed in #81. (#90)

This commit is contained in:
shartte
2016-08-24 19:06:10 +02:00
committed by Sebastian Hartte
parent c2a239a12f
commit e276aa682f
65 changed files with 306 additions and 468 deletions
+5 -2
View File
@@ -19,6 +19,8 @@
package appeng.core;
import java.util.Optional;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
@@ -67,9 +69,10 @@ public final class CreativeTab extends CreativeTabs
{
for( final IItemDefinition definition : choices )
{
for( final ItemStack definitionStack : definition.maybeStack( 1 ).asSet() )
Optional<ItemStack> maybeIs = definition.maybeStack( 1 );
if( maybeIs.isPresent() )
{
return definitionStack;
return maybeIs.get();
}
}