API cleanups (#3155)

* Remove obsolete api and fix some warning
* Move MEMonitorHandler to internal code and fix some warnings
* Rename exceptions to conform to naming scheme
This commit is contained in:
fscan
2017-10-14 14:15:28 +02:00
committed by yueh
parent 905dd6c888
commit 4f07b63b13
77 changed files with 298 additions and 398 deletions
@@ -55,7 +55,6 @@ public abstract class AEBaseItem extends Item
}
@Override
@SuppressWarnings( "unchecked" )
public final void getSubItems( final CreativeTabs creativeTab, final NonNullList<ItemStack> itemStacks )
{
if( this.isInCreativeTab( creativeTab ) )
@@ -33,12 +33,12 @@ import appeng.api.implementations.guiobjects.IPortableCell;
import appeng.api.implementations.items.IAEItemPowerStorage;
import appeng.api.storage.IMEMonitor;
import appeng.api.storage.IStorageChannel;
import appeng.api.storage.MEMonitorHandler;
import appeng.api.storage.channels.IItemStorageChannel;
import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.data.IAEStack;
import appeng.api.util.IConfigManager;
import appeng.container.interfaces.IInventorySlotAware;
import appeng.me.helpers.MEMonitorHandler;
import appeng.me.storage.CellInventory;
import appeng.util.ConfigManager;
import appeng.util.IConfigManagerHost;
@@ -45,7 +45,7 @@ import net.minecraft.world.World;
import net.minecraftforge.common.property.IExtendedBlockState;
import appeng.api.AEApi;
import appeng.api.exceptions.MissingDefinition;
import appeng.api.exceptions.MissingDefinitionException;
import appeng.api.parts.IAlphaPassItem;
import appeng.api.util.AEPartLocation;
import appeng.core.AELog;
@@ -318,7 +318,7 @@ public class ItemFacade extends AEBaseItem implements IFacadeItem, IAlphaPassIte
.items()
.facade()
.maybeStack( 1 )
.orElseThrow( () -> new MissingDefinition( "Tried to create a facade, while facades are being deactivated." ) );
.orElseThrow( () -> new MissingDefinitionException( "Tried to create a facade, while facades are being deactivated." ) );
// Convert back to a registry name...
Item item = Item.REGISTRY.getObjectById( ids[0] );
@@ -39,7 +39,7 @@ import net.minecraftforge.items.IItemHandler;
import appeng.api.AEApi;
import appeng.api.config.FuzzyMode;
import appeng.api.config.IncludeExclude;
import appeng.api.exceptions.MissingDefinition;
import appeng.api.exceptions.MissingDefinitionException;
import appeng.api.implementations.items.IItemGroup;
import appeng.api.implementations.items.IStorageCell;
import appeng.api.implementations.items.IUpgradeModule;
@@ -303,7 +303,7 @@ public final class ItemBasicStorageCell extends AEBaseItem implements IStorageCe
.materials()
.emptyStorageCell()
.maybeStack( 1 )
.orElseThrow( () -> new MissingDefinition( "Tried to use empty storage cells while basic storage cells are defined." ) );
.orElseThrow( () -> new MissingDefinitionException( "Tried to use empty storage cells while basic storage cells are defined." ) );
}
@Override