Fixes #2434: Set default pickup delay to custom entities.

This commit is contained in:
yueh 2016-10-04 19:18:56 +02:00
parent 2e2bb12671
commit 4cb7a9e6f4
1 changed files with 4 additions and 5 deletions

View File

@ -139,7 +139,7 @@ public final class ItemMaterial extends AEBaseItem implements IStorageComponent,
public MaterialType getTypeByStack( final ItemStack is )
{
MaterialType type = this.dmgToMaterial.get( is.getItemDamage() );
return (type != null) ? type : MaterialType.InvalidType;
return ( type != null ) ? type : MaterialType.InvalidType;
}
@Override
@ -260,7 +260,8 @@ public final class ItemMaterial extends AEBaseItem implements IStorageComponent,
protected void getCheckedSubItems( final Item sameItem, final CreativeTabs creativeTab, final List<ItemStack> itemStacks )
{
final List<MaterialType> types = Arrays.asList( MaterialType.values() );
Collections.sort( types, new Comparator<MaterialType>(){
Collections.sort( types, new Comparator<MaterialType>()
{
@Override
public int compare( final MaterialType o1, final MaterialType o2 )
@ -351,9 +352,7 @@ public final class ItemMaterial extends AEBaseItem implements IStorageComponent,
if( location instanceof EntityItem && eqi instanceof EntityItem )
{
// TODO: Entity Pick up time?
// needs fixing?
// ( (EntityItem) eqi ).setPickupDelay( ( (EntityItem) location ).pick;
( (EntityItem) eqi ).setDefaultPickupDelay();
}
return eqi;