diff --git a/src/api/java/appeng/api/IAppEngApi.java b/src/api/java/appeng/api/IAppEngApi.java index 75d2914e8..69e39519a 100644 --- a/src/api/java/appeng/api/IAppEngApi.java +++ b/src/api/java/appeng/api/IAppEngApi.java @@ -26,8 +26,8 @@ package appeng.api; import appeng.api.definitions.IDefinitions; import appeng.api.features.IRegistryContainer; -import appeng.api.networking.IGridNode; import appeng.api.networking.IGridHelper; +import appeng.api.networking.IGridNode; import appeng.api.parts.IPartHelper; import appeng.api.storage.IStorageHelper; diff --git a/src/api/java/appeng/api/client/BakingPipeline.java b/src/api/java/appeng/api/client/BakingPipeline.java deleted file mode 100644 index 37468d116..000000000 --- a/src/api/java/appeng/api/client/BakingPipeline.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * The MIT License (MIT) - * - * Copyright (c) 2013 AlgorithmX2 - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -package appeng.api.client; - - -import java.util.List; - -import com.google.common.collect.ImmutableList; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.client.renderer.block.model.IBakedModel; -import net.minecraft.util.EnumFacing; - -/** - * TODO: Needs to be moved to an internal class. API is only allowed to contain interfaces and/or data. - * - * @deprecated - */ -@Deprecated -public class BakingPipeline implements BakingPipelineElement -{ - - private final ImmutableList> pipeline; - - public BakingPipeline( BakingPipelineElement... pipeline ) - { - this.pipeline = ImmutableList.copyOf( pipeline ); - } - - /** - * TODO: fix generics - */ - @Override - public List pipe( List things, IBakedModel parent, IBlockState state, EnumFacing side, long rand ) - { - for( BakingPipelineElement pipe : this.pipeline ) - { - things = pipe.pipe( things, parent, state, side, rand ); - } - return things; - } - -} diff --git a/src/api/java/appeng/api/client/BakingPipelineElement.java b/src/api/java/appeng/api/client/BakingPipelineElement.java deleted file mode 100644 index b3ef084e4..000000000 --- a/src/api/java/appeng/api/client/BakingPipelineElement.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * The MIT License (MIT) - * - * Copyright (c) 2013 AlgorithmX2 - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -package appeng.api.client; - - -import java.util.List; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.client.renderer.block.model.IBakedModel; -import net.minecraft.util.EnumFacing; - - -public interface BakingPipelineElement -{ - - public List pipe( List elements, IBakedModel parent, IBlockState state, EnumFacing side, long rand ); - -} diff --git a/src/api/java/appeng/api/exceptions/CoreInaccessibleException.java b/src/api/java/appeng/api/exceptions/CoreInaccessibleException.java index b8750f915..aab467db0 100644 --- a/src/api/java/appeng/api/exceptions/CoreInaccessibleException.java +++ b/src/api/java/appeng/api/exceptions/CoreInaccessibleException.java @@ -21,6 +21,8 @@ package appeng.api.exceptions; public class CoreInaccessibleException extends RuntimeException { + private static final long serialVersionUID = -7434641554655517242L; + public CoreInaccessibleException( final String message ) { super( message ); diff --git a/src/api/java/appeng/api/exceptions/ExistingConnectionException.java b/src/api/java/appeng/api/exceptions/ExistingConnectionException.java index 7c5fe25b6..f9ee7a711 100644 --- a/src/api/java/appeng/api/exceptions/ExistingConnectionException.java +++ b/src/api/java/appeng/api/exceptions/ExistingConnectionException.java @@ -37,7 +37,7 @@ import appeng.api.networking.IGridNode; * @version rv3 * @since rv3 */ -public class ExistingConnectionException extends FailedConnection +public class ExistingConnectionException extends FailedConnectionException { private static final long serialVersionUID = 2975450379720353182L; diff --git a/src/api/java/appeng/api/exceptions/FailedConnection.java b/src/api/java/appeng/api/exceptions/FailedConnectionException.java similarity index 91% rename from src/api/java/appeng/api/exceptions/FailedConnection.java rename to src/api/java/appeng/api/exceptions/FailedConnectionException.java index de1bbc713..9f6028652 100644 --- a/src/api/java/appeng/api/exceptions/FailedConnection.java +++ b/src/api/java/appeng/api/exceptions/FailedConnectionException.java @@ -40,16 +40,16 @@ import appeng.api.networking.IGridNode; * @version rv3 * @since rv0 */ -public class FailedConnection extends Exception +public class FailedConnectionException extends Exception { private static final long serialVersionUID = -2544208090248293753L; - public FailedConnection() + public FailedConnectionException() { } - public FailedConnection( String message ) + public FailedConnectionException( String message ) { super( message ); } diff --git a/src/api/java/appeng/api/exceptions/MissingDefinition.java b/src/api/java/appeng/api/exceptions/MissingDefinitionException.java similarity index 81% rename from src/api/java/appeng/api/exceptions/MissingDefinition.java rename to src/api/java/appeng/api/exceptions/MissingDefinitionException.java index 0280c208a..ce1f062a3 100644 --- a/src/api/java/appeng/api/exceptions/MissingDefinition.java +++ b/src/api/java/appeng/api/exceptions/MissingDefinitionException.java @@ -19,9 +19,11 @@ package appeng.api.exceptions; -public class MissingDefinition extends RuntimeException +public class MissingDefinitionException extends RuntimeException { - public MissingDefinition( final String message ) + private static final long serialVersionUID = -6547396584255825761L; + + public MissingDefinitionException( final String message ) { super( message ); } diff --git a/src/api/java/appeng/api/exceptions/MissingIngredientError.java b/src/api/java/appeng/api/exceptions/MissingIngredientException.java similarity index 91% rename from src/api/java/appeng/api/exceptions/MissingIngredientError.java rename to src/api/java/appeng/api/exceptions/MissingIngredientException.java index 81fe40d37..bcad43754 100644 --- a/src/api/java/appeng/api/exceptions/MissingIngredientError.java +++ b/src/api/java/appeng/api/exceptions/MissingIngredientException.java @@ -24,12 +24,12 @@ package appeng.api.exceptions; -public class MissingIngredientError extends Exception +public class MissingIngredientException extends Exception { private static final long serialVersionUID = -998858343831371697L; - public MissingIngredientError( final String n ) + public MissingIngredientException( final String n ) { super( n ); } diff --git a/src/api/java/appeng/api/exceptions/ModNotInstalled.java b/src/api/java/appeng/api/exceptions/ModNotInstalledException.java similarity index 92% rename from src/api/java/appeng/api/exceptions/ModNotInstalled.java rename to src/api/java/appeng/api/exceptions/ModNotInstalledException.java index a3c5eb056..1e7de1a01 100644 --- a/src/api/java/appeng/api/exceptions/ModNotInstalled.java +++ b/src/api/java/appeng/api/exceptions/ModNotInstalledException.java @@ -24,12 +24,12 @@ package appeng.api.exceptions; -public class ModNotInstalled extends Exception +public class ModNotInstalledException extends Exception { private static final long serialVersionUID = -9052435206368425494L; - public ModNotInstalled( final String t ) + public ModNotInstalledException( final String t ) { super( t ); } diff --git a/src/api/java/appeng/api/exceptions/NullNodeConnectionException.java b/src/api/java/appeng/api/exceptions/NullNodeConnectionException.java index 8410fc7fc..1ed276169 100644 --- a/src/api/java/appeng/api/exceptions/NullNodeConnectionException.java +++ b/src/api/java/appeng/api/exceptions/NullNodeConnectionException.java @@ -34,7 +34,7 @@ package appeng.api.exceptions; * @version rv3 * @since rv3 */ -public class NullNodeConnectionException extends FailedConnection +public class NullNodeConnectionException extends FailedConnectionException { private static final long serialVersionUID = -2143719383495321764L; diff --git a/src/api/java/appeng/api/exceptions/RecipeError.java b/src/api/java/appeng/api/exceptions/RecipeException.java similarity index 93% rename from src/api/java/appeng/api/exceptions/RecipeError.java rename to src/api/java/appeng/api/exceptions/RecipeException.java index d4d6f90a4..841bcd74c 100644 --- a/src/api/java/appeng/api/exceptions/RecipeError.java +++ b/src/api/java/appeng/api/exceptions/RecipeException.java @@ -24,12 +24,12 @@ package appeng.api.exceptions; -public class RecipeError extends Exception +public class RecipeException extends Exception { private static final long serialVersionUID = -6602870588617670262L; - public RecipeError( final String n ) + public RecipeException( final String n ) { super( n ); } diff --git a/src/api/java/appeng/api/exceptions/RegistrationError.java b/src/api/java/appeng/api/exceptions/RegistrationException.java similarity index 92% rename from src/api/java/appeng/api/exceptions/RegistrationError.java rename to src/api/java/appeng/api/exceptions/RegistrationException.java index 205df3e9a..0209f1214 100644 --- a/src/api/java/appeng/api/exceptions/RegistrationError.java +++ b/src/api/java/appeng/api/exceptions/RegistrationException.java @@ -24,12 +24,12 @@ package appeng.api.exceptions; -public class RegistrationError extends Exception +public class RegistrationException extends Exception { private static final long serialVersionUID = -6602870588617670263L; - public RegistrationError( final String n ) + public RegistrationException( final String n ) { super( n ); } diff --git a/src/api/java/appeng/api/exceptions/SecurityConnectionException.java b/src/api/java/appeng/api/exceptions/SecurityConnectionException.java index d21044e83..680ea7dc1 100644 --- a/src/api/java/appeng/api/exceptions/SecurityConnectionException.java +++ b/src/api/java/appeng/api/exceptions/SecurityConnectionException.java @@ -34,7 +34,7 @@ package appeng.api.exceptions; * @version rv3 * @since rv3 */ -public class SecurityConnectionException extends FailedConnection +public class SecurityConnectionException extends FailedConnectionException { private static final long serialVersionUID = 5048714900434215426L; private static final String DEFAULT_MESSAGE = "Connection failed due to different security realms."; diff --git a/src/api/java/appeng/api/networking/IGridHelper.java b/src/api/java/appeng/api/networking/IGridHelper.java index dc37698ec..40a766909 100644 --- a/src/api/java/appeng/api/networking/IGridHelper.java +++ b/src/api/java/appeng/api/networking/IGridHelper.java @@ -24,7 +24,7 @@ package appeng.api.networking; -import appeng.api.exceptions.FailedConnection; +import appeng.api.exceptions.FailedConnectionException; /** @@ -57,8 +57,8 @@ public interface IGridHelper * @param a to be connected gridnode * @param b to be connected gridnode * - * @throws appeng.api.exceptions.FailedConnection + * @throws appeng.api.exceptions.FailedConnectionException */ - IGridConnection createGridConnection( IGridNode a, IGridNode b ) throws FailedConnection; + IGridConnection createGridConnection( IGridNode a, IGridNode b ) throws FailedConnectionException; } \ No newline at end of file diff --git a/src/api/java/appeng/api/networking/storage/IBaseMonitor.java b/src/api/java/appeng/api/networking/storage/IBaseMonitor.java index 2d906ee32..054102e73 100644 --- a/src/api/java/appeng/api/networking/storage/IBaseMonitor.java +++ b/src/api/java/appeng/api/networking/storage/IBaseMonitor.java @@ -28,7 +28,7 @@ import appeng.api.storage.IMEMonitorHandlerReceiver; import appeng.api.storage.data.IAEStack; -public interface IBaseMonitor +public interface IBaseMonitor> { /** diff --git a/src/api/java/appeng/api/networking/storage/IStackWatcherHost.java b/src/api/java/appeng/api/networking/storage/IStackWatcherHost.java index 74f37697d..adcd12f2e 100644 --- a/src/api/java/appeng/api/networking/storage/IStackWatcherHost.java +++ b/src/api/java/appeng/api/networking/storage/IStackWatcherHost.java @@ -50,5 +50,5 @@ public interface IStackWatcherHost * @param src action source * @param chan storage channel */ - void onStackChange( IItemList o, IAEStack fullStack, IAEStack diffStack, IActionSource src, IStorageChannel chan ); + void onStackChange( IItemList o, IAEStack fullStack, IAEStack diffStack, IActionSource src, IStorageChannel chan ); } diff --git a/src/api/java/appeng/api/networking/storage/IStorageGrid.java b/src/api/java/appeng/api/networking/storage/IStorageGrid.java index 5e3880c99..cec8900f8 100644 --- a/src/api/java/appeng/api/networking/storage/IStorageGrid.java +++ b/src/api/java/appeng/api/networking/storage/IStorageGrid.java @@ -29,8 +29,8 @@ import appeng.api.networking.IGridHost; import appeng.api.networking.security.IActionSource; import appeng.api.storage.ICellContainer; import appeng.api.storage.ICellProvider; -import appeng.api.storage.IStorageMonitorable; import appeng.api.storage.IStorageChannel; +import appeng.api.storage.IStorageMonitorable; import appeng.api.storage.data.IAEStack; @@ -50,7 +50,7 @@ public interface IStorageGrid extends IGridCache, IStorageMonitorable * * @param input injected items */ - void postAlterationOfStoredItems( IStorageChannel chan, Iterable input, IActionSource src ); + void postAlterationOfStoredItems( IStorageChannel chan, Iterable> input, IActionSource src ); /** * Used to add a cell provider to the storage system diff --git a/src/api/java/appeng/api/recipes/ICraftHandler.java b/src/api/java/appeng/api/recipes/ICraftHandler.java index bd94b2dad..c76924931 100644 --- a/src/api/java/appeng/api/recipes/ICraftHandler.java +++ b/src/api/java/appeng/api/recipes/ICraftHandler.java @@ -26,9 +26,9 @@ package appeng.api.recipes; import java.util.List; -import appeng.api.exceptions.MissingIngredientError; -import appeng.api.exceptions.RecipeError; -import appeng.api.exceptions.RegistrationError; +import appeng.api.exceptions.MissingIngredientException; +import appeng.api.exceptions.RecipeException; +import appeng.api.exceptions.RegistrationException; public interface ICraftHandler @@ -40,15 +40,15 @@ public interface ICraftHandler * @param input parsed inputs * @param output parsed outputs * - * @throws RecipeError + * @throws RecipeException */ - void setup( List> input, List> output ) throws RecipeError; + void setup( List> input, List> output ) throws RecipeException; /** * called when all recipes are parsed, and your required to register your recipe. * - * @throws RegistrationError - * @throws MissingIngredientError + * @throws RegistrationException + * @throws MissingIngredientException */ - void register() throws RegistrationError, MissingIngredientError; + void register() throws RegistrationException, MissingIngredientException; } diff --git a/src/api/java/appeng/api/recipes/IIngredient.java b/src/api/java/appeng/api/recipes/IIngredient.java index 2878022d3..9c114d30d 100644 --- a/src/api/java/appeng/api/recipes/IIngredient.java +++ b/src/api/java/appeng/api/recipes/IIngredient.java @@ -26,8 +26,8 @@ package appeng.api.recipes; import net.minecraft.item.ItemStack; -import appeng.api.exceptions.MissingIngredientError; -import appeng.api.exceptions.RegistrationError; +import appeng.api.exceptions.MissingIngredientException; +import appeng.api.exceptions.RegistrationException; public interface IIngredient @@ -39,10 +39,10 @@ public interface IIngredient * * @return a single ItemStack for the recipe handler. * - * @throws RegistrationError - * @throws MissingIngredientError + * @throws RegistrationException + * @throws MissingIngredientException */ - ItemStack getItemStack() throws RegistrationError, MissingIngredientError; + ItemStack getItemStack() throws RegistrationException, MissingIngredientException; /** * Acquire a list of all the input stacks for the current recipe, this is for handlers that support @@ -50,10 +50,10 @@ public interface IIngredient * * @return an array of ItemStacks for the recipe handler. * - * @throws RegistrationError - * @throws MissingIngredientError + * @throws RegistrationException + * @throws MissingIngredientException */ - ItemStack[] getItemStackSet() throws RegistrationError, MissingIngredientError; + ItemStack[] getItemStackSet() throws RegistrationException, MissingIngredientException; /** * If you wish to support air, you must test before getting the ItemStack, or ItemStackSet @@ -85,8 +85,8 @@ public interface IIngredient /** * Bakes the lists in for faster runtime look-ups. * - * @throws MissingIngredientError - * @throws RegistrationError + * @throws MissingIngredientException + * @throws RegistrationException */ - void bake() throws RegistrationError, MissingIngredientError; + void bake() throws RegistrationException, MissingIngredientException; } diff --git a/src/api/java/appeng/api/storage/ICellProvider.java b/src/api/java/appeng/api/storage/ICellProvider.java index 29f54500f..4188ac705 100644 --- a/src/api/java/appeng/api/storage/ICellProvider.java +++ b/src/api/java/appeng/api/storage/ICellProvider.java @@ -42,7 +42,7 @@ public interface ICellProvider * * @return a valid list of handlers, NEVER NULL */ - List getCellArray( IStorageChannel channel ); + List getCellArray( IStorageChannel channel ); /** * the storage's priority. diff --git a/src/api/java/appeng/api/storage/IMEMonitorHandlerReceiver.java b/src/api/java/appeng/api/storage/IMEMonitorHandlerReceiver.java index 8e2b574d5..c7b0d88a7 100644 --- a/src/api/java/appeng/api/storage/IMEMonitorHandlerReceiver.java +++ b/src/api/java/appeng/api/storage/IMEMonitorHandlerReceiver.java @@ -29,7 +29,7 @@ import appeng.api.networking.storage.IBaseMonitor; import appeng.api.storage.data.IAEStack; -public interface IMEMonitorHandlerReceiver +public interface IMEMonitorHandlerReceiver> { /** @@ -46,7 +46,7 @@ public interface IMEMonitorHandlerReceiver * * @param change done change */ - void postChange( IBaseMonitor monitor, Iterable change, IActionSource actionSource ); + void postChange( IBaseMonitor monitor, Iterable change, IActionSource actionSource ); /** * called when the list updates its contents, this is mostly for handling power events. diff --git a/src/api/java/appeng/api/storage/ISaveProvider.java b/src/api/java/appeng/api/storage/ISaveProvider.java index 7c046826c..78ce5907c 100644 --- a/src/api/java/appeng/api/storage/ISaveProvider.java +++ b/src/api/java/appeng/api/storage/ISaveProvider.java @@ -27,5 +27,5 @@ package appeng.api.storage; public interface ISaveProvider { - void saveChanges( IMEInventory cellInventory ); + void saveChanges( IMEInventory cellInventory ); } diff --git a/src/api/java/appeng/api/storage/data/IAEStack.java b/src/api/java/appeng/api/storage/data/IAEStack.java index 3c337f8f6..043655292 100644 --- a/src/api/java/appeng/api/storage/data/IAEStack.java +++ b/src/api/java/appeng/api/storage/data/IAEStack.java @@ -35,7 +35,7 @@ import appeng.api.config.FuzzyMode; import appeng.api.storage.IStorageChannel; -public interface IAEStack> +public interface IAEStack> { /** @@ -43,7 +43,7 @@ public interface IAEStack> * * @param is added item */ - void add( StackType is ); + void add( T is ); /** * number of items in the stack. @@ -57,7 +57,7 @@ public interface IAEStack> * * @param stackSize , ItemStack.stackSize = N */ - StackType setStackSize( long stackSize ); + T setStackSize( long stackSize ); /** * Same as getStackSize, but for requestable items. ( LP ) @@ -71,7 +71,7 @@ public interface IAEStack> * * @return basically itemStack.stackSize = N but for setStackSize items. */ - StackType setCountRequestable( long countRequestable ); + T setCountRequestable( long countRequestable ); /** * true, if the item can be crafted. @@ -85,12 +85,12 @@ public interface IAEStack> * * @param isCraftable can item be crafted */ - StackType setCraftable( boolean isCraftable ); + T setCraftable( boolean isCraftable ); /** * clears, requestable, craftable, and stack sizes. */ - StackType reset(); + T reset(); /** * returns true, if the item can be crafted, requested, or extracted. @@ -174,14 +174,14 @@ public interface IAEStack> * * @return a new Stack, which is copied from the original. */ - StackType copy(); + T copy(); /** * create an empty stack. * * @return a new stack, which represents an empty copy of the original. */ - StackType empty(); + T empty(); /** * @return true if the stack is a {@link IAEItemStack} @@ -196,7 +196,7 @@ public interface IAEStack> /** * @return ITEM or FLUID */ - IStorageChannel getChannel(); + IStorageChannel getChannel(); /** * Returns itemstack for display and similar purposes. Always has a count of 1. diff --git a/src/main/java/appeng/block/AEBaseBlock.java b/src/main/java/appeng/block/AEBaseBlock.java index 48bb9b8d6..e7fb5b15c 100644 --- a/src/main/java/appeng/block/AEBaseBlock.java +++ b/src/main/java/appeng/block/AEBaseBlock.java @@ -100,14 +100,12 @@ public abstract class AEBaseBlock extends Block return new BlockStateContainer( this, this.getAEStates() ); } - @SuppressWarnings( "deprecation" ) @Override public final boolean isNormalCube( IBlockState state ) { return this.isFullSize() && this.isOpaque(); } - @SuppressWarnings( "deprecation" ) @Override public AxisAlignedBB getBoundingBox( IBlockState state, IBlockAccess source, BlockPos pos ) { @@ -226,7 +224,6 @@ public abstract class AEBaseBlock extends Block return super.getSelectedBoundingBox( state, w, pos ); } - @SuppressWarnings( "deprecation" ) @Override public final boolean isOpaqueCube( IBlockState state ) { @@ -281,14 +278,12 @@ public abstract class AEBaseBlock extends Block return super.collisionRayTrace( state, w, pos, a, b ); } - @SuppressWarnings( "deprecation" ) @Override public boolean hasComparatorInputOverride( IBlockState state ) { return this.isInventory(); } - @SuppressWarnings( "deprecation" ) @Override public int getComparatorInputOverride( IBlockState state, final World worldIn, final BlockPos pos ) { diff --git a/src/main/java/appeng/block/AEBaseItemBlock.java b/src/main/java/appeng/block/AEBaseItemBlock.java index bbd7c8c88..8062cd01d 100644 --- a/src/main/java/appeng/block/AEBaseItemBlock.java +++ b/src/main/java/appeng/block/AEBaseItemBlock.java @@ -67,7 +67,6 @@ public class AEBaseItemBlock extends ItemBlock @Override @SideOnly( Side.CLIENT ) - @SuppressWarnings( "unchecked" ) public final void addInformation( final ItemStack itemStack, final World world, final List toolTip, final ITooltipFlag advancedTooltips ) { this.addCheckedInformation( itemStack, world, toolTip, advancedTooltips ); diff --git a/src/main/java/appeng/block/networking/BlockController.java b/src/main/java/appeng/block/networking/BlockController.java index 6074b1a41..d13515d3a 100644 --- a/src/main/java/appeng/block/networking/BlockController.java +++ b/src/main/java/appeng/block/networking/BlockController.java @@ -97,7 +97,6 @@ public class BlockController extends AEBaseTileBlock * controllers and the network state of this controller (offline, online, conflicted). This is used to * get a rudimentary connected texture feel for the controller based on how it is placed. */ - @SuppressWarnings( "deprecation" ) @Override public IBlockState getActualState( IBlockState state, IBlockAccess world, BlockPos pos ) { @@ -160,7 +159,6 @@ public class BlockController extends AEBaseTileBlock return state.getValue( CONTROLLER_STATE ).ordinal(); } - @SuppressWarnings( "deprecation" ) @Override public IBlockState getStateFromMeta( final int meta ) { @@ -174,7 +172,6 @@ public class BlockController extends AEBaseTileBlock return BlockRenderLayer.CUTOUT; } - @SuppressWarnings( "deprecation" ) @Override public void neighborChanged( IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos ) { diff --git a/src/main/java/appeng/client/gui/AEBaseGui.java b/src/main/java/appeng/client/gui/AEBaseGui.java index cae2f2022..52f9aeac6 100644 --- a/src/main/java/appeng/client/gui/AEBaseGui.java +++ b/src/main/java/appeng/client/gui/AEBaseGui.java @@ -140,7 +140,6 @@ public abstract class AEBaseGui extends GuiContainer } } - @SuppressWarnings( "unchecked" ) private List getInventorySlots() { return this.inventorySlots.inventorySlots; diff --git a/src/main/java/appeng/client/gui/AEBaseMEGui.java b/src/main/java/appeng/client/gui/AEBaseMEGui.java index 966aebd69..b7f5c7686 100644 --- a/src/main/java/appeng/client/gui/AEBaseMEGui.java +++ b/src/main/java/appeng/client/gui/AEBaseMEGui.java @@ -120,7 +120,6 @@ public abstract class AEBaseMEGui extends AEBaseGui ITooltipFlag.TooltipFlags tooltipFlag = this.mc.gameSettings.advancedItemTooltips ? ITooltipFlag.TooltipFlags.ADVANCED : ITooltipFlag.TooltipFlags.NORMAL; if( myStack != null ) { - @SuppressWarnings( "unchecked" ) final List currentToolTip = stack.getTooltip( this.mc.player, tooltipFlag ); if( myStack.getStackSize() > BigNumber || ( myStack.getStackSize() > 1 && stack.isItemDamaged() ) ) diff --git a/src/main/java/appeng/client/render/cablebus/CableBusBakedModel.java b/src/main/java/appeng/client/render/cablebus/CableBusBakedModel.java index 882057acf..b859910dc 100644 --- a/src/main/java/appeng/client/render/cablebus/CableBusBakedModel.java +++ b/src/main/java/appeng/client/render/cablebus/CableBusBakedModel.java @@ -168,6 +168,8 @@ public class CableBusBakedModel implements IBakedModel return firstType == AECableType.DENSE_COVERED && secondType == AECableType.DENSE_COVERED; case DENSE_SMART: return firstType == AECableType.DENSE_SMART && secondType == AECableType.DENSE_SMART; + default: + break; } return true; @@ -208,6 +210,8 @@ public class CableBusBakedModel implements IBakedModel case DENSE_SMART: this.cableBuilder.addStraightDenseSmartConnection( facing, cableColor, renderState.getChannelsOnSide().get( facing ), quadsOut ); break; + default: + break; } return; // Don't render the other form of connection @@ -237,6 +241,8 @@ public class CableBusBakedModel implements IBakedModel case DENSE_SMART: // Dense cables do not render connections to parts since none can be attached break; + default: + break; } } @@ -265,6 +271,8 @@ public class CableBusBakedModel implements IBakedModel case DENSE_SMART: this.cableBuilder.addDenseSmartConnection( facing, cableColor, connectionType, cableBusAdjacent, channels, quadsOut ); break; + default: + break; } } } diff --git a/src/main/java/appeng/container/AEBaseContainer.java b/src/main/java/appeng/container/AEBaseContainer.java index 684dd89cd..3c75a0d84 100644 --- a/src/main/java/appeng/container/AEBaseContainer.java +++ b/src/main/java/appeng/container/AEBaseContainer.java @@ -1108,7 +1108,8 @@ public abstract class AEBaseContainer extends Container { try { - NetworkHandler.instance().sendTo( new PacketInventoryAction( InventoryAction.UPDATE_HAND, 0, AEItemStack.fromItemStack( p.inventory.getItemStack() ) ), + NetworkHandler.instance().sendTo( + new PacketInventoryAction( InventoryAction.UPDATE_HAND, 0, AEItemStack.fromItemStack( p.inventory.getItemStack() ) ), p ); } catch( final IOException e ) diff --git a/src/main/java/appeng/core/api/ApiGrid.java b/src/main/java/appeng/core/api/ApiGrid.java index 9b550e0d5..4d81ca122 100644 --- a/src/main/java/appeng/core/api/ApiGrid.java +++ b/src/main/java/appeng/core/api/ApiGrid.java @@ -21,7 +21,7 @@ package appeng.core.api; import com.google.common.base.Preconditions; -import appeng.api.exceptions.FailedConnection; +import appeng.api.exceptions.FailedConnectionException; import appeng.api.networking.IGridBlock; import appeng.api.networking.IGridConnection; import appeng.api.networking.IGridHelper; @@ -54,7 +54,7 @@ public class ApiGrid implements IGridHelper } @Override - public IGridConnection createGridConnection( final IGridNode a, final IGridNode b ) throws FailedConnection + public IGridConnection createGridConnection( final IGridNode a, final IGridNode b ) throws FailedConnectionException { Preconditions.checkNotNull( a ); Preconditions.checkNotNull( b ); diff --git a/src/main/java/appeng/core/api/definitions/ApiItems.java b/src/main/java/appeng/core/api/definitions/ApiItems.java index d1f11edd9..3da81eb3c 100644 --- a/src/main/java/appeng/core/api/definitions/ApiItems.java +++ b/src/main/java/appeng/core/api/definitions/ApiItems.java @@ -337,7 +337,7 @@ public final class ApiItems implements IItems @Override public IItemDefinition biometricCard() { - return this.biometricCard; + return this.chargedStaff; } @Override diff --git a/src/main/java/appeng/core/api/definitions/ApiParts.java b/src/main/java/appeng/core/api/definitions/ApiParts.java index e77233690..e394a59e1 100644 --- a/src/main/java/appeng/core/api/definitions/ApiParts.java +++ b/src/main/java/appeng/core/api/definitions/ApiParts.java @@ -21,7 +21,7 @@ package appeng.core.api.definitions; import appeng.api.definitions.IItemDefinition; import appeng.api.definitions.IParts; -import appeng.api.exceptions.MissingDefinition; +import appeng.api.exceptions.MissingDefinitionException; import appeng.api.util.AEColor; import appeng.api.util.AEColoredItemDefinition; import appeng.bootstrap.FeatureFactory; @@ -180,28 +180,28 @@ public final class ApiParts implements IParts @Override public AEColoredItemDefinition lumenCableSmart() { - throw new MissingDefinition( "Lumen Smart Cable has yet to be implemented." ); + throw new MissingDefinitionException( "Lumen Smart Cable has yet to be implemented." ); // return this.lumenCableSmart; } @Override public AEColoredItemDefinition lumenCableCovered() { - throw new MissingDefinition( "Lumen Covered Cable has yet to be implemented." ); + throw new MissingDefinitionException( "Lumen Covered Cable has yet to be implemented." ); // return this.lumenCableCovered; } @Override public AEColoredItemDefinition lumenCableGlass() { - throw new MissingDefinition( "Lumen Glass Cable has yet to be implemented." ); + throw new MissingDefinitionException( "Lumen Glass Cable has yet to be implemented." ); // return this.lumenCableGlass; } @Override public AEColoredItemDefinition lumenDenseCableSmart() { - throw new MissingDefinition( "Lumen Dense Cable has yet to be implemented." ); + throw new MissingDefinitionException( "Lumen Dense Cable has yet to be implemented." ); // return this.lumenCableDense; } diff --git a/src/main/java/appeng/decorative/solid/BlockChargedQuartzOre.java b/src/main/java/appeng/decorative/solid/BlockChargedQuartzOre.java index 016cb23c6..1495c9601 100644 --- a/src/main/java/appeng/decorative/solid/BlockChargedQuartzOre.java +++ b/src/main/java/appeng/decorative/solid/BlockChargedQuartzOre.java @@ -30,7 +30,7 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import appeng.api.AEApi; -import appeng.api.exceptions.MissingDefinition; +import appeng.api.exceptions.MissingDefinitionException; import appeng.client.render.effects.ChargedOreFX; import appeng.core.AEConfig; import appeng.core.AppEng; @@ -53,7 +53,7 @@ public final class BlockChargedQuartzOre extends BlockQuartzOre .materials() .certusQuartzCrystalCharged() .maybeItem() - .orElseThrow( () -> new MissingDefinition( "Tried to access charged certus quartz crystal, even though they are disabled" ) ); + .orElseThrow( () -> new MissingDefinitionException( "Tried to access charged certus quartz crystal, even though they are disabled" ) ); } @Override @@ -64,7 +64,7 @@ public final class BlockChargedQuartzOre extends BlockQuartzOre .materials() .certusQuartzCrystalCharged() .maybeStack( 1 ) - .orElseThrow( () -> new MissingDefinition( "Tried to access charged certus quartz crystal, even though they are disabled" ) ) + .orElseThrow( () -> new MissingDefinitionException( "Tried to access charged certus quartz crystal, even though they are disabled" ) ) .getItemDamage(); } diff --git a/src/main/java/appeng/decorative/solid/BlockQuartzOre.java b/src/main/java/appeng/decorative/solid/BlockQuartzOre.java index 1cd05f2be..1de799ac5 100644 --- a/src/main/java/appeng/decorative/solid/BlockQuartzOre.java +++ b/src/main/java/appeng/decorative/solid/BlockQuartzOre.java @@ -31,7 +31,7 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import appeng.api.AEApi; -import appeng.api.exceptions.MissingDefinition; +import appeng.api.exceptions.MissingDefinitionException; import appeng.block.AEBaseBlock; @@ -98,7 +98,7 @@ public class BlockQuartzOre extends AEBaseBlock .materials() .certusQuartzCrystal() .maybeItem() - .orElseThrow( () -> new MissingDefinition( "Tried to access certus quartz crystal, even though they are disabled" ) ); + .orElseThrow( () -> new MissingDefinitionException( "Tried to access certus quartz crystal, even though they are disabled" ) ); } @Override @@ -122,7 +122,7 @@ public class BlockQuartzOre extends AEBaseBlock .materials() .certusQuartzCrystal() .maybeStack( 1 ) - .orElseThrow( () -> new MissingDefinition( "Tried to access certus quartz crystal, even though they are disabled" ) ) + .orElseThrow( () -> new MissingDefinitionException( "Tried to access certus quartz crystal, even though they are disabled" ) ) .getItemDamage(); } diff --git a/src/main/java/appeng/entity/AEBaseEntityItem.java b/src/main/java/appeng/entity/AEBaseEntityItem.java index aee25d2d1..7223e3cd1 100644 --- a/src/main/java/appeng/entity/AEBaseEntityItem.java +++ b/src/main/java/appeng/entity/AEBaseEntityItem.java @@ -40,7 +40,6 @@ public abstract class AEBaseEntityItem extends EntityItem super( world, x, y, z, stack ); } - @SuppressWarnings( "unchecked" ) protected List getCheckedEntitiesWithinAABBExcludingEntity( final AxisAlignedBB region ) { return this.world.getEntitiesWithinAABBExcludingEntity( this, region ); diff --git a/src/main/java/appeng/integration/IntegrationNode.java b/src/main/java/appeng/integration/IntegrationNode.java index a205ec12e..ffcd6e814 100644 --- a/src/main/java/appeng/integration/IntegrationNode.java +++ b/src/main/java/appeng/integration/IntegrationNode.java @@ -22,7 +22,7 @@ package appeng.integration; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.common.ModAPIManager; -import appeng.api.exceptions.ModNotInstalled; +import appeng.api.exceptions.ModNotInstalledException; import appeng.core.AEConfig; import appeng.core.AELog; @@ -96,7 +96,7 @@ final class IntegrationNode } else { - throw new ModNotInstalled( this.modID ); + throw new ModNotInstalledException( this.modID ); } this.mod.preInit(); @@ -130,7 +130,7 @@ final class IntegrationNode if( this.getState() == IntegrationStage.FAILED ) { AELog.info( this.displayName + " - Integration Disabled" ); - if( !( this.exception instanceof ModNotInstalled ) ) + if( !( this.exception instanceof ModNotInstalledException ) ) { AELog.integration( this.exception ); } diff --git a/src/main/java/appeng/integration/modules/jei/ShapedRecipeWrapper.java b/src/main/java/appeng/integration/modules/jei/ShapedRecipeWrapper.java index d015a1a5e..cb6b459f0 100644 --- a/src/main/java/appeng/integration/modules/jei/ShapedRecipeWrapper.java +++ b/src/main/java/appeng/integration/modules/jei/ShapedRecipeWrapper.java @@ -29,8 +29,8 @@ import net.minecraft.item.ItemStack; import mezz.jei.api.ingredients.IIngredients; import mezz.jei.api.recipe.wrapper.IShapedCraftingRecipeWrapper; -import appeng.api.exceptions.MissingIngredientError; -import appeng.api.exceptions.RegistrationError; +import appeng.api.exceptions.MissingIngredientException; +import appeng.api.exceptions.RegistrationException; import appeng.api.recipes.IIngredient; import appeng.core.AEConfig; import appeng.recipes.game.ShapedRecipe; @@ -72,7 +72,7 @@ class ShapedRecipeWrapper implements IShapedCraftingRecipeWrapper ItemStack[] is = ing.getItemStackSet(); slotList = useSingleItems ? Platform.findPreferred( is ) : Arrays.asList( is ); } - catch( final RegistrationError | MissingIngredientError ignored ) + catch( final RegistrationException | MissingIngredientException ignored ) { } in.add( slotList ); diff --git a/src/main/java/appeng/integration/modules/jei/ShapelessRecipeWrapper.java b/src/main/java/appeng/integration/modules/jei/ShapelessRecipeWrapper.java index 95c829565..e9b31a7e6 100644 --- a/src/main/java/appeng/integration/modules/jei/ShapelessRecipeWrapper.java +++ b/src/main/java/appeng/integration/modules/jei/ShapelessRecipeWrapper.java @@ -29,8 +29,8 @@ import net.minecraft.item.ItemStack; import mezz.jei.api.ingredients.IIngredients; import mezz.jei.api.recipe.IRecipeWrapper; -import appeng.api.exceptions.MissingIngredientError; -import appeng.api.exceptions.RegistrationError; +import appeng.api.exceptions.MissingIngredientException; +import appeng.api.exceptions.RegistrationException; import appeng.api.recipes.IIngredient; import appeng.recipes.game.ShapelessRecipe; @@ -60,7 +60,7 @@ class ShapelessRecipeWrapper implements IRecipeWrapper { inputs.add( Lists.newArrayList( ingredient.getItemStackSet() ) ); } - catch( RegistrationError | MissingIngredientError registrationError ) + catch( RegistrationException | MissingIngredientException registrationError ) { throw new RuntimeException( "Unable to register recipe with JEI" ); } diff --git a/src/main/java/appeng/items/AEBaseItem.java b/src/main/java/appeng/items/AEBaseItem.java index 2ca11180d..ca57f7aad 100644 --- a/src/main/java/appeng/items/AEBaseItem.java +++ b/src/main/java/appeng/items/AEBaseItem.java @@ -55,7 +55,6 @@ public abstract class AEBaseItem extends Item } @Override - @SuppressWarnings( "unchecked" ) public final void getSubItems( final CreativeTabs creativeTab, final NonNullList itemStacks ) { if( this.isInCreativeTab( creativeTab ) ) diff --git a/src/main/java/appeng/items/contents/PortableCellViewer.java b/src/main/java/appeng/items/contents/PortableCellViewer.java index b5991a473..c00a1de2c 100644 --- a/src/main/java/appeng/items/contents/PortableCellViewer.java +++ b/src/main/java/appeng/items/contents/PortableCellViewer.java @@ -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; diff --git a/src/main/java/appeng/items/parts/ItemFacade.java b/src/main/java/appeng/items/parts/ItemFacade.java index ef9b31566..2a57d2c89 100644 --- a/src/main/java/appeng/items/parts/ItemFacade.java +++ b/src/main/java/appeng/items/parts/ItemFacade.java @@ -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] ); diff --git a/src/main/java/appeng/items/storage/ItemBasicStorageCell.java b/src/main/java/appeng/items/storage/ItemBasicStorageCell.java index d3d8c98e7..f415098ec 100644 --- a/src/main/java/appeng/items/storage/ItemBasicStorageCell.java +++ b/src/main/java/appeng/items/storage/ItemBasicStorageCell.java @@ -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 diff --git a/src/main/java/appeng/me/GridConnection.java b/src/main/java/appeng/me/GridConnection.java index a243f4a09..847498097 100644 --- a/src/main/java/appeng/me/GridConnection.java +++ b/src/main/java/appeng/me/GridConnection.java @@ -23,7 +23,7 @@ import java.util.Arrays; import java.util.EnumSet; import appeng.api.exceptions.ExistingConnectionException; -import appeng.api.exceptions.FailedConnection; +import appeng.api.exceptions.FailedConnectionException; import appeng.api.exceptions.NullNodeConnectionException; import appeng.api.exceptions.SecurityConnectionException; import appeng.api.networking.GridFlags; @@ -54,7 +54,7 @@ public class GridConnection implements IGridConnection, IPathItem private AEPartLocation fromAtoB; private GridNode sideB; - public GridConnection( final IGridNode aNode, final IGridNode bNode, final AEPartLocation fromAtoB ) throws FailedConnection + public GridConnection( final IGridNode aNode, final IGridNode bNode, final AEPartLocation fromAtoB ) throws FailedConnectionException { final GridNode a = (GridNode) aNode; diff --git a/src/main/java/appeng/me/GridNode.java b/src/main/java/appeng/me/GridNode.java index 504aa2950..0070a4b84 100644 --- a/src/main/java/appeng/me/GridNode.java +++ b/src/main/java/appeng/me/GridNode.java @@ -32,7 +32,7 @@ import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import appeng.api.exceptions.FailedConnection; +import appeng.api.exceptions.FailedConnectionException; import appeng.api.networking.GridFlags; import appeng.api.networking.GridNotification; import appeng.api.networking.IGrid; @@ -457,7 +457,7 @@ public class GridNode implements IGridNode, IPathItem { new GridConnection( node, this, f.getOpposite() ); } - catch( final FailedConnection e ) + catch( final FailedConnectionException e ) { TickHandler.INSTANCE.addCallable( node.getWorld(), new MachineSecurityBreak( this ) ); @@ -484,7 +484,7 @@ public class GridNode implements IGridNode, IPathItem { new GridConnection( node, this, f.getOpposite() ); } - catch( final FailedConnection e ) + catch( final FailedConnectionException e ) { TickHandler.INSTANCE.addCallable( node.getWorld(), new MachineSecurityBreak( this ) ); diff --git a/src/main/java/appeng/me/cache/CraftingGridCache.java b/src/main/java/appeng/me/cache/CraftingGridCache.java index 056048587..81c87d364 100644 --- a/src/main/java/appeng/me/cache/CraftingGridCache.java +++ b/src/main/java/appeng/me/cache/CraftingGridCache.java @@ -379,7 +379,7 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper } @Override - public List getCellArray( final IStorageChannel channel ) + public List getCellArray( final IStorageChannel channel ) { final List list = new ArrayList<>( 1 ); diff --git a/src/main/java/appeng/me/cache/GridStorageCache.java b/src/main/java/appeng/me/cache/GridStorageCache.java index cd210a63e..43b478ba8 100644 --- a/src/main/java/appeng/me/cache/GridStorageCache.java +++ b/src/main/java/appeng/me/cache/GridStorageCache.java @@ -276,7 +276,7 @@ public class GridStorageCache implements IStorageGrid } @Override - public void postAlterationOfStoredItems( final IStorageChannel chan, final Iterable input, final IActionSource src ) + public void postAlterationOfStoredItems( final IStorageChannel chan, final Iterable> input, final IActionSource src ) { this.storageMonitors.get( chan ).postChange( true, (Iterable) input, src ); } diff --git a/src/main/java/appeng/me/cluster/implementations/QuantumCluster.java b/src/main/java/appeng/me/cluster/implementations/QuantumCluster.java index 1c0cf583e..54e01866a 100644 --- a/src/main/java/appeng/me/cluster/implementations/QuantumCluster.java +++ b/src/main/java/appeng/me/cluster/implementations/QuantumCluster.java @@ -32,7 +32,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import appeng.api.AEApi; import appeng.api.events.LocatableEventAnnounce; import appeng.api.events.LocatableEventAnnounce.LocatableEvent; -import appeng.api.exceptions.FailedConnection; +import appeng.api.exceptions.FailedConnectionException; import appeng.api.features.ILocatable; import appeng.api.networking.IGridHost; import appeng.api.networking.IGridNode; @@ -158,7 +158,7 @@ public class QuantumCluster implements ILocatable, IAECluster sideA.connection = sideB.connection = new ConnectionWrapper( AEApi.instance().grid().createGridConnection( sideA.getNode(), sideB.getNode() ) ); } - catch( final FailedConnection e ) + catch( final FailedConnectionException e ) { // :( } diff --git a/src/api/java/appeng/api/storage/MEMonitorHandler.java b/src/main/java/appeng/me/helpers/MEMonitorHandler.java similarity index 95% rename from src/api/java/appeng/api/storage/MEMonitorHandler.java rename to src/main/java/appeng/me/helpers/MEMonitorHandler.java index 4d703cb41..e77c284a3 100644 --- a/src/api/java/appeng/api/storage/MEMonitorHandler.java +++ b/src/main/java/appeng/me/helpers/MEMonitorHandler.java @@ -21,7 +21,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package appeng.api.storage; +package appeng.me.helpers; import java.util.HashMap; @@ -33,6 +33,10 @@ import com.google.common.collect.ImmutableList; import appeng.api.config.AccessRestriction; import appeng.api.config.Actionable; import appeng.api.networking.security.IActionSource; +import appeng.api.storage.IMEInventoryHandler; +import appeng.api.storage.IMEMonitor; +import appeng.api.storage.IMEMonitorHandlerReceiver; +import appeng.api.storage.IStorageChannel; import appeng.api.storage.data.IAEStack; import appeng.api.storage.data.IItemList; @@ -42,11 +46,9 @@ import appeng.api.storage.data.IItemList; * listeners. * * @param - * @deprecated * - * TODO: Needs to be redesigned to solve performance issues. Also should not be part of the API as class. + * TODO: Needs to be redesigned to solve performance issues. */ -@Deprecated public class MEMonitorHandler> implements IMEMonitor { diff --git a/src/main/java/appeng/parts/CableBusContainer.java b/src/main/java/appeng/parts/CableBusContainer.java index 55c4b1123..fb51da029 100644 --- a/src/main/java/appeng/parts/CableBusContainer.java +++ b/src/main/java/appeng/parts/CableBusContainer.java @@ -48,7 +48,7 @@ import net.minecraft.world.World; import appeng.api.AEApi; import appeng.api.config.YesNo; -import appeng.api.exceptions.FailedConnection; +import appeng.api.exceptions.FailedConnectionException; import appeng.api.implementations.parts.IPartCable; import appeng.api.networking.IGridHost; import appeng.api.networking.IGridNode; @@ -243,7 +243,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I { new GridConnection( cn, sn, AEPartLocation.INTERNAL ); } - catch( final FailedConnection e ) + catch( final FailedConnectionException e ) { // ekk! @@ -294,7 +294,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I { new GridConnection( cn, sn, AEPartLocation.INTERNAL ); } - catch( final FailedConnection e ) + catch( final FailedConnectionException e ) { // ekk! @@ -634,7 +634,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I { AEApi.instance().grid().createGridConnection( cn, sn ); } - catch( final FailedConnection e ) + catch( final FailedConnectionException e ) { // ekk } diff --git a/src/main/java/appeng/parts/misc/PartToggleBus.java b/src/main/java/appeng/parts/misc/PartToggleBus.java index b58b129ad..e7a11de38 100644 --- a/src/main/java/appeng/parts/misc/PartToggleBus.java +++ b/src/main/java/appeng/parts/misc/PartToggleBus.java @@ -33,7 +33,7 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; import appeng.api.AEApi; -import appeng.api.exceptions.FailedConnection; +import appeng.api.exceptions.FailedConnectionException; import appeng.api.networking.IGridConnection; import appeng.api.networking.IGridNode; import appeng.api.parts.IPartCollisionHelper; @@ -205,7 +205,7 @@ public class PartToggleBus extends PartBasicState { this.connection = AEApi.instance().grid().createGridConnection( this.getProxy().getNode(), this.getOuterProxy().getNode() ); } - catch( final FailedConnection e ) + catch( final FailedConnectionException e ) { // :( } diff --git a/src/main/java/appeng/parts/p2p/PartP2PTunnelME.java b/src/main/java/appeng/parts/p2p/PartP2PTunnelME.java index ab5f2b26c..0a640117f 100644 --- a/src/main/java/appeng/parts/p2p/PartP2PTunnelME.java +++ b/src/main/java/appeng/parts/p2p/PartP2PTunnelME.java @@ -31,7 +31,7 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumHand; import appeng.api.AEApi; -import appeng.api.exceptions.FailedConnection; +import appeng.api.exceptions.FailedConnectionException; import appeng.api.networking.GridFlags; import appeng.api.networking.IGridNode; import appeng.api.networking.ticking.IGridTickable; @@ -243,7 +243,7 @@ public class PartP2PTunnelME extends PartP2PTunnel implements I new TunnelConnection( me, AEApi.instance().grid().createGridConnection( this.outerProxy.getNode(), me.outerProxy.getNode() ) ) ); } - catch( final FailedConnection e ) + catch( final FailedConnectionException e ) { final TileEntity start = this.getTile(); final TileEntity end = me.getTile(); diff --git a/src/main/java/appeng/recipes/GroupIngredient.java b/src/main/java/appeng/recipes/GroupIngredient.java index 4634bd186..b13c68a16 100644 --- a/src/main/java/appeng/recipes/GroupIngredient.java +++ b/src/main/java/appeng/recipes/GroupIngredient.java @@ -28,9 +28,9 @@ import com.google.common.base.Preconditions; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; -import appeng.api.exceptions.MissingIngredientError; -import appeng.api.exceptions.RecipeError; -import appeng.api.exceptions.RegistrationError; +import appeng.api.exceptions.MissingIngredientException; +import appeng.api.exceptions.RecipeException; +import appeng.api.exceptions.RegistrationException; import appeng.api.recipes.IIngredient; @@ -43,7 +43,7 @@ public class GroupIngredient implements IIngredient private ItemStack[] baked; private boolean isInside = false; - public GroupIngredient( final String myName, final List ingredients, final int qty ) throws RecipeError + public GroupIngredient( final String myName, final List ingredients, final int qty ) throws RecipeException { Preconditions.checkNotNull( myName ); Preconditions.checkNotNull( ingredients ); @@ -57,27 +57,27 @@ public class GroupIngredient implements IIngredient { if( ingredient.isAir() ) { - throw new RecipeError( "Cannot include air in a group." ); + throw new RecipeException( "Cannot include air in a group." ); } } this.ingredients = ingredients; } - IIngredient copy( final int qty ) throws RecipeError + IIngredient copy( final int qty ) throws RecipeException { Preconditions.checkState( qty > 0 ); return new GroupIngredient( this.name, this.ingredients, qty ); } @Override - public ItemStack getItemStack() throws RegistrationError, MissingIngredientError + public ItemStack getItemStack() throws RegistrationException, MissingIngredientException { - throw new RegistrationError( "Cannot pass group of items to a recipe which desires a single recipe item." ); + throw new RegistrationException( "Cannot pass group of items to a recipe which desires a single recipe item." ); } @Override - public ItemStack[] getItemStackSet() throws RegistrationError, MissingIngredientError + public ItemStack[] getItemStackSet() throws RegistrationException, MissingIngredientException { if( this.baked != null ) { @@ -99,7 +99,7 @@ public class GroupIngredient implements IIngredient { out.addAll( Arrays.asList( i.getItemStackSet() ) ); } - catch( final MissingIngredientError mir ) + catch( final MissingIngredientException mir ) { // oh well this is a group! } @@ -112,7 +112,7 @@ public class GroupIngredient implements IIngredient if( out.isEmpty() ) { - throw new MissingIngredientError( this.toString() + " - group could not be resolved to any items." ); + throw new MissingIngredientException( this.toString() + " - group could not be resolved to any items." ); } for( final ItemStack is : out ) @@ -154,7 +154,7 @@ public class GroupIngredient implements IIngredient } @Override - public void bake() throws RegistrationError, MissingIngredientError + public void bake() throws RegistrationException, MissingIngredientException { this.baked = null; this.baked = this.getItemStackSet(); diff --git a/src/main/java/appeng/recipes/Ingredient.java b/src/main/java/appeng/recipes/Ingredient.java index eb349db34..9d5ee2d38 100644 --- a/src/main/java/appeng/recipes/Ingredient.java +++ b/src/main/java/appeng/recipes/Ingredient.java @@ -31,9 +31,9 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.oredict.OreDictionary; import appeng.api.AEApi; -import appeng.api.exceptions.MissingIngredientError; -import appeng.api.exceptions.RecipeError; -import appeng.api.exceptions.RegistrationError; +import appeng.api.exceptions.MissingIngredientException; +import appeng.api.exceptions.RecipeException; +import appeng.api.exceptions.RegistrationException; import appeng.api.recipes.IIngredient; import appeng.api.recipes.ResolverResult; import appeng.api.recipes.ResolverResultSet; @@ -50,7 +50,7 @@ public class Ingredient implements IIngredient private NBTTagCompound nbt = null; private ItemStack[] baked; - public Ingredient( final RecipeHandler handler, final String input, final int qty ) throws RecipeError, MissedIngredientSet + public Ingredient( final RecipeHandler handler, final String input, final int qty ) throws RecipeException, MissedIngredientSet { Preconditions.checkNotNull( handler ); Preconditions.checkNotNull( input ); @@ -83,7 +83,7 @@ public class Ingredient implements IIngredient { if( parts.length == 3 ) { - throw new RecipeError( "Cannot specify meta when using ore dictionary." ); + throw new RecipeException( "Cannot specify meta when using ore dictionary." ); } sel = OreDictionary.WILDCARD_VALUE; } @@ -106,7 +106,7 @@ public class Ingredient implements IIngredient } catch( final IllegalArgumentException e ) { - throw new RecipeError( tmpName + " is not a valid ae2 item definition." ); + throw new RecipeException( tmpName + " is not a valid ae2 item definition." ); } } @@ -126,7 +126,7 @@ public class Ingredient implements IIngredient } catch( final NumberFormatException e ) { - throw new RecipeError( "Invalid Metadata." ); + throw new RecipeException( "Invalid Metadata." ); } } } @@ -134,7 +134,7 @@ public class Ingredient implements IIngredient } else { - throw new RecipeError( input + " : Needs at least Namespace and Name." ); + throw new RecipeException( input + " : Needs at least Namespace and Name." ); } handler.getData().knownItem.add( this.toString() ); @@ -147,16 +147,16 @@ public class Ingredient implements IIngredient } @Override - public ItemStack getItemStack() throws RegistrationError, MissingIngredientError + public ItemStack getItemStack() throws RegistrationException, MissingIngredientException { if( this.isAir ) { - throw new RegistrationError( "Found blank item and expected a real item." ); + throw new RegistrationException( "Found blank item and expected a real item." ); } if( this.nameSpace.equalsIgnoreCase( "oreDictionary" ) ) { - throw new RegistrationError( "Recipe format expected a single item, but got a set of items." ); + throw new RegistrationException( "Recipe format expected a single item, but got a set of items." ); } Block blk = Block.getBlockFromName( this.nameSpace + ":" + this.itemName ); @@ -195,7 +195,7 @@ public class Ingredient implements IIngredient * instanceof BlockAir)) ) return new ItemStack( (Block) o, qty, meta ); */ - throw new MissingIngredientError( "Unable to find item: " + this.toString() ); + throw new MissingIngredientException( "Unable to find item: " + this.toString() ); } private ItemStack makeItemStack( final Item it, final int quantity, final int damageValue, final NBTTagCompound compound ) @@ -206,7 +206,7 @@ public class Ingredient implements IIngredient } @Override - public ItemStack[] getItemStackSet() throws RegistrationError, MissingIngredientError + public ItemStack[] getItemStackSet() throws RegistrationException, MissingIngredientException { if( this.baked != null ) { @@ -228,7 +228,7 @@ public class Ingredient implements IIngredient if( set.length == 0 ) { - throw new MissingIngredientError( this.itemName + " - ore dictionary could not be resolved to any items." ); + throw new MissingIngredientException( this.itemName + " - ore dictionary could not be resolved to any items." ); } return set; @@ -268,7 +268,7 @@ public class Ingredient implements IIngredient } @Override - public void bake() throws RegistrationError, MissingIngredientError + public void bake() throws RegistrationException, MissingIngredientException { this.baked = null; this.baked = this.getItemStackSet(); diff --git a/src/main/java/appeng/recipes/IngredientSet.java b/src/main/java/appeng/recipes/IngredientSet.java index b6dfe3103..570330b5b 100644 --- a/src/main/java/appeng/recipes/IngredientSet.java +++ b/src/main/java/appeng/recipes/IngredientSet.java @@ -27,8 +27,8 @@ import com.google.common.base.Preconditions; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; -import appeng.api.exceptions.MissingIngredientError; -import appeng.api.exceptions.RegistrationError; +import appeng.api.exceptions.MissingIngredientException; +import appeng.api.exceptions.RegistrationException; import appeng.api.recipes.IIngredient; import appeng.api.recipes.ResolverResultSet; @@ -55,13 +55,13 @@ public class IngredientSet implements IIngredient } @Override - public ItemStack getItemStack() throws RegistrationError, MissingIngredientError + public ItemStack getItemStack() throws RegistrationException, MissingIngredientException { - throw new RegistrationError( "Cannot pass group of items to a recipe which desires a single recipe item." ); + throw new RegistrationException( "Cannot pass group of items to a recipe which desires a single recipe item." ); } @Override - public ItemStack[] getItemStackSet() throws RegistrationError, MissingIngredientError + public ItemStack[] getItemStackSet() throws RegistrationException, MissingIngredientException { if( this.baked != null ) { @@ -78,7 +78,7 @@ public class IngredientSet implements IIngredient if( out.isEmpty() ) { - throw new MissingIngredientError( this.toString() + " - group could not be resolved to any items." ); + throw new MissingIngredientException( this.toString() + " - group could not be resolved to any items." ); } for( final ItemStack is : out ) @@ -120,7 +120,7 @@ public class IngredientSet implements IIngredient } @Override - public void bake() throws RegistrationError, MissingIngredientError + public void bake() throws RegistrationException, MissingIngredientException { this.baked = null; this.baked = this.getItemStackSet(); diff --git a/src/main/java/appeng/recipes/RecipeHandler.java b/src/main/java/appeng/recipes/RecipeHandler.java index aba06616d..602e20c12 100644 --- a/src/main/java/appeng/recipes/RecipeHandler.java +++ b/src/main/java/appeng/recipes/RecipeHandler.java @@ -47,9 +47,9 @@ import appeng.api.AEApi; import appeng.api.definitions.IBlocks; import appeng.api.definitions.IDefinitions; import appeng.api.definitions.IItems; -import appeng.api.exceptions.MissingIngredientError; -import appeng.api.exceptions.RecipeError; -import appeng.api.exceptions.RegistrationError; +import appeng.api.exceptions.MissingIngredientException; +import appeng.api.exceptions.RecipeException; +import appeng.api.exceptions.RegistrationException; import appeng.api.features.IRecipeHandlerRegistry; import appeng.api.recipes.ICraftHandler; import appeng.api.recipes.IIngredient; @@ -102,7 +102,7 @@ public class RecipeHandler implements IRecipeHandler return this.getName( is ); } } - catch( final RecipeError ignored ) + catch( final RecipeException ignored ) { } catch( final Throwable t ) @@ -114,7 +114,7 @@ public class RecipeHandler implements IRecipeHandler return i.getNameSpace() + ':' + i.getItemName(); } - private String getName( final ItemStack is ) throws RecipeError + private String getName( final ItemStack is ) throws RecipeException { Preconditions.checkNotNull( is ); @@ -123,7 +123,7 @@ public class RecipeHandler implements IRecipeHandler if( !id.getResourceDomain().equals( AppEng.MOD_ID ) && !id.getResourceDomain().equals( "minecraft" ) ) { - throw new RecipeError( "Not applicable for website" ); + throw new RecipeException( "Not applicable for website" ); } final IDefinitions definitions = AEApi.instance().definitions(); @@ -388,7 +388,7 @@ public class RecipeHandler implements IRecipeHandler processed.put( clz, i + 1 ); } } - catch( final MissingIngredientError e ) + catch( final MissingIngredientException e ) { if( this.data.errorOnMissing ) { @@ -403,7 +403,7 @@ public class RecipeHandler implements IRecipeHandler } } } - catch( final RegistrationError e ) + catch( final RegistrationException e ) { AELog.warn( "Unable to register a recipe: " + e.getMessage() ); if( this.data.exceptions ) @@ -447,7 +447,7 @@ public class RecipeHandler implements IRecipeHandler } } } - catch( final RecipeError ignored ) + catch( final RecipeException ignored ) { } @@ -455,11 +455,11 @@ public class RecipeHandler implements IRecipeHandler { } - catch( final RegistrationError ignored ) + catch( final RegistrationException ignored ) { } - catch( final MissingIngredientError ignored ) + catch( final MissingIngredientException ignored ) { } @@ -521,7 +521,7 @@ public class RecipeHandler implements IRecipeHandler return this.data; } - private void processTokens( final IRecipeLoader loader, final String file, final int line ) throws RecipeError + private void processTokens( final IRecipeLoader loader, final String file, final int line ) throws RecipeException { try { @@ -545,7 +545,7 @@ public class RecipeHandler implements IRecipeHandler } else { - throw new RecipeError( "Alias must have exactly 1 input and 1 output." ); + throw new RecipeException( "Alias must have exactly 1 input and 1 output." ); } } else if( operation.equals( "group" ) ) @@ -561,7 +561,7 @@ public class RecipeHandler implements IRecipeHandler } else { - throw new RecipeError( "Group must have exactly 1 output, and 1 or more inputs." ); + throw new RecipeException( "Group must have exactly 1 output, and 1 or more inputs." ); } } else if( operation.equals( "ore" ) ) @@ -578,7 +578,7 @@ public class RecipeHandler implements IRecipeHandler } else { - throw new RecipeError( "Group must have exactly 1 output, and 1 or more inputs in a single row." ); + throw new RecipeException( "Group must have exactly 1 output, and 1 or more inputs in a single row." ); } } else @@ -598,7 +598,7 @@ public class RecipeHandler implements IRecipeHandler } else { - throw new RecipeError( "Invalid crafting type: " + operation ); + throw new RecipeException( "Invalid crafting type: " + operation ); } } } @@ -614,7 +614,7 @@ public class RecipeHandler implements IRecipeHandler } else { - throw new RecipeError( "exceptions must be true or false explicitly." ); + throw new RecipeException( "exceptions must be true or false explicitly." ); } } else if( operation.equals( "crash" ) && ( this.tokens.get( 0 ).equals( "true" ) || this.tokens.get( 0 ).equals( "false" ) ) ) @@ -625,7 +625,7 @@ public class RecipeHandler implements IRecipeHandler } else { - throw new RecipeError( "crash must be true or false explicitly." ); + throw new RecipeException( "crash must be true or false explicitly." ); } } else if( operation.equals( "erroronmissing" ) ) @@ -636,7 +636,7 @@ public class RecipeHandler implements IRecipeHandler } else { - throw new RecipeError( "erroronmissing must be true or false explicitly." ); + throw new RecipeException( "erroronmissing must be true or false explicitly." ); } } else if( operation.equals( "import" ) ) @@ -647,16 +647,16 @@ public class RecipeHandler implements IRecipeHandler } else { - throw new RecipeError( "Import must have exactly 1 input." ); + throw new RecipeException( "Import must have exactly 1 input." ); } } else { - throw new RecipeError( operation + ": " + this.tokens.toString() + "; recipe without an output." ); + throw new RecipeException( operation + ": " + this.tokens.toString() + "; recipe without an output." ); } } } - catch( final RecipeError e ) + catch( final RecipeException e ) { AELog.warn( "Recipe Error '" + e.getMessage() + "' near line:" + line + " in " + file + " with: " + this.tokens.toString() ); if( this.data.exceptions ) @@ -672,7 +672,7 @@ public class RecipeHandler implements IRecipeHandler this.tokens.clear(); } - private List> parseLines( final Iterable subList ) throws RecipeError + private List> parseLines( final Iterable subList ) throws RecipeException { final List> out = new LinkedList<>(); List cList = new LinkedList<>(); @@ -686,7 +686,7 @@ public class RecipeHandler implements IRecipeHandler { if( hasQty ) { - throw new RecipeError( "Qty found with no item." ); + throw new RecipeException( "Qty found with no item." ); } if( !cList.isEmpty() ) { @@ -700,7 +700,7 @@ public class RecipeHandler implements IRecipeHandler { if( hasQty ) { - throw new RecipeError( "Qty found with no item." ); + throw new RecipeException( "Qty found with no item." ); } hasQty = true; qty = Integer.parseInt( v ); @@ -728,7 +728,7 @@ public class RecipeHandler implements IRecipeHandler return out; } - private IIngredient findIngredient( final String v, final int qty ) throws RecipeError + private IIngredient findIngredient( final String v, final int qty ) throws RecipeException { final GroupIngredient gi = this.data.groups.get( v ); diff --git a/src/main/java/appeng/recipes/game/IRecipeBakeable.java b/src/main/java/appeng/recipes/game/IRecipeBakeable.java index f4d9617e4..6635af2ac 100644 --- a/src/main/java/appeng/recipes/game/IRecipeBakeable.java +++ b/src/main/java/appeng/recipes/game/IRecipeBakeable.java @@ -19,10 +19,10 @@ package appeng.recipes.game; -import appeng.api.exceptions.RegistrationError; +import appeng.api.exceptions.RegistrationException; public interface IRecipeBakeable { - void bake() throws RegistrationError; + void bake() throws RegistrationException; } diff --git a/src/main/java/appeng/recipes/game/ShapedRecipe.java b/src/main/java/appeng/recipes/game/ShapedRecipe.java index 14a617115..7be4c7af2 100644 --- a/src/main/java/appeng/recipes/game/ShapedRecipe.java +++ b/src/main/java/appeng/recipes/game/ShapedRecipe.java @@ -31,8 +31,8 @@ import net.minecraft.world.World; import net.minecraftforge.common.ForgeHooks; import net.minecraftforge.oredict.OreDictionary; -import appeng.api.exceptions.MissingIngredientError; -import appeng.api.exceptions.RegistrationError; +import appeng.api.exceptions.MissingIngredientException; +import appeng.api.exceptions.RegistrationException; import appeng.api.recipes.IIngredient; @@ -228,11 +228,11 @@ public class ShapedRecipe extends net.minecraftforge.registries.IForgeRegistryEn matched = matched || this.checkItemEquals( item, slot ); } } - catch( final RegistrationError e ) + catch( final RegistrationException e ) { // :P } - catch( final MissingIngredientError e ) + catch( final MissingIngredientException e ) { // :P } @@ -309,7 +309,7 @@ public class ShapedRecipe extends net.minecraftforge.registries.IForgeRegistryEn } @Override - public void bake() throws RegistrationError + public void bake() throws RegistrationException { try { @@ -322,7 +322,7 @@ public class ShapedRecipe extends net.minecraftforge.registries.IForgeRegistryEn } } } - catch( final MissingIngredientError err ) + catch( final MissingIngredientException err ) { this.disable = true; } diff --git a/src/main/java/appeng/recipes/game/ShapelessRecipe.java b/src/main/java/appeng/recipes/game/ShapelessRecipe.java index 7d2a8d453..82e6921cd 100644 --- a/src/main/java/appeng/recipes/game/ShapelessRecipe.java +++ b/src/main/java/appeng/recipes/game/ShapelessRecipe.java @@ -29,8 +29,8 @@ import net.minecraft.world.World; import net.minecraftforge.common.ForgeHooks; import net.minecraftforge.oredict.OreDictionary; -import appeng.api.exceptions.MissingIngredientError; -import appeng.api.exceptions.RegistrationError; +import appeng.api.exceptions.MissingIngredientException; +import appeng.api.exceptions.RegistrationException; import appeng.api.recipes.IIngredient; @@ -100,11 +100,11 @@ public class ShapelessRecipe extends net.minecraftforge.registries.IForgeRegistr match = match || this.checkItemEquals( item, slot ); } } - catch( final RegistrationError e ) + catch( final RegistrationException e ) { // :P } - catch( final MissingIngredientError e ) + catch( final MissingIngredientException e ) { // :P } @@ -164,7 +164,7 @@ public class ShapelessRecipe extends net.minecraftforge.registries.IForgeRegistr } @Override - public void bake() throws RegistrationError + public void bake() throws RegistrationException { try { @@ -177,7 +177,7 @@ public class ShapelessRecipe extends net.minecraftforge.registries.IForgeRegistr } } } - catch( final MissingIngredientError e ) + catch( final MissingIngredientException e ) { this.disable = true; } diff --git a/src/main/java/appeng/recipes/handlers/Crusher.java b/src/main/java/appeng/recipes/handlers/Crusher.java index 67ee44129..490f5d64d 100644 --- a/src/main/java/appeng/recipes/handlers/Crusher.java +++ b/src/main/java/appeng/recipes/handlers/Crusher.java @@ -23,9 +23,9 @@ import java.util.List; import net.minecraft.item.ItemStack; -import appeng.api.exceptions.MissingIngredientError; -import appeng.api.exceptions.RecipeError; -import appeng.api.exceptions.RegistrationError; +import appeng.api.exceptions.MissingIngredientException; +import appeng.api.exceptions.RecipeException; +import appeng.api.exceptions.RegistrationException; import appeng.api.recipes.ICraftHandler; import appeng.api.recipes.IIngredient; import appeng.core.AELog; @@ -42,7 +42,7 @@ public class Crusher implements ICraftHandler, IWebsiteSerializer private IIngredient[] pro_output; @Override - public void setup( final List> input, final List> output ) throws RecipeError + public void setup( final List> input, final List> output ) throws RecipeException { if( input.size() == 1 && output.size() == 1 ) { @@ -54,11 +54,11 @@ public class Crusher implements ICraftHandler, IWebsiteSerializer return; } } - throw new RecipeError( "Crusher must have a single input, and single output." ); + throw new RecipeException( "Crusher must have a single input, and single output." ); } @Override - public void register() throws RegistrationError, MissingIngredientError + public void register() throws RegistrationException, MissingIngredientException { final IRC rc = Integrations.rc(); for( final ItemStack is : this.pro_input.getItemStackSet() ) @@ -81,7 +81,7 @@ public class Crusher implements ICraftHandler, IWebsiteSerializer } @Override - public boolean canCraft( final ItemStack output ) throws RegistrationError, MissingIngredientError + public boolean canCraft( final ItemStack output ) throws RegistrationException, MissingIngredientException { return Platform.itemComparisons().isSameItem( this.pro_output[0].getItemStack(), output ); } diff --git a/src/main/java/appeng/recipes/handlers/Grind.java b/src/main/java/appeng/recipes/handlers/Grind.java index 428e8fc48..dd6c9fe35 100644 --- a/src/main/java/appeng/recipes/handlers/Grind.java +++ b/src/main/java/appeng/recipes/handlers/Grind.java @@ -24,9 +24,9 @@ import java.util.List; import net.minecraft.item.ItemStack; import appeng.api.AEApi; -import appeng.api.exceptions.MissingIngredientError; -import appeng.api.exceptions.RecipeError; -import appeng.api.exceptions.RegistrationError; +import appeng.api.exceptions.MissingIngredientException; +import appeng.api.exceptions.RecipeException; +import appeng.api.exceptions.RegistrationException; import appeng.api.features.IGrinderRecipe; import appeng.api.features.IGrinderRecipeBuilder; import appeng.api.features.IGrinderRegistry; @@ -43,7 +43,7 @@ public class Grind implements ICraftHandler, IWebsiteSerializer private IIngredient[] pro_output; @Override - public void setup( final List> input, final List> output ) throws RecipeError + public void setup( final List> input, final List> output ) throws RecipeException { if( input.size() == 1 && output.size() == 1 ) { @@ -55,11 +55,11 @@ public class Grind implements ICraftHandler, IWebsiteSerializer return; } } - throw new RecipeError( "Grind must have a single input, and single output." ); + throw new RecipeException( "Grind must have a single input, and single output." ); } @Override - public void register() throws RegistrationError, MissingIngredientError + public void register() throws RegistrationException, MissingIngredientException { for( final ItemStack is : this.pro_input.getItemStackSet() ) { @@ -81,7 +81,7 @@ public class Grind implements ICraftHandler, IWebsiteSerializer } @Override - public boolean canCraft( final ItemStack output ) throws RegistrationError, MissingIngredientError + public boolean canCraft( final ItemStack output ) throws RegistrationException, MissingIngredientException { return Platform.itemComparisons().isSameItem( this.pro_output[0].getItemStack(), output ); } diff --git a/src/main/java/appeng/recipes/handlers/HCCrusher.java b/src/main/java/appeng/recipes/handlers/HCCrusher.java index a0ef8dba5..e7aa3af5b 100644 --- a/src/main/java/appeng/recipes/handlers/HCCrusher.java +++ b/src/main/java/appeng/recipes/handlers/HCCrusher.java @@ -25,9 +25,9 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.fml.common.event.FMLInterModComms; -import appeng.api.exceptions.MissingIngredientError; -import appeng.api.exceptions.RecipeError; -import appeng.api.exceptions.RegistrationError; +import appeng.api.exceptions.MissingIngredientException; +import appeng.api.exceptions.RecipeException; +import appeng.api.exceptions.RegistrationException; import appeng.api.recipes.ICraftHandler; import appeng.api.recipes.IIngredient; import appeng.core.AELog; @@ -42,7 +42,7 @@ public class HCCrusher implements ICraftHandler, IWebsiteSerializer private IIngredient[] pro_output; @Override - public void setup( final List> input, final List> output ) throws RecipeError + public void setup( final List> input, final List> output ) throws RecipeException { if( input.size() == 1 && output.size() == 1 ) { @@ -54,11 +54,11 @@ public class HCCrusher implements ICraftHandler, IWebsiteSerializer return; } } - throw new RecipeError( "Crusher must have a single input, and single output." ); + throw new RecipeException( "Crusher must have a single input, and single output." ); } @Override - public void register() throws RegistrationError, MissingIngredientError + public void register() throws RegistrationException, MissingIngredientException { for( final ItemStack beginStack : this.pro_input.getItemStackSet() ) { @@ -94,7 +94,7 @@ public class HCCrusher implements ICraftHandler, IWebsiteSerializer } @Override - public boolean canCraft( final ItemStack output ) throws RegistrationError, MissingIngredientError + public boolean canCraft( final ItemStack output ) throws RegistrationException, MissingIngredientException { return Platform.itemComparisons().isSameItem( this.pro_output[0].getItemStack(), output ); } diff --git a/src/main/java/appeng/recipes/handlers/IWebsiteSerializer.java b/src/main/java/appeng/recipes/handlers/IWebsiteSerializer.java index f15d77323..037b76e82 100644 --- a/src/main/java/appeng/recipes/handlers/IWebsiteSerializer.java +++ b/src/main/java/appeng/recipes/handlers/IWebsiteSerializer.java @@ -21,8 +21,8 @@ package appeng.recipes.handlers; import net.minecraft.item.ItemStack; -import appeng.api.exceptions.MissingIngredientError; -import appeng.api.exceptions.RegistrationError; +import appeng.api.exceptions.MissingIngredientException; +import appeng.api.exceptions.RegistrationException; import appeng.recipes.RecipeHandler; @@ -31,5 +31,5 @@ public interface IWebsiteSerializer String getPattern( RecipeHandler han ); - boolean canCraft( ItemStack output ) throws RegistrationError, MissingIngredientError; + boolean canCraft( ItemStack output ) throws RegistrationException, MissingIngredientException; } diff --git a/src/main/java/appeng/recipes/handlers/Inscribe.java b/src/main/java/appeng/recipes/handlers/Inscribe.java index d92cffce9..3af0095be 100644 --- a/src/main/java/appeng/recipes/handlers/Inscribe.java +++ b/src/main/java/appeng/recipes/handlers/Inscribe.java @@ -26,8 +26,8 @@ import java.util.List; import net.minecraft.item.ItemStack; import appeng.api.AEApi; -import appeng.api.exceptions.MissingIngredientError; -import appeng.api.exceptions.RegistrationError; +import appeng.api.exceptions.MissingIngredientException; +import appeng.api.exceptions.RegistrationException; import appeng.api.features.IInscriberRecipeBuilder; import appeng.api.features.InscriberProcessType; @@ -43,7 +43,7 @@ import appeng.api.features.InscriberProcessType; public final class Inscribe extends InscriberProcess { @Override - public void register() throws RegistrationError, MissingIngredientError + public void register() throws RegistrationException, MissingIngredientException { if( this.getImprintable() == null ) { diff --git a/src/main/java/appeng/recipes/handlers/InscriberProcess.java b/src/main/java/appeng/recipes/handlers/InscriberProcess.java index 0032b366e..c32724961 100644 --- a/src/main/java/appeng/recipes/handlers/InscriberProcess.java +++ b/src/main/java/appeng/recipes/handlers/InscriberProcess.java @@ -25,9 +25,9 @@ import javax.annotation.Nullable; import net.minecraft.item.ItemStack; -import appeng.api.exceptions.MissingIngredientError; -import appeng.api.exceptions.RecipeError; -import appeng.api.exceptions.RegistrationError; +import appeng.api.exceptions.MissingIngredientException; +import appeng.api.exceptions.RecipeException; +import appeng.api.exceptions.RegistrationException; import appeng.api.recipes.ICraftHandler; import appeng.api.recipes.IIngredient; import appeng.recipes.RecipeHandler; @@ -57,7 +57,7 @@ public abstract class InscriberProcess implements ICraftHandler, IWebsiteSeriali private IIngredient output; @Override - public void setup( final List> input, final List> output ) throws RecipeError + public void setup( final List> input, final List> output ) throws RecipeException { if( output.size() == 1 && output.get( 0 ).size() == 1 ) { @@ -76,17 +76,17 @@ public abstract class InscriberProcess implements ICraftHandler, IWebsiteSeriali } else { - throw new RecipeError( "Inscriber recipes cannot have rows, and must have more then one input." ); + throw new RecipeException( "Inscriber recipes cannot have rows, and must have more then one input." ); } } else { - throw new RecipeError( "Inscriber recipes must produce a single output." ); + throw new RecipeException( "Inscriber recipes must produce a single output." ); } } @Override - public boolean canCraft( final ItemStack reqOutput ) throws RegistrationError, MissingIngredientError + public boolean canCraft( final ItemStack reqOutput ) throws RegistrationException, MissingIngredientException { return this.output != null && Platform.itemComparisons().isSameItem( this.output.getItemStack(), reqOutput ); } diff --git a/src/main/java/appeng/recipes/handlers/Macerator.java b/src/main/java/appeng/recipes/handlers/Macerator.java index d1087f11d..ff65c429c 100644 --- a/src/main/java/appeng/recipes/handlers/Macerator.java +++ b/src/main/java/appeng/recipes/handlers/Macerator.java @@ -23,9 +23,9 @@ import java.util.List; import net.minecraft.item.ItemStack; -import appeng.api.exceptions.MissingIngredientError; -import appeng.api.exceptions.RecipeError; -import appeng.api.exceptions.RegistrationError; +import appeng.api.exceptions.MissingIngredientException; +import appeng.api.exceptions.RecipeException; +import appeng.api.exceptions.RegistrationException; import appeng.api.recipes.ICraftHandler; import appeng.api.recipes.IIngredient; import appeng.core.AELog; @@ -42,7 +42,7 @@ public class Macerator implements ICraftHandler, IWebsiteSerializer private IIngredient[] pro_output; @Override - public void setup( final List> input, final List> output ) throws RecipeError + public void setup( final List> input, final List> output ) throws RecipeException { if( input.size() == 1 && output.size() == 1 ) { @@ -54,11 +54,11 @@ public class Macerator implements ICraftHandler, IWebsiteSerializer return; } } - throw new RecipeError( "Grind must have a single input, and single output." ); + throw new RecipeException( "Grind must have a single input, and single output." ); } @Override - public void register() throws RegistrationError, MissingIngredientError + public void register() throws RegistrationException, MissingIngredientException { IIC2 ic2 = Integrations.ic2(); for( final ItemStack is : this.pro_input.getItemStackSet() ) @@ -81,7 +81,7 @@ public class Macerator implements ICraftHandler, IWebsiteSerializer } @Override - public boolean canCraft( final ItemStack output ) throws RegistrationError, MissingIngredientError + public boolean canCraft( final ItemStack output ) throws RegistrationException, MissingIngredientException { return Platform.itemComparisons().isSameItem( this.pro_output[0].getItemStack(), output ); } diff --git a/src/main/java/appeng/recipes/handlers/MekCrusher.java b/src/main/java/appeng/recipes/handlers/MekCrusher.java index af9ce9182..a1ddeff74 100644 --- a/src/main/java/appeng/recipes/handlers/MekCrusher.java +++ b/src/main/java/appeng/recipes/handlers/MekCrusher.java @@ -23,9 +23,9 @@ import java.util.List; import net.minecraft.item.ItemStack; -import appeng.api.exceptions.MissingIngredientError; -import appeng.api.exceptions.RecipeError; -import appeng.api.exceptions.RegistrationError; +import appeng.api.exceptions.MissingIngredientException; +import appeng.api.exceptions.RecipeException; +import appeng.api.exceptions.RegistrationException; import appeng.api.recipes.ICraftHandler; import appeng.api.recipes.IIngredient; import appeng.core.AELog; @@ -42,7 +42,7 @@ public class MekCrusher implements ICraftHandler, IWebsiteSerializer private IIngredient[] pro_output; @Override - public void setup( final List> input, final List> output ) throws RecipeError + public void setup( final List> input, final List> output ) throws RecipeException { if( input.size() == 1 && output.size() == 1 ) { @@ -55,11 +55,11 @@ public class MekCrusher implements ICraftHandler, IWebsiteSerializer } } - throw new RecipeError( "MekCrusher must have a single input, and single output." ); + throw new RecipeException( "MekCrusher must have a single input, and single output." ); } @Override - public void register() throws RegistrationError, MissingIngredientError + public void register() throws RegistrationException, MissingIngredientException { IMekanism mekanism = Integrations.mekanism(); for( final ItemStack is : this.pro_input.getItemStackSet() ) @@ -82,7 +82,7 @@ public class MekCrusher implements ICraftHandler, IWebsiteSerializer } @Override - public boolean canCraft( final ItemStack output ) throws RegistrationError, MissingIngredientError + public boolean canCraft( final ItemStack output ) throws RegistrationException, MissingIngredientException { return Platform.itemComparisons().isSameItem( this.pro_output[0].getItemStack(), output ); } diff --git a/src/main/java/appeng/recipes/handlers/MekEnrichment.java b/src/main/java/appeng/recipes/handlers/MekEnrichment.java index 7d2c8e0ba..969dff3f8 100644 --- a/src/main/java/appeng/recipes/handlers/MekEnrichment.java +++ b/src/main/java/appeng/recipes/handlers/MekEnrichment.java @@ -23,9 +23,9 @@ import java.util.List; import net.minecraft.item.ItemStack; -import appeng.api.exceptions.MissingIngredientError; -import appeng.api.exceptions.RecipeError; -import appeng.api.exceptions.RegistrationError; +import appeng.api.exceptions.MissingIngredientException; +import appeng.api.exceptions.RecipeException; +import appeng.api.exceptions.RegistrationException; import appeng.api.recipes.ICraftHandler; import appeng.api.recipes.IIngredient; import appeng.core.AELog; @@ -42,7 +42,7 @@ public class MekEnrichment implements ICraftHandler, IWebsiteSerializer private IIngredient[] pro_output; @Override - public void setup( final List> input, final List> output ) throws RecipeError + public void setup( final List> input, final List> output ) throws RecipeException { if( input.size() == 1 && output.size() == 1 ) { @@ -54,11 +54,11 @@ public class MekEnrichment implements ICraftHandler, IWebsiteSerializer return; } } - throw new RecipeError( "MekCrusher must have a single input, and single output." ); + throw new RecipeException( "MekCrusher must have a single input, and single output." ); } @Override - public void register() throws RegistrationError, MissingIngredientError + public void register() throws RegistrationException, MissingIngredientException { IMekanism mekanism = Integrations.mekanism(); for( final ItemStack is : this.pro_input.getItemStackSet() ) @@ -81,7 +81,7 @@ public class MekEnrichment implements ICraftHandler, IWebsiteSerializer } @Override - public boolean canCraft( final ItemStack output ) throws RegistrationError, MissingIngredientError + public boolean canCraft( final ItemStack output ) throws RegistrationException, MissingIngredientException { return Platform.itemComparisons().isSameItem( this.pro_output[0].getItemStack(), output ); } diff --git a/src/main/java/appeng/recipes/handlers/OreRegistration.java b/src/main/java/appeng/recipes/handlers/OreRegistration.java index 4a9f3ddfd..deb23983e 100644 --- a/src/main/java/appeng/recipes/handlers/OreRegistration.java +++ b/src/main/java/appeng/recipes/handlers/OreRegistration.java @@ -24,9 +24,9 @@ import java.util.List; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; -import appeng.api.exceptions.MissingIngredientError; -import appeng.api.exceptions.RecipeError; -import appeng.api.exceptions.RegistrationError; +import appeng.api.exceptions.MissingIngredientException; +import appeng.api.exceptions.RecipeException; +import appeng.api.exceptions.RegistrationException; import appeng.api.recipes.ICraftHandler; import appeng.api.recipes.IIngredient; @@ -44,13 +44,13 @@ public class OreRegistration implements ICraftHandler } @Override - public void setup( final List> input, final List> output ) throws RecipeError + public void setup( final List> input, final List> output ) throws RecipeException { } @Override - public void register() throws RegistrationError, MissingIngredientError + public void register() throws RegistrationException, MissingIngredientException { for( final IIngredient i : this.inputs ) { diff --git a/src/main/java/appeng/recipes/handlers/Press.java b/src/main/java/appeng/recipes/handlers/Press.java index 8d1f07311..fa484547b 100644 --- a/src/main/java/appeng/recipes/handlers/Press.java +++ b/src/main/java/appeng/recipes/handlers/Press.java @@ -26,8 +26,8 @@ import java.util.List; import net.minecraft.item.ItemStack; import appeng.api.AEApi; -import appeng.api.exceptions.MissingIngredientError; -import appeng.api.exceptions.RegistrationError; +import appeng.api.exceptions.MissingIngredientException; +import appeng.api.exceptions.RegistrationException; import appeng.api.features.IInscriberRecipe; import appeng.api.features.IInscriberRecipeBuilder; import appeng.api.features.InscriberProcessType; @@ -44,7 +44,7 @@ import appeng.api.features.InscriberProcessType; public final class Press extends InscriberProcess { @Override - public void register() throws RegistrationError, MissingIngredientError + public void register() throws RegistrationException, MissingIngredientException { if( this.getImprintable() == null ) { diff --git a/src/main/java/appeng/recipes/handlers/Pulverizer.java b/src/main/java/appeng/recipes/handlers/Pulverizer.java index f5bb0b6b6..ad700d189 100644 --- a/src/main/java/appeng/recipes/handlers/Pulverizer.java +++ b/src/main/java/appeng/recipes/handlers/Pulverizer.java @@ -25,9 +25,9 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.fml.common.event.FMLInterModComms; -import appeng.api.exceptions.MissingIngredientError; -import appeng.api.exceptions.RecipeError; -import appeng.api.exceptions.RegistrationError; +import appeng.api.exceptions.MissingIngredientException; +import appeng.api.exceptions.RecipeException; +import appeng.api.exceptions.RegistrationException; import appeng.api.recipes.ICraftHandler; import appeng.api.recipes.IIngredient; import appeng.recipes.RecipeHandler; @@ -41,7 +41,7 @@ public class Pulverizer implements ICraftHandler, IWebsiteSerializer private IIngredient[] pro_output; @Override - public void setup( final List> input, final List> output ) throws RecipeError + public void setup( final List> input, final List> output ) throws RecipeException { if( input.size() == 1 && output.size() == 1 ) { @@ -53,11 +53,11 @@ public class Pulverizer implements ICraftHandler, IWebsiteSerializer return; } } - throw new RecipeError( "Grind must have a single input, and single output." ); + throw new RecipeException( "Grind must have a single input, and single output." ); } @Override - public void register() throws RegistrationError, MissingIngredientError + public void register() throws RegistrationException, MissingIngredientException { final NBTTagCompound toSend = new NBTTagCompound(); toSend.setInteger( "energy", 800 ); @@ -80,7 +80,7 @@ public class Pulverizer implements ICraftHandler, IWebsiteSerializer } @Override - public boolean canCraft( final ItemStack output ) throws RegistrationError, MissingIngredientError + public boolean canCraft( final ItemStack output ) throws RegistrationException, MissingIngredientException { return Platform.itemComparisons().isSameItem( this.pro_output[0].getItemStack(), output ); } diff --git a/src/main/java/appeng/recipes/handlers/Shaped.java b/src/main/java/appeng/recipes/handlers/Shaped.java index 48950bea1..54735fe06 100644 --- a/src/main/java/appeng/recipes/handlers/Shaped.java +++ b/src/main/java/appeng/recipes/handlers/Shaped.java @@ -24,9 +24,9 @@ import java.util.List; import net.minecraft.item.ItemStack; -import appeng.api.exceptions.MissingIngredientError; -import appeng.api.exceptions.RecipeError; -import appeng.api.exceptions.RegistrationError; +import appeng.api.exceptions.MissingIngredientException; +import appeng.api.exceptions.RecipeException; +import appeng.api.exceptions.RegistrationException; import appeng.api.recipes.ICraftHandler; import appeng.api.recipes.IIngredient; import appeng.core.AELog; @@ -43,7 +43,7 @@ public class Shaped implements ICraftHandler, IWebsiteSerializer private int cols; @Override - public void setup( final List> input, final List> output ) throws RecipeError + public void setup( final List> input, final List> output ) throws RecipeException { if( output.size() == 1 && output.get( 0 ).size() == 1 ) { @@ -57,7 +57,7 @@ public class Shaped implements ICraftHandler, IWebsiteSerializer { if( anInput.size() != this.cols ) { - throw new RecipeError( "all rows in a shaped crafting recipe must contain the same number of ingredients." ); + throw new RecipeException( "all rows in a shaped crafting recipe must contain the same number of ingredients." ); } } @@ -66,22 +66,22 @@ public class Shaped implements ICraftHandler, IWebsiteSerializer } else { - throw new RecipeError( "Crafting recipes must have 1-3 columns." ); + throw new RecipeException( "Crafting recipes must have 1-3 columns." ); } } else { - throw new RecipeError( "shaped crafting recipes must have 1-3 rows." ); + throw new RecipeException( "shaped crafting recipes must have 1-3 rows." ); } } else { - throw new RecipeError( "Crafting must produce a single output." ); + throw new RecipeException( "Crafting must produce a single output." ); } } @Override - public void register() throws RegistrationError, MissingIngredientError + public void register() throws RegistrationException, MissingIngredientException { char first = 'A'; final List args = new ArrayList<>(); @@ -117,7 +117,7 @@ public class Shaped implements ICraftHandler, IWebsiteSerializer catch( final Throwable e ) { AELog.debug( e ); - throw new RegistrationError( "Error while adding shaped recipe." ); + throw new RegistrationException( "Error while adding shaped recipe." ); } } @@ -149,7 +149,7 @@ public class Shaped implements ICraftHandler, IWebsiteSerializer } @Override - public boolean canCraft( final ItemStack reqOutput ) throws RegistrationError, MissingIngredientError + public boolean canCraft( final ItemStack reqOutput ) throws RegistrationException, MissingIngredientException { for( int y = 0; y < this.rows; y++ ) { diff --git a/src/main/java/appeng/recipes/handlers/Shapeless.java b/src/main/java/appeng/recipes/handlers/Shapeless.java index 9c2585785..9b7251e25 100644 --- a/src/main/java/appeng/recipes/handlers/Shapeless.java +++ b/src/main/java/appeng/recipes/handlers/Shapeless.java @@ -24,9 +24,9 @@ import java.util.List; import net.minecraft.item.ItemStack; -import appeng.api.exceptions.MissingIngredientError; -import appeng.api.exceptions.RecipeError; -import appeng.api.exceptions.RegistrationError; +import appeng.api.exceptions.MissingIngredientException; +import appeng.api.exceptions.RecipeException; +import appeng.api.exceptions.RegistrationException; import appeng.api.recipes.ICraftHandler; import appeng.api.recipes.IIngredient; import appeng.core.AELog; @@ -41,7 +41,7 @@ public class Shapeless implements ICraftHandler, IWebsiteSerializer private IIngredient output; @Override - public void setup( final List> input, final List> output ) throws RecipeError + public void setup( final List> input, final List> output ) throws RecipeException { if( output.size() == 1 && output.get( 0 ).size() == 1 ) { @@ -52,17 +52,17 @@ public class Shapeless implements ICraftHandler, IWebsiteSerializer } else { - throw new RecipeError( "Shapeless crafting recipes cannot have rows." ); + throw new RecipeException( "Shapeless crafting recipes cannot have rows." ); } } else { - throw new RecipeError( "Crafting must produce a single output." ); + throw new RecipeException( "Crafting must produce a single output." ); } } @Override - public void register() throws RegistrationError, MissingIngredientError + public void register() throws RegistrationException, MissingIngredientException { final List args = new ArrayList<>(); for( final IIngredient i : this.inputs ) @@ -81,7 +81,7 @@ public class Shapeless implements ICraftHandler, IWebsiteSerializer catch( final Throwable e ) { AELog.debug( e ); - throw new RegistrationError( "Error while adding shapeless recipe." ); + throw new RegistrationException( "Error while adding shapeless recipe." ); } } @@ -119,7 +119,7 @@ public class Shapeless implements ICraftHandler, IWebsiteSerializer } @Override - public boolean canCraft( final ItemStack reqOutput ) throws RegistrationError, MissingIngredientError + public boolean canCraft( final ItemStack reqOutput ) throws RegistrationException, MissingIngredientException { for( final IIngredient i : this.inputs ) diff --git a/src/main/java/appeng/recipes/handlers/Smelt.java b/src/main/java/appeng/recipes/handlers/Smelt.java index a6f368972..6dda9f38b 100644 --- a/src/main/java/appeng/recipes/handlers/Smelt.java +++ b/src/main/java/appeng/recipes/handlers/Smelt.java @@ -25,9 +25,9 @@ import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.common.registry.GameRegistry; -import appeng.api.exceptions.MissingIngredientError; -import appeng.api.exceptions.RecipeError; -import appeng.api.exceptions.RegistrationError; +import appeng.api.exceptions.MissingIngredientException; +import appeng.api.exceptions.RecipeException; +import appeng.api.exceptions.RegistrationException; import appeng.api.recipes.ICraftHandler; import appeng.api.recipes.IIngredient; import appeng.recipes.RecipeHandler; @@ -41,7 +41,7 @@ public class Smelt implements ICraftHandler, IWebsiteSerializer private IIngredient out; @Override - public void setup( final List> input, final List> output ) throws RecipeError + public void setup( final List> input, final List> output ) throws RecipeException { if( input.size() == 1 && output.size() == 1 ) { @@ -54,20 +54,20 @@ public class Smelt implements ICraftHandler, IWebsiteSerializer return; } } - throw new RecipeError( "Smelting recipe can only have a single input and output." ); + throw new RecipeException( "Smelting recipe can only have a single input and output." ); } @Override - public void register() throws RegistrationError, MissingIngredientError + public void register() throws RegistrationException, MissingIngredientException { if( this.in.getItemStack().getItem() == Items.AIR ) { - throw new RegistrationError( this.in.toString() + ": Smelting Input is not a valid item." ); + throw new RegistrationException( this.in.toString() + ": Smelting Input is not a valid item." ); } if( this.out.getItemStack().getItem() == Items.AIR ) { - throw new RegistrationError( this.out.toString() + ": Smelting Output is not a valid item." ); + throw new RegistrationException( this.out.toString() + ": Smelting Output is not a valid item." ); } GameRegistry.addSmelting( this.in.getItemStack(), this.out.getItemStack(), 0 ); @@ -80,7 +80,7 @@ public class Smelt implements ICraftHandler, IWebsiteSerializer } @Override - public boolean canCraft( final ItemStack reqOutput ) throws RegistrationError, MissingIngredientError + public boolean canCraft( final ItemStack reqOutput ) throws RegistrationException, MissingIngredientException { return Platform.itemComparisons().isSameItem( this.out.getItemStack(), reqOutput ); } diff --git a/src/main/java/appeng/tile/misc/TileSecurityStation.java b/src/main/java/appeng/tile/misc/TileSecurityStation.java index 11b0dbac7..b8de0c164 100644 --- a/src/main/java/appeng/tile/misc/TileSecurityStation.java +++ b/src/main/java/appeng/tile/misc/TileSecurityStation.java @@ -59,7 +59,6 @@ import appeng.api.storage.IMEInventoryHandler; import appeng.api.storage.IMEMonitor; import appeng.api.storage.IStorageChannel; import appeng.api.storage.ITerminalHost; -import appeng.api.storage.MEMonitorHandler; import appeng.api.storage.channels.IItemStorageChannel; import appeng.api.storage.data.IAEItemStack; import appeng.api.storage.data.IAEStack; @@ -70,6 +69,7 @@ import appeng.api.util.DimensionalCoord; import appeng.api.util.IConfigManager; import appeng.helpers.PlayerSecurityWrapper; import appeng.me.GridAccessException; +import appeng.me.helpers.MEMonitorHandler; import appeng.me.storage.SecurityStationInventory; import appeng.tile.grid.AENetworkTile; import appeng.tile.inventory.AppEngInternalInventory; diff --git a/src/main/java/appeng/tile/storage/TileChest.java b/src/main/java/appeng/tile/storage/TileChest.java index b0a4fba1d..7dd352405 100644 --- a/src/main/java/appeng/tile/storage/TileChest.java +++ b/src/main/java/appeng/tile/storage/TileChest.java @@ -78,7 +78,6 @@ import appeng.api.storage.IStorageChannel; import appeng.api.storage.IStorageMonitorable; import appeng.api.storage.IStorageMonitorableAccessor; import appeng.api.storage.ITerminalHost; -import appeng.api.storage.MEMonitorHandler; import appeng.api.storage.channels.IFluidStorageChannel; import appeng.api.storage.channels.IItemStorageChannel; import appeng.api.storage.data.IAEFluidStack; @@ -89,6 +88,7 @@ import appeng.api.util.IConfigManager; import appeng.capabilities.Capabilities; import appeng.helpers.IPriorityHost; import appeng.me.GridAccessException; +import appeng.me.helpers.MEMonitorHandler; import appeng.me.helpers.MachineSource; import appeng.me.storage.MEInventoryHandler; import appeng.tile.grid.AENetworkPowerTile; diff --git a/src/main/java/appeng/util/inv/ItemSlot.java b/src/main/java/appeng/util/inv/ItemSlot.java index 33ca833ae..795a6336e 100644 --- a/src/main/java/appeng/util/inv/ItemSlot.java +++ b/src/main/java/appeng/util/inv/ItemSlot.java @@ -48,7 +48,8 @@ public class ItemSlot public IAEItemStack getAEItemStack() { - return this.aeItemStack == null ? ( this.itemStack.isEmpty() ? null : ( this.aeItemStack = AEItemStack.fromItemStack( this.itemStack ) ) ) : this.aeItemStack; + return this.aeItemStack == null ? ( this.itemStack + .isEmpty() ? null : ( this.aeItemStack = AEItemStack.fromItemStack( this.itemStack ) ) ) : this.aeItemStack; } void setAEItemStack( final IAEItemStack is )