From 97bdb5f2093d415b7b0d412e33ce2c262956dcdc Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Tue, 30 Dec 2014 10:22:38 -0500 Subject: [PATCH] Remove AE2 rv1 support, update API to rv2 --- src/api/java/appeng/.gitignore | 6 + src/api/java/appeng/api/IAppEngApi.java | 8 +- src/api/java/appeng/api/LICENSE | 20 + src/api/java/appeng/api/README.md | 19 + .../appeng/api/config/AccessRestriction.java | 12 +- ...ndenserOuput.java => CondenserOutput.java} | 2 +- .../appeng/api/config/LevelEmitterMode.java | 2 +- .../java/appeng/api/config/ModSettings.java | 12 +- .../java/appeng/api/config/PowerUnits.java | 4 +- src/api/java/appeng/api/config/Settings.java | 92 ++--- src/api/java/appeng/api/config/SortDir.java | 2 +- .../java/appeng/api/config/StorageFilter.java | 2 +- .../java/appeng/api/config/TunnelType.java | 30 +- .../java/appeng/api/definitions/Blocks.java | 2 +- .../appeng/api/definitions/Materials.java | 6 +- .../api/events/LocatableEventAnnounce.java | 2 +- .../exceptions/MissingIngredientError.java | 22 +- .../api/exceptions/ModNotInstalled.java | 24 +- .../appeng/api/exceptions/RecipeError.java | 24 +- .../appeng/api/features/IGrinderEntry.java | 18 +- .../appeng/api/features/IGrinderRegistry.java | 8 +- ...ider.java => IItemComparisonProvider.java} | 6 +- .../api/features/ILocatableRegistry.java | 4 +- .../features/IMatterCannonAmmoRegistry.java | 6 +- .../api/features/INetworkEncodable.java | 55 ++- .../api/features/IP2PTunnelRegistry.java | 4 +- .../appeng/api/features/IPlayerRegistry.java | 10 +- .../api/features/IRecipeHandlerRegistry.java | 97 ++--- .../api/features/IRegistryContainer.java | 10 +- .../features/ISpecialComparisonRegistry.java | 8 +- .../api/features/IWirelessTermHandler.java | 14 +- ...istery.java => IWirelessTermRegistry.java} | 12 +- .../java/appeng/api/features/IWorldGen.java | 8 +- .../implementations/ICraftingPatternItem.java | 8 +- .../implementations/IPowerChannelState.java | 2 +- .../api/implementations/IUpgradeableHost.java | 6 +- .../api/implementations/TransitionResult.java | 6 +- .../implementations/guiobjects/IGuiItem.java | 30 +- .../guiobjects/IGuiItemObject.java | 18 +- .../guiobjects/INetworkTool.java | 28 +- .../guiobjects/IPortableCell.java | 28 +- .../items/IAEItemPowerStorage.java | 8 +- .../api/implementations/items/IAEWrench.java | 11 +- .../implementations/items/IBiometricCard.java | 29 +- .../api/implementations/items/IItemGroup.java | 6 +- .../implementations/items/IMemoryCard.java | 12 +- .../items/ISpatialStorageCell.java | 30 +- .../implementations/items/IStorageCell.java | 18 +- .../items/IStorageComponent.java | 8 +- .../implementations/items/IUpgradeModule.java | 2 +- .../api/implementations/parts/IPartCable.java | 16 +- .../implementations/tiles/IChestOrDrive.java | 4 +- .../tiles/ICraftingMachine.java | 10 +- .../tiles/ISegmentedInventory.java | 4 +- .../tiles/ITileStorageMonitorable.java | 30 +- .../tiles/IWirelessAccessPoint.java | 60 +-- .../api/integration/IBeeComparison.java | 36 +- .../appeng/api/movable/IMovableHandler.java | 23 +- .../appeng/api/movable/IMovableRegistry.java | 14 +- .../java/appeng/api/movable/IMovableTile.java | 2 +- .../java/appeng/api/networking/GridFlags.java | 90 ++--- .../api/networking/GridNotification.java | 18 +- src/api/java/appeng/api/networking/IGrid.java | 142 +++---- .../appeng/api/networking/IGridBlock.java | 177 ++++----- .../appeng/api/networking/IGridCache.java | 142 +++---- .../api/networking/IGridCacheRegistry.java | 55 ++- .../api/networking/IGridConnection.java | 114 +++--- ...sitor.java => IGridConnectionVisitor.java} | 2 +- .../java/appeng/api/networking/IGridHost.java | 86 ++--- .../java/appeng/api/networking/IGridNode.java | 280 +++++++------- .../appeng/api/networking/IGridVisitor.java | 42 +-- .../networking/crafting/ICraftingGrid.java | 37 +- .../api/networking/crafting/ICraftingJob.java | 2 +- .../networking/crafting/ICraftingLink.java | 2 +- .../networking/crafting/ICraftingMedium.java | 5 +- .../crafting/ICraftingPatternDetails.java | 26 +- .../crafting/ICraftingProvider.java | 2 +- .../crafting/ICraftingRequester.java | 8 +- .../crafting/ICraftingWatcherHost.java | 8 +- .../networking/energy/IAEPowerStorage.java | 9 +- .../api/networking/energy/IEnergyGrid.java | 164 ++++---- .../energy/IEnergyGridProvider.java | 56 +-- .../api/networking/energy/IEnergySource.java | 5 +- .../networking/energy/IEnergyWatcherHost.java | 6 +- .../events/MENetworkCellArrayUpdate.java | 2 +- .../events/MENetworkChannelChanged.java | 2 +- .../api/networking/events/MENetworkEvent.java | 6 +- .../MENetworkPostCacheConstruction.java | 20 +- .../events/MENetworkPowerIdleChange.java | 2 +- .../events/MENetworkPowerStorage.java | 2 +- .../events/MENetworkSpatialEvent.java | 28 +- .../api/networking/pathing/IPathingGrid.java | 46 +-- .../networking/security/ISecurityGrid.java | 8 +- .../security/ISecurityProvider.java | 6 +- ...tyRegister.java => ISecurityRegistry.java} | 10 +- .../api/networking/spatial/ISpatialCache.java | 6 +- .../networking/storage/IStackWatcherHost.java | 12 +- .../api/networking/storage/IStorageGrid.java | 90 ++--- .../api/networking/ticking/IGridTickable.java | 112 +++--- .../api/networking/ticking/ITickManager.java | 88 ++--- .../ticking/TickRateModulation.java | 68 ++-- .../networking/ticking/TickingRequest.java | 108 +++--- src/api/java/appeng/api/package-info.java | 10 +- src/api/java/appeng/api/parts/BusSupport.java | 20 +- .../java/appeng/api/parts/IAlphaPassItem.java | 4 +- .../java/appeng/api/parts/IBoxProvider.java | 4 +- .../appeng/api/parts/IFacadeContainer.java | 105 ++++-- .../java/appeng/api/parts/IFacadePart.java | 151 ++++---- src/api/java/appeng/api/parts/IPart.java | 162 ++++---- ...nHelper.java => IPartCollisionHelper.java} | 14 +- .../java/appeng/api/parts/IPartHelper.java | 17 +- src/api/java/appeng/api/parts/IPartHost.java | 302 +++++++-------- src/api/java/appeng/api/parts/IPartItem.java | 35 +- .../appeng/api/parts/IPartRenderHelper.java | 98 ++--- src/api/java/appeng/api/parts/LayerBase.java | 10 +- .../java/appeng/api/parts/PartItemStack.java | 28 +- .../appeng/api/recipes/ICraftHandler.java | 8 +- .../java/appeng/api/recipes/IIngredient.java | 128 +++---- .../appeng/api/recipes/IRecipeHandler.java | 4 +- .../appeng/api/recipes/ISubItemResolver.java | 6 +- .../appeng/api/storage/ICellContainer.java | 2 +- .../java/appeng/api/storage/ICellHandler.java | 28 +- .../appeng/api/storage/ICellRegistry.java | 10 +- .../api/storage/ICellWorkbenchItem.java | 2 +- .../api/storage/IExternalStorageHandler.java | 12 +- .../api/storage/IExternalStorageRegistry.java | 10 +- .../java/appeng/api/storage/IMEInventory.java | 6 +- .../api/storage/IMEInventoryHandler.java | 4 +- .../java/appeng/api/storage/IMEMonitor.java | 2 +- .../storage/IMEMonitorHandlerReceiver.java | 6 +- .../appeng/api/storage/IStorageHelper.java | 45 ++- .../appeng/api/storage/ITerminalHost.java | 4 +- .../appeng/api/storage/MEMonitorHandler.java | 21 +- .../appeng/api/storage/StorageChannel.java | 66 ++-- .../api/storage/data/IAEFluidStack.java | 2 +- .../appeng/api/storage/data/IAEItemStack.java | 10 +- .../appeng/api/storage/data/IAEStack.java | 357 +++++++++--------- .../api/storage/data/IAETagCompound.java | 4 +- .../api/storage/data/IItemContainer.java | 10 +- .../appeng/api/storage/data/IItemList.java | 8 +- src/api/java/appeng/api/util/AECableType.java | 60 +-- src/api/java/appeng/api/util/AEColor.java | 178 +++++---- .../api/util/AEColoredItemDefinition.java | 93 ++--- .../appeng/api/util/AEItemDefinition.java | 108 +++--- .../appeng/api/util/DimensionalCoord.java | 8 +- src/api/java/appeng/api/util/ICommonTile.java | 44 +-- .../java/appeng/api/util/IConfigManager.java | 29 +- ...leObject.java => IConfigurableObject.java} | 2 +- src/api/java/appeng/api/util/IOrientable.java | 6 +- .../appeng/api/util/IOrientableBlock.java | 48 +-- src/api/java/appeng/api/util/WorldCoord.java | 4 +- .../enderio/conduit/ConduitRecipes.java | 10 +- .../enderio/conduit/me/MEConduitGrid.java | 7 +- 153 files changed, 2747 insertions(+), 2659 deletions(-) create mode 100644 src/api/java/appeng/.gitignore create mode 100644 src/api/java/appeng/api/LICENSE create mode 100644 src/api/java/appeng/api/README.md rename src/api/java/appeng/api/config/{CondenserOuput.java => CondenserOutput.java} (82%) rename src/api/java/appeng/api/features/{IItemComparisionProvider.java => IItemComparisonProvider.java} (89%) rename src/api/java/appeng/api/features/{IWirelessTermRegistery.java => IWirelessTermRegistry.java} (77%) rename src/api/java/appeng/api/networking/{IGridConnecitonVisitor.java => IGridConnectionVisitor.java} (75%) rename src/api/java/appeng/api/networking/security/{ISecurityRegister.java => ISecurityRegistry.java} (75%) rename src/api/java/appeng/api/parts/{IPartCollsionHelper.java => IPartCollisionHelper.java} (71%) rename src/api/java/appeng/api/util/{IConfigureableObject.java => IConfigurableObject.java} (82%) diff --git a/src/api/java/appeng/.gitignore b/src/api/java/appeng/.gitignore new file mode 100644 index 00000000..0f182a03 --- /dev/null +++ b/src/api/java/appeng/.gitignore @@ -0,0 +1,6 @@ +*.class + +# Package Files # +*.jar +*.war +*.ear diff --git a/src/api/java/appeng/api/IAppEngApi.java b/src/api/java/appeng/api/IAppEngApi.java index ed14ed63..c8546bdb 100644 --- a/src/api/java/appeng/api/IAppEngApi.java +++ b/src/api/java/appeng/api/IAppEngApi.java @@ -54,16 +54,16 @@ public interface IAppEngApi /** * create a grid node for your {@link IGridHost} * - * @param block - * @return + * @param block grid block + * @return grid node of block */ IGridNode createGridNode(IGridBlock block); /** * create a connection between two {@link IGridNode} * - * @param a - * @param b + * @param a to be connected gridnode + * @param b to be connected gridnode * @throws FailedConnection */ IGridConnection createGridConnection(IGridNode a, IGridNode b) throws FailedConnection; diff --git a/src/api/java/appeng/api/LICENSE b/src/api/java/appeng/api/LICENSE new file mode 100644 index 00000000..643181ca --- /dev/null +++ b/src/api/java/appeng/api/LICENSE @@ -0,0 +1,20 @@ +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. diff --git a/src/api/java/appeng/api/README.md b/src/api/java/appeng/api/README.md new file mode 100644 index 00000000..2c43544e --- /dev/null +++ b/src/api/java/appeng/api/README.md @@ -0,0 +1,19 @@ +Applied-Energistics-2-API +========================= + +The API for Applied Energistics 2. It is open source to discuss changes, improve documentation, and provide better add-on support in general. + +Development and standard builds can be obtained [Here](http://ae2.ae-mod.info/Downloads/). + +Maven +========================= + +When compiling against the AE2 API you can use gradle dependencies, just add + +dependencies { + compile "appeng:appliedenergistics2:rv_-_____-__:dev" +} + +or add the compile line to your existing dependencies task to your build.gradle + +Where the __ are filled in with the correct version criteria; AE2 is available from the default forge maven so no additional repositories are necessary. diff --git a/src/api/java/appeng/api/config/AccessRestriction.java b/src/api/java/appeng/api/config/AccessRestriction.java index 56fac0f9..4867b539 100644 --- a/src/api/java/appeng/api/config/AccessRestriction.java +++ b/src/api/java/appeng/api/config/AccessRestriction.java @@ -4,30 +4,30 @@ public enum AccessRestriction { NO_ACCESS(0), READ(1), WRITE(2), READ_WRITE(3); - private final int permisionBit; + private final int permissionBit; private AccessRestriction(int v) { - permisionBit = v; + permissionBit = v; } public boolean hasPermission(AccessRestriction ar) { - return (permisionBit & ar.permisionBit) == ar.permisionBit; + return (permissionBit & ar.permissionBit) == ar.permissionBit; } public AccessRestriction restrictPermissions(AccessRestriction ar) { - return getPermByBit( permisionBit & ar.permisionBit ); + return getPermByBit( permissionBit & ar.permissionBit); } public AccessRestriction addPermissions(AccessRestriction ar) { - return getPermByBit( permisionBit | ar.permisionBit ); + return getPermByBit( permissionBit | ar.permissionBit); } public AccessRestriction removePermissions(AccessRestriction ar) { - return getPermByBit( permisionBit & (~ar.permisionBit) ); + return getPermByBit( permissionBit & (~ar.permissionBit) ); } private AccessRestriction getPermByBit(int bit) diff --git a/src/api/java/appeng/api/config/CondenserOuput.java b/src/api/java/appeng/api/config/CondenserOutput.java similarity index 82% rename from src/api/java/appeng/api/config/CondenserOuput.java rename to src/api/java/appeng/api/config/CondenserOutput.java index db84fc27..e2c501d4 100644 --- a/src/api/java/appeng/api/config/CondenserOuput.java +++ b/src/api/java/appeng/api/config/CondenserOutput.java @@ -1,7 +1,7 @@ package appeng.api.config; -public enum CondenserOuput +public enum CondenserOutput { TRASH, // 0 diff --git a/src/api/java/appeng/api/config/LevelEmitterMode.java b/src/api/java/appeng/api/config/LevelEmitterMode.java index 4fafbf96..46709c8a 100644 --- a/src/api/java/appeng/api/config/LevelEmitterMode.java +++ b/src/api/java/appeng/api/config/LevelEmitterMode.java @@ -5,6 +5,6 @@ public enum LevelEmitterMode STORED_AMOUNT, - STOREABLE_AMOUNT + STORABLE_AMOUNT } \ No newline at end of file diff --git a/src/api/java/appeng/api/config/ModSettings.java b/src/api/java/appeng/api/config/ModSettings.java index 9b578dc0..84fe79f3 100644 --- a/src/api/java/appeng/api/config/ModSettings.java +++ b/src/api/java/appeng/api/config/ModSettings.java @@ -1,6 +1,6 @@ -package appeng.api.config; - -public enum ModSettings -{ - -} +package appeng.api.config; + +public enum ModSettings +{ + +} diff --git a/src/api/java/appeng/api/config/PowerUnits.java b/src/api/java/appeng/api/config/PowerUnits.java index 8a0d2f7a..edcf5d71 100644 --- a/src/api/java/appeng/api/config/PowerUnits.java +++ b/src/api/java/appeng/api/config/PowerUnits.java @@ -30,8 +30,8 @@ public enum PowerUnits * * will normally returns 64, as it will convert the EU, to AE with AE's power settings. * - * @param target - * @param value + * @param target target power unit + * @param value value * @return value converted to target units, from this units. */ public double convertTo(PowerUnits target, double value) diff --git a/src/api/java/appeng/api/config/Settings.java b/src/api/java/appeng/api/config/Settings.java index 1925907c..1f15b86a 100644 --- a/src/api/java/appeng/api/config/Settings.java +++ b/src/api/java/appeng/api/config/Settings.java @@ -1,46 +1,46 @@ -package appeng.api.config; - -import java.util.EnumSet; - -public enum Settings -{ - LEVEL_EMITTER_MODE(EnumSet.allOf( LevelEmitterMode.class )), - - REDSTONE_EMITTER(EnumSet.of( RedstoneMode.HIGH_SIGNAL, RedstoneMode.LOW_SIGNAL )), REDSTONE_CONTROLLED(EnumSet.allOf( RedstoneMode.class )), - - CONDENSER_OUTPUT(EnumSet.allOf( CondenserOuput.class )), - - POWER_UNITS(EnumSet.allOf( PowerUnits.class )), ACCESS(EnumSet.of( AccessRestriction.READ_WRITE, AccessRestriction.READ, AccessRestriction.WRITE )), - - SORT_DIRECTION(EnumSet.allOf( SortDir.class )), SORT_BY(EnumSet.allOf( SortOrder.class )), - - SEARCH_TOOLTIPS(EnumSet.of( YesNo.YES, YesNo.NO )), VIEW_MODE(EnumSet.allOf( ViewItems.class )), SEARCH_MODE(EnumSet.allOf( SearchBoxMode.class )), - - ACTIONS(EnumSet.allOf( ActionItems.class )), IO_DIRECTION(EnumSet.of( RelativeDirection.LEFT, RelativeDirection.RIGHT )), - - BLOCK(EnumSet.of( YesNo.YES, YesNo.NO )), OPERATION_MODE(EnumSet.allOf( OperationMode.class )), - - FULLNESS_MODE(EnumSet.allOf( FullnessMode.class )), CRAFT_ONLY(EnumSet.of( YesNo.YES, YesNo.NO )), - - FUZZY_MODE(EnumSet.allOf( FuzzyMode.class )), LEVEL_TYPE(EnumSet.allOf( LevelType.class )), - - TERMINAL_STYLE(EnumSet.of( TerminalStyle.TALL, TerminalStyle.SMALL )), COPY_MODE(EnumSet.allOf( CopyMode.class )), - - INTERFACE_TERMINAL(EnumSet.of( YesNo.YES, YesNo.NO )), CRAFT_VIA_REDSTONE(EnumSet.of( YesNo.YES, YesNo.NO )), - - STORAGE_FILTER(EnumSet.allOf( StorageFilter.class )); - - private EnumSet values; - - public EnumSet getPossibleValues() - { - return values; - } - - private Settings(EnumSet set) { - if ( set == null || set.isEmpty() ) - throw new RuntimeException( "Invalid configuration." ); - values = set; - } - -} +package appeng.api.config; + +import java.util.EnumSet; + +public enum Settings +{ + LEVEL_EMITTER_MODE(EnumSet.allOf( LevelEmitterMode.class )), + + REDSTONE_EMITTER(EnumSet.of( RedstoneMode.HIGH_SIGNAL, RedstoneMode.LOW_SIGNAL )), REDSTONE_CONTROLLED(EnumSet.allOf( RedstoneMode.class )), + + CONDENSER_OUTPUT(EnumSet.allOf( CondenserOutput.class )), + + POWER_UNITS(EnumSet.allOf( PowerUnits.class )), ACCESS(EnumSet.of( AccessRestriction.READ_WRITE, AccessRestriction.READ, AccessRestriction.WRITE )), + + SORT_DIRECTION(EnumSet.allOf( SortDir.class )), SORT_BY(EnumSet.allOf( SortOrder.class )), + + SEARCH_TOOLTIPS(EnumSet.of( YesNo.YES, YesNo.NO )), VIEW_MODE(EnumSet.allOf( ViewItems.class )), SEARCH_MODE(EnumSet.allOf( SearchBoxMode.class )), + + ACTIONS(EnumSet.allOf( ActionItems.class )), IO_DIRECTION(EnumSet.of( RelativeDirection.LEFT, RelativeDirection.RIGHT )), + + BLOCK(EnumSet.of( YesNo.YES, YesNo.NO )), OPERATION_MODE(EnumSet.allOf( OperationMode.class )), + + FULLNESS_MODE(EnumSet.allOf( FullnessMode.class )), CRAFT_ONLY(EnumSet.of( YesNo.YES, YesNo.NO )), + + FUZZY_MODE(EnumSet.allOf( FuzzyMode.class )), LEVEL_TYPE(EnumSet.allOf( LevelType.class )), + + TERMINAL_STYLE(EnumSet.of( TerminalStyle.TALL, TerminalStyle.SMALL )), COPY_MODE(EnumSet.allOf( CopyMode.class )), + + INTERFACE_TERMINAL(EnumSet.of( YesNo.YES, YesNo.NO )), CRAFT_VIA_REDSTONE(EnumSet.of( YesNo.YES, YesNo.NO )), + + STORAGE_FILTER(EnumSet.allOf( StorageFilter.class )); + + private EnumSet values; + + public EnumSet getPossibleValues() + { + return values; + } + + private Settings(EnumSet set) { + if ( set == null || set.isEmpty() ) + throw new RuntimeException( "Invalid configuration." ); + values = set; + } + +} diff --git a/src/api/java/appeng/api/config/SortDir.java b/src/api/java/appeng/api/config/SortDir.java index 305ebfb4..140393bb 100644 --- a/src/api/java/appeng/api/config/SortDir.java +++ b/src/api/java/appeng/api/config/SortDir.java @@ -2,5 +2,5 @@ package appeng.api.config; public enum SortDir { - ASCENDING, DESCENDING; + ASCENDING, DESCENDING } \ No newline at end of file diff --git a/src/api/java/appeng/api/config/StorageFilter.java b/src/api/java/appeng/api/config/StorageFilter.java index d92f58ac..3b8f588f 100644 --- a/src/api/java/appeng/api/config/StorageFilter.java +++ b/src/api/java/appeng/api/config/StorageFilter.java @@ -5,6 +5,6 @@ public enum StorageFilter NONE, - EXTACTABLE_ONLY + EXTRACTABLE_ONLY } diff --git a/src/api/java/appeng/api/config/TunnelType.java b/src/api/java/appeng/api/config/TunnelType.java index f45b9874..595b19d7 100644 --- a/src/api/java/appeng/api/config/TunnelType.java +++ b/src/api/java/appeng/api/config/TunnelType.java @@ -1,15 +1,15 @@ -package appeng.api.config; - -public enum TunnelType -{ - ME, // Network Tunnel - BC_POWER, // MJ Tunnel - IC2_POWER, // EU Tunnel - RF_POWER, // RF Tunnel - REDSTONE, // Redstone Tunnel - FLUID, // Fluid Tunnel - ITEM, // Item Tunnel - LIGHT, // Light Tunnel - BUNDLED_REDSTONE, // Bundled Redstone Tunnel - COMPUTER_MESSAGE // Computer Message Tunnel -} +package appeng.api.config; + +public enum TunnelType +{ + ME, // Network Tunnel + BC_POWER, // MJ Tunnel + IC2_POWER, // EU Tunnel + RF_POWER, // RF Tunnel + REDSTONE, // Redstone Tunnel + FLUID, // Fluid Tunnel + ITEM, // Item Tunnel + LIGHT, // Light Tunnel + BUNDLED_REDSTONE, // Bundled Redstone Tunnel + COMPUTER_MESSAGE // Computer Message Tunnel +} diff --git a/src/api/java/appeng/api/definitions/Blocks.java b/src/api/java/appeng/api/definitions/Blocks.java index f8095dd8..d850e6dc 100644 --- a/src/api/java/appeng/api/definitions/Blocks.java +++ b/src/api/java/appeng/api/definitions/Blocks.java @@ -16,7 +16,7 @@ public class Blocks * Decorative */ public AEItemDefinition blockQuartz; - public AEItemDefinition blockQuartzPiller; + public AEItemDefinition blockQuartzPillar; public AEItemDefinition blockQuartzChiseled; public AEItemDefinition blockQuartzGlass; public AEItemDefinition blockQuartzVibrantGlass; diff --git a/src/api/java/appeng/api/definitions/Materials.java b/src/api/java/appeng/api/definitions/Materials.java index e3ba938f..b6ae52c4 100644 --- a/src/api/java/appeng/api/definitions/Materials.java +++ b/src/api/java/appeng/api/definitions/Materials.java @@ -32,9 +32,9 @@ public class Materials public AEItemDefinition materialBasicCard; public AEItemDefinition materialAdvCard; - public AEItemDefinition materialPureifiedCertusQuartzCrystal; - public AEItemDefinition materialPureifiedNetherQuartzCrystal; - public AEItemDefinition materialPureifiedFluixCrystal; + public AEItemDefinition materialPurifiedCertusQuartzCrystal; + public AEItemDefinition materialPurifiedNetherQuartzCrystal; + public AEItemDefinition materialPurifiedFluixCrystal; public AEItemDefinition materialCell1kPart; public AEItemDefinition materialCell4kPart; diff --git a/src/api/java/appeng/api/events/LocatableEventAnnounce.java b/src/api/java/appeng/api/events/LocatableEventAnnounce.java index f54f9487..af9b6f85 100644 --- a/src/api/java/appeng/api/events/LocatableEventAnnounce.java +++ b/src/api/java/appeng/api/events/LocatableEventAnnounce.java @@ -15,7 +15,7 @@ public class LocatableEventAnnounce extends Event { Register, // Adds the locatable to the registry Unregister // Removes the locatable from the registry - }; + } final public ILocatable target; final public LocatableEvent change; diff --git a/src/api/java/appeng/api/exceptions/MissingIngredientError.java b/src/api/java/appeng/api/exceptions/MissingIngredientError.java index 51a200a0..9dcdda55 100644 --- a/src/api/java/appeng/api/exceptions/MissingIngredientError.java +++ b/src/api/java/appeng/api/exceptions/MissingIngredientError.java @@ -1,11 +1,11 @@ -package appeng.api.exceptions; - -public class MissingIngredientError extends Exception { - - private static final long serialVersionUID = -998858343831371697L; - - public MissingIngredientError(String n) { - super( n ); - } - -} +package appeng.api.exceptions; + +public class MissingIngredientError extends Exception { + + private static final long serialVersionUID = -998858343831371697L; + + public MissingIngredientError(String n) { + super( n ); + } + +} diff --git a/src/api/java/appeng/api/exceptions/ModNotInstalled.java b/src/api/java/appeng/api/exceptions/ModNotInstalled.java index 7744a1fb..425e7aa4 100644 --- a/src/api/java/appeng/api/exceptions/ModNotInstalled.java +++ b/src/api/java/appeng/api/exceptions/ModNotInstalled.java @@ -1,12 +1,12 @@ -package appeng.api.exceptions; - -public class ModNotInstalled extends Exception -{ - - private static final long serialVersionUID = -9052435206368425494L; - - public ModNotInstalled(String t) { - super( t ); - } - -} +package appeng.api.exceptions; + +public class ModNotInstalled extends Exception +{ + + private static final long serialVersionUID = -9052435206368425494L; + + public ModNotInstalled(String t) { + super( t ); + } + +} diff --git a/src/api/java/appeng/api/exceptions/RecipeError.java b/src/api/java/appeng/api/exceptions/RecipeError.java index a07f6438..df0a976b 100644 --- a/src/api/java/appeng/api/exceptions/RecipeError.java +++ b/src/api/java/appeng/api/exceptions/RecipeError.java @@ -1,12 +1,12 @@ -package appeng.api.exceptions; - -public class RecipeError extends Exception -{ - - private static final long serialVersionUID = -6602870588617670262L; - - public RecipeError(String n) { - super( n ); - } - -} +package appeng.api.exceptions; + +public class RecipeError extends Exception +{ + + private static final long serialVersionUID = -6602870588617670262L; + + public RecipeError(String n) { + super( n ); + } + +} diff --git a/src/api/java/appeng/api/features/IGrinderEntry.java b/src/api/java/appeng/api/features/IGrinderEntry.java index afd18af4..a7549f2f 100644 --- a/src/api/java/appeng/api/features/IGrinderEntry.java +++ b/src/api/java/appeng/api/features/IGrinderEntry.java @@ -18,7 +18,7 @@ public interface IGrinderEntry /** * lets you change the grinder recipe by changing its input. * - * @param input + * @param input input item */ public void setInput(ItemStack input); @@ -46,37 +46,37 @@ public interface IGrinderEntry /** * allows you to change the output. * - * @param output + * @param output output item */ public void setOutput(ItemStack output); /** * stack, and 0.0-1.0 chance that it will be generated. * - * @param output - * @param chance + * @param output output item + * @param chance generation chance */ public void setOptionalOutput(ItemStack output, float chance); /** * 0.0 - 1.0 the chance that the optional output will be generated. * - * @return + * @return chance of optional output */ public float getOptionalChance(); /** * stack, and 0.0-1.0 chance that it will be generated. * - * @param output - * @param chance + * @param output second optional output item + * @param chance second optional output chance */ public void setSecondOptionalOutput(ItemStack output, float chance); /** * 0.0 - 1.0 the chance that the optional output will be generated. * - * @return + * @return second optional output chance */ public float getSecondOptionalChance(); @@ -90,7 +90,7 @@ public interface IGrinderEntry /** * Allows you to adjust the number of turns * - * @param new number of turns to produce output. + * @param c number of turns to produce output. */ public void setEnergyCost(int c); } diff --git a/src/api/java/appeng/api/features/IGrinderRegistry.java b/src/api/java/appeng/api/features/IGrinderRegistry.java index 1355ef13..e34a9225 100644 --- a/src/api/java/appeng/api/features/IGrinderRegistry.java +++ b/src/api/java/appeng/api/features/IGrinderRegistry.java @@ -1,9 +1,9 @@ package appeng.api.features; -import java.util.List; - import net.minecraft.item.ItemStack; +import java.util.List; + /** * Lets you manipulate Grinder Recipes, by adding or editing existing ones. */ @@ -13,12 +13,12 @@ public interface IGrinderRegistry /** * Current list of registered recipes, you can modify this if you want too. * - * @return currentlyRegistredRecipes + * @return currentlyRegisteredRecipes */ public List getRecipes(); /** - * add a new recipe the easy way, in -> out, how many turns., duplicates will not be added. + * add a new recipe the easy way, in → out, how many turns., duplicates will not be added. * * @param in input * @param out output diff --git a/src/api/java/appeng/api/features/IItemComparisionProvider.java b/src/api/java/appeng/api/features/IItemComparisonProvider.java similarity index 89% rename from src/api/java/appeng/api/features/IItemComparisionProvider.java rename to src/api/java/appeng/api/features/IItemComparisonProvider.java index a64bf215..6b7a11b1 100644 --- a/src/api/java/appeng/api/features/IItemComparisionProvider.java +++ b/src/api/java/appeng/api/features/IItemComparisonProvider.java @@ -7,14 +7,14 @@ import net.minecraft.item.ItemStack; * if the comparison function handles the item, by trying to request a * IItemComparison class. */ -public interface IItemComparisionProvider +public interface IItemComparisonProvider { /** * should return a new IItemComparison, or return null if it doesn't handle * the supplied item. * - * @param is + * @param is item * @return IItemComparison, or null */ IItemComparison getComparison(ItemStack is); @@ -22,7 +22,7 @@ public interface IItemComparisionProvider /** * Simple test for support ( AE generally skips this and calls the above function. ) * - * @param stack + * @param stack item * @return true, if getComparison will return a valid IItemComparison Object */ public boolean canHandle(ItemStack stack); diff --git a/src/api/java/appeng/api/features/ILocatableRegistry.java b/src/api/java/appeng/api/features/ILocatableRegistry.java index 1d19ae8c..c07b2300 100644 --- a/src/api/java/appeng/api/features/ILocatableRegistry.java +++ b/src/api/java/appeng/api/features/ILocatableRegistry.java @@ -10,9 +10,9 @@ public interface ILocatableRegistry * Attempts to find the object with the serial specified, if it can it * returns the object. * - * @param ser + * @param serial serial * @return requestedObject, or null */ - public abstract Object findLocateableBySerial(long ser); + public abstract Object findLocatableBySerial(long serial); } \ No newline at end of file diff --git a/src/api/java/appeng/api/features/IMatterCannonAmmoRegistry.java b/src/api/java/appeng/api/features/IMatterCannonAmmoRegistry.java index fd6051a7..18d9683c 100644 --- a/src/api/java/appeng/api/features/IMatterCannonAmmoRegistry.java +++ b/src/api/java/appeng/api/features/IMatterCannonAmmoRegistry.java @@ -8,15 +8,15 @@ public interface IMatterCannonAmmoRegistry /** * register a new ammo, generally speaking this is based off of atomic weight to make it easier to guess at * - * @param ammo - * @param weight + * @param ammo new ammo + * @param weight atomic weight */ void registerAmmo(ItemStack ammo, double weight); /** * get the penetration value for a particular ammo, 0 indicates a non-ammo. * - * @param is + * @param is ammo * @return 0 or a valid penetration value. */ float getPenetration(ItemStack is); diff --git a/src/api/java/appeng/api/features/INetworkEncodable.java b/src/api/java/appeng/api/features/INetworkEncodable.java index 57ef647f..2b096d61 100644 --- a/src/api/java/appeng/api/features/INetworkEncodable.java +++ b/src/api/java/appeng/api/features/INetworkEncodable.java @@ -1,28 +1,27 @@ -package appeng.api.features; - -import net.minecraft.item.ItemStack; - -public interface INetworkEncodable { - - /** - * Used to get the current key from the item. - * - * @param player - * @param item - * @return - */ - String getEncryptionKey(ItemStack item); - - /** - * Encode the wireless frequency via the Controller. - * - * @param item - * the wireless terminal. - * @param encKey - * the wireless encryption key. - * @param name - * null for now. - */ - void setEncryptionKey(ItemStack item, String encKey, String name); - -} +package appeng.api.features; + +import net.minecraft.item.ItemStack; + +public interface INetworkEncodable { + + /** + * Used to get the current key from the item. + * + * @param item item + * @return string key of item + */ + String getEncryptionKey(ItemStack item); + + /** + * Encode the wireless frequency via the Controller. + * + * @param item + * the wireless terminal. + * @param encKey + * the wireless encryption key. + * @param name + * null for now. + */ + void setEncryptionKey(ItemStack item, String encKey, String name); + +} diff --git a/src/api/java/appeng/api/features/IP2PTunnelRegistry.java b/src/api/java/appeng/api/features/IP2PTunnelRegistry.java index 7717ce38..e1c85c71 100644 --- a/src/api/java/appeng/api/features/IP2PTunnelRegistry.java +++ b/src/api/java/appeng/api/features/IP2PTunnelRegistry.java @@ -23,8 +23,8 @@ public interface IP2PTunnelRegistry /** * returns null if no attunement can be found. * - * @param trigger - * @return + * @param trigger attunement trigger + * @return null if no attunement can be found or attunement */ TunnelType getTunnelTypeByItem(ItemStack trigger); diff --git a/src/api/java/appeng/api/features/IPlayerRegistry.java b/src/api/java/appeng/api/features/IPlayerRegistry.java index 04a824ce..d52b0a03 100644 --- a/src/api/java/appeng/api/features/IPlayerRegistry.java +++ b/src/api/java/appeng/api/features/IPlayerRegistry.java @@ -12,15 +12,21 @@ public interface IPlayerRegistry { /** - * @param player + * @param gameProfile user game profile * @return user id of a username. */ int getID(GameProfile gameProfile); /** - * @param player + * @param player player * @return user id of a player entity. */ int getID(EntityPlayer player); + /** + * @param playerID to be found player id + * @return PlayerEntity, or null if the player could not be found. + */ + EntityPlayer findPlayer(int playerID); + } diff --git a/src/api/java/appeng/api/features/IRecipeHandlerRegistry.java b/src/api/java/appeng/api/features/IRecipeHandlerRegistry.java index 5b8fe543..be43a544 100644 --- a/src/api/java/appeng/api/features/IRecipeHandlerRegistry.java +++ b/src/api/java/appeng/api/features/IRecipeHandlerRegistry.java @@ -1,48 +1,49 @@ -package appeng.api.features; - -import appeng.api.recipes.ICraftHandler; -import appeng.api.recipes.IRecipeHandler; -import appeng.api.recipes.ISubItemResolver; - -public interface IRecipeHandlerRegistry -{ - - /** - * Add a new Recipe Handler to the parser. - * - * MUST BE CALLED IN PRE-INIT - * - * @param name - * @param handler - */ - void addNewCraftHandler(String name, Class handler); - - /** - * Add a new resolver to the parser. - * - * MUST BE CALLED IN PRE-INIT - * - * @param sir - */ - void addNewSubItemResolver(ISubItemResolver sir); - - /** - * @param name - * @return A recipe handler by name, returns null on failure. - */ - ICraftHandler getCraftHandlerFor(String name); - - /** - * @return a new recipe handler, which can be used to parse, and read recipe files. - */ - public IRecipeHandler createNewRecipehandler(); - - /** - * resolve sub items by name. - * - * @param tmpName - * @return ResolerResult or ResolverResultSet - */ - Object resolveItem(String nameSpace, String itemName); - -} +package appeng.api.features; + +import appeng.api.recipes.ICraftHandler; +import appeng.api.recipes.IRecipeHandler; +import appeng.api.recipes.ISubItemResolver; + +public interface IRecipeHandlerRegistry +{ + + /** + * Add a new Recipe Handler to the parser. + * + * MUST BE CALLED IN PRE-INIT + * + * @param name name of crafthandler + * @param handler class of crafthandler + */ + void addNewCraftHandler(String name, Class handler); + + /** + * Add a new resolver to the parser. + * + * MUST BE CALLED IN PRE-INIT + * + * @param sir sub item resolver + */ + void addNewSubItemResolver(ISubItemResolver sir); + + /** + * @param name name of crafting handler + * @return A recipe handler by name, returns null on failure. + */ + ICraftHandler getCraftHandlerFor(String name); + + /** + * @return a new recipe handler, which can be used to parse, and read recipe files. + */ + public IRecipeHandler createNewRecipehandler(); + + /** + * resolve sub items by name. + * + * @param nameSpace namespace of item + * @param itemName full name of item + * @return ResolverResult or ResolverResultSet + */ + Object resolveItem(String nameSpace, String itemName); + +} diff --git a/src/api/java/appeng/api/features/IRegistryContainer.java b/src/api/java/appeng/api/features/IRegistryContainer.java index 1e6b49ac..c2a74e7f 100644 --- a/src/api/java/appeng/api/features/IRegistryContainer.java +++ b/src/api/java/appeng/api/features/IRegistryContainer.java @@ -11,7 +11,7 @@ public interface IRegistryContainer /** * Use the movable registry to white list your tiles. */ - IMovableRegistry moveable(); + IMovableRegistry movable(); /** * Add new Grid Caches for use during run time, only use during loading phase. @@ -20,19 +20,19 @@ public interface IRegistryContainer /** * Add additional storage bus handlers to improve interplay with mod blocks that contains special inventories that - * function unlike vanilla chests. AE uses this internally for barrels, dsu's, quantum chests, AE Networks and more. + * function unlike vanilla chests. AE uses this internally for barrels, DSU's, quantum chests, AE Networks and more. */ IExternalStorageRegistry externalStorage(); /** * Add additional special comparison functionality, AE Uses this internally for Bees. */ - ISpecialComparisonRegistry specialComparson(); + ISpecialComparisonRegistry specialComparison(); /** * Lets you register your items as wireless terminals */ - IWirelessTermRegistery wireless(); + IWirelessTermRegistry wireless(); /** * Allows you to register new cell types, these will function in drives @@ -47,7 +47,7 @@ public interface IRegistryContainer /** * get access to the locatable registry */ - ILocatableRegistry locateable(); + ILocatableRegistry locatable(); /** * get access to the p2p tunnel registry. diff --git a/src/api/java/appeng/api/features/ISpecialComparisonRegistry.java b/src/api/java/appeng/api/features/ISpecialComparisonRegistry.java index 300a511e..c51d85b4 100644 --- a/src/api/java/appeng/api/features/ISpecialComparisonRegistry.java +++ b/src/api/java/appeng/api/features/ISpecialComparisonRegistry.java @@ -12,16 +12,16 @@ public interface ISpecialComparisonRegistry /** * return TheHandler or null. * - * @param stack + * @param stack item * @return a handler it found for a specific item */ - IItemComparison getSpecialComparion(ItemStack stack); + IItemComparison getSpecialComparison(ItemStack stack); /** * Register a new special comparison function with AE. * - * @param prov + * @param prov comparison provider */ - public void addComparisonProvider(IItemComparisionProvider prov); + public void addComparisonProvider(IItemComparisonProvider prov); } \ No newline at end of file diff --git a/src/api/java/appeng/api/features/IWirelessTermHandler.java b/src/api/java/appeng/api/features/IWirelessTermHandler.java index 84ab938e..7c29ea48 100644 --- a/src/api/java/appeng/api/features/IWirelessTermHandler.java +++ b/src/api/java/appeng/api/features/IWirelessTermHandler.java @@ -11,7 +11,7 @@ public interface IWirelessTermHandler extends INetworkEncodable { /** - * @param is + * @param is wireless terminal * @return true, if usePower, hasPower, etc... can be called for the provided item */ boolean canHandle(ItemStack is); @@ -22,24 +22,24 @@ public interface IWirelessTermHandler extends INetworkEncodable * @param amount * is in AE units ( 5 per MJ ), if you return false, the item should be dead and return false for * hasPower - * @param is - * @return + * @param is wireless terminal + * @return true if wireless terminal uses power */ boolean usePower(EntityPlayer player, double amount, ItemStack is); /** * gets the power status of the item. * - * @param is + * @param is wireless terminal * @return returns true if there is any power left. */ boolean hasPower(EntityPlayer player, double amount, ItemStack is); /** - * Return the config manage for the wireless terminal. + * Return the config manager for the wireless terminal. * - * @param is - * @return + * @param is wireless terminal + * @return config manager of wireless terminal */ IConfigManager getConfigManager(ItemStack is); diff --git a/src/api/java/appeng/api/features/IWirelessTermRegistery.java b/src/api/java/appeng/api/features/IWirelessTermRegistry.java similarity index 77% rename from src/api/java/appeng/api/features/IWirelessTermRegistery.java rename to src/api/java/appeng/api/features/IWirelessTermRegistry.java index 0f14ce94..9d6d911b 100644 --- a/src/api/java/appeng/api/features/IWirelessTermRegistery.java +++ b/src/api/java/appeng/api/features/IWirelessTermRegistry.java @@ -7,24 +7,24 @@ import net.minecraft.world.World; /** * Registration record for a Custom Cell handler. */ -public interface IWirelessTermRegistery +public interface IWirelessTermRegistry { /** * add this handler to the list of other wireless handler. * - * @param handler + * @param handler wireless handler */ void registerWirelessHandler(IWirelessTermHandler handler); /** - * @param is + * @param is item which might have a handler * @return true if there is a handler for this item */ boolean isWirelessTerminal(ItemStack is); /** - * @param is + * @param is item with handler * @return a register handler for the item in question, or null if there * isn't one */ @@ -34,6 +34,6 @@ public interface IWirelessTermRegistery * opens the wireless terminal gui, the wireless terminal item, must be in * the active slot on the tool bar. */ - void OpenWirelessTermainlGui(ItemStack item, World w, EntityPlayer player); + void openWirelessTerminalGui(ItemStack item, World w, EntityPlayer player); -} \ No newline at end of file +} diff --git a/src/api/java/appeng/api/features/IWorldGen.java b/src/api/java/appeng/api/features/IWorldGen.java index f79017ff..cadc56a7 100644 --- a/src/api/java/appeng/api/features/IWorldGen.java +++ b/src/api/java/appeng/api/features/IWorldGen.java @@ -8,12 +8,14 @@ public interface IWorldGen public enum WorldGenType { - CertusQuartz, ChargedCertusQuartz, Metorites - }; + CertusQuartz, ChargedCertusQuartz, Meteorites + } public void disableWorldGenForProviderID(WorldGenType type, Class provider); - public void disableWorldGenForDimension(WorldGenType type, int dimid); + public void enableWorldGenForDimension(WorldGenType type, int dimID); + + public void disableWorldGenForDimension(WorldGenType type, int dimID); boolean isWorldGenEnabled(WorldGenType type, World w); diff --git a/src/api/java/appeng/api/implementations/ICraftingPatternItem.java b/src/api/java/appeng/api/implementations/ICraftingPatternItem.java index b454c8c7..c3d0a52e 100644 --- a/src/api/java/appeng/api/implementations/ICraftingPatternItem.java +++ b/src/api/java/appeng/api/implementations/ICraftingPatternItem.java @@ -12,11 +12,11 @@ public interface ICraftingPatternItem { /** - * Access Details about a patern + * Access Details about a pattern * - * @param is - * @param w - * @return + * @param is pattern + * @param w crafting world + * @return details of pattern */ ICraftingPatternDetails getPatternForItem(ItemStack is, World w); } diff --git a/src/api/java/appeng/api/implementations/IPowerChannelState.java b/src/api/java/appeng/api/implementations/IPowerChannelState.java index 9927685b..b17f9251 100644 --- a/src/api/java/appeng/api/implementations/IPowerChannelState.java +++ b/src/api/java/appeng/api/implementations/IPowerChannelState.java @@ -1,7 +1,7 @@ package appeng.api.implementations; /** - * This is intended for use on the client side to provide details to Waila. + * This is intended for use on the client side to provide details to WAILA. */ public interface IPowerChannelState { diff --git a/src/api/java/appeng/api/implementations/IUpgradeableHost.java b/src/api/java/appeng/api/implementations/IUpgradeableHost.java index 45c5a718..45a98af1 100644 --- a/src/api/java/appeng/api/implementations/IUpgradeableHost.java +++ b/src/api/java/appeng/api/implementations/IUpgradeableHost.java @@ -1,11 +1,11 @@ package appeng.api.implementations; +import appeng.api.util.IConfigurableObject; import net.minecraft.tileentity.TileEntity; import appeng.api.config.Upgrades; import appeng.api.implementations.tiles.ISegmentedInventory; -import appeng.api.util.IConfigureableObject; -public interface IUpgradeableHost extends IConfigureableObject, ISegmentedInventory +public interface IUpgradeableHost extends IConfigurableObject, ISegmentedInventory { /** @@ -16,7 +16,7 @@ public interface IUpgradeableHost extends IConfigureableObject, ISegmentedInvent /** * the tile... * - * @return + * @return tile entity */ TileEntity getTile(); diff --git a/src/api/java/appeng/api/implementations/TransitionResult.java b/src/api/java/appeng/api/implementations/TransitionResult.java index 4e0f9831..bc1e5e1f 100644 --- a/src/api/java/appeng/api/implementations/TransitionResult.java +++ b/src/api/java/appeng/api/implementations/TransitionResult.java @@ -6,13 +6,11 @@ package appeng.api.implementations; */ public class TransitionResult { + public final boolean success; + public final double energyUsage; public TransitionResult(boolean _success, double power) { success = _success; energyUsage = power; } - - public final boolean success; - public final double energyUsage; - } diff --git a/src/api/java/appeng/api/implementations/guiobjects/IGuiItem.java b/src/api/java/appeng/api/implementations/guiobjects/IGuiItem.java index 5ee7a832..436bd301 100644 --- a/src/api/java/appeng/api/implementations/guiobjects/IGuiItem.java +++ b/src/api/java/appeng/api/implementations/guiobjects/IGuiItem.java @@ -1,15 +1,15 @@ -package appeng.api.implementations.guiobjects; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -/** - * Implemented on Item objects, to return objects used to manage, and interact - * with the contents. - */ -public interface IGuiItem -{ - - IGuiItemObject getGuiObject(ItemStack is, World world, int x, int y, int z); - -} +package appeng.api.implementations.guiobjects; + +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +/** + * Implemented on Item objects, to return objects used to manage, and interact + * with the contents. + */ +public interface IGuiItem +{ + + IGuiItemObject getGuiObject(ItemStack is, World world, int x, int y, int z); + +} diff --git a/src/api/java/appeng/api/implementations/guiobjects/IGuiItemObject.java b/src/api/java/appeng/api/implementations/guiobjects/IGuiItemObject.java index 1b1dfe64..95a18edf 100644 --- a/src/api/java/appeng/api/implementations/guiobjects/IGuiItemObject.java +++ b/src/api/java/appeng/api/implementations/guiobjects/IGuiItemObject.java @@ -1,9 +1,9 @@ -package appeng.api.implementations.guiobjects; - -import net.minecraft.item.ItemStack; - -public interface IGuiItemObject -{ - - public ItemStack getItemStack(); -} +package appeng.api.implementations.guiobjects; + +import net.minecraft.item.ItemStack; + +public interface IGuiItemObject +{ + + public ItemStack getItemStack(); +} diff --git a/src/api/java/appeng/api/implementations/guiobjects/INetworkTool.java b/src/api/java/appeng/api/implementations/guiobjects/INetworkTool.java index b4d19999..f0265f34 100644 --- a/src/api/java/appeng/api/implementations/guiobjects/INetworkTool.java +++ b/src/api/java/appeng/api/implementations/guiobjects/INetworkTool.java @@ -1,14 +1,14 @@ -package appeng.api.implementations.guiobjects; - -import net.minecraft.inventory.IInventory; -import appeng.api.networking.IGridHost; - -/** - * Obtained via {@link IGuiItem} getGuiObject - */ -public interface INetworkTool extends IInventory, IGuiItemObject -{ - - IGridHost getGridHost(); // null for most purposes. - -} +package appeng.api.implementations.guiobjects; + +import net.minecraft.inventory.IInventory; +import appeng.api.networking.IGridHost; + +/** + * Obtained via {@link IGuiItem} getGuiObject + */ +public interface INetworkTool extends IInventory, IGuiItemObject +{ + + IGridHost getGridHost(); // null for most purposes. + +} diff --git a/src/api/java/appeng/api/implementations/guiobjects/IPortableCell.java b/src/api/java/appeng/api/implementations/guiobjects/IPortableCell.java index 779e741c..b1244013 100644 --- a/src/api/java/appeng/api/implementations/guiobjects/IPortableCell.java +++ b/src/api/java/appeng/api/implementations/guiobjects/IPortableCell.java @@ -1,14 +1,14 @@ -package appeng.api.implementations.guiobjects; - -import appeng.api.networking.energy.IEnergySource; -import appeng.api.storage.IMEMonitor; -import appeng.api.storage.ITerminalHost; -import appeng.api.storage.data.IAEItemStack; - -/** - * Obtained via {@link IGuiItem} getGuiObject - */ -public interface IPortableCell extends ITerminalHost, IMEMonitor, IEnergySource, IGuiItemObject -{ - -} +package appeng.api.implementations.guiobjects; + +import appeng.api.networking.energy.IEnergySource; +import appeng.api.storage.IMEMonitor; +import appeng.api.storage.ITerminalHost; +import appeng.api.storage.data.IAEItemStack; + +/** + * Obtained via {@link IGuiItem} getGuiObject + */ +public interface IPortableCell extends ITerminalHost, IMEMonitor, IEnergySource, IGuiItemObject +{ + +} diff --git a/src/api/java/appeng/api/implementations/items/IAEItemPowerStorage.java b/src/api/java/appeng/api/implementations/items/IAEItemPowerStorage.java index 26d09fe8..5ab2ac99 100644 --- a/src/api/java/appeng/api/implementations/items/IAEItemPowerStorage.java +++ b/src/api/java/appeng/api/implementations/items/IAEItemPowerStorage.java @@ -14,7 +14,7 @@ public interface IAEItemPowerStorage * Inject amt, power into the device, it will store what it can, and return * the amount unable to be stored. * - * @return + * @return amount unable to be stored */ public double injectAEPower(ItemStack is, double amt); @@ -22,8 +22,8 @@ public interface IAEItemPowerStorage * Attempt to extract power from the device, it will extract what it can and * return it. * - * @param amt - * @return + * @param amt to be extracted power from device + * @return what it could extract */ public double extractAEPower(ItemStack is, double amt); @@ -41,7 +41,7 @@ public interface IAEItemPowerStorage * Control the power flow by telling what the network can do, either add? or * subtract? or both! * - * @return + * @return access restriction of network */ public AccessRestriction getPowerFlow(ItemStack is); diff --git a/src/api/java/appeng/api/implementations/items/IAEWrench.java b/src/api/java/appeng/api/implementations/items/IAEWrench.java index b18100e7..9f913fa7 100644 --- a/src/api/java/appeng/api/implementations/items/IAEWrench.java +++ b/src/api/java/appeng/api/implementations/items/IAEWrench.java @@ -13,11 +13,12 @@ public interface IAEWrench /** * Check if the wrench can be used. * - * @param player - * @param x - * @param y - * @param z - * @return + * @param player wrenching player + * @param x x pos of wrenched block + * @param y y pos of wrenched block + * @param z z pos of wrenched block + * + * @return true if wrench can be used */ boolean canWrench(ItemStack wrench, EntityPlayer player, int x, int y, int z); diff --git a/src/api/java/appeng/api/implementations/items/IBiometricCard.java b/src/api/java/appeng/api/implementations/items/IBiometricCard.java index a333d1a4..bbf8f8e5 100644 --- a/src/api/java/appeng/api/implementations/items/IBiometricCard.java +++ b/src/api/java/appeng/api/implementations/items/IBiometricCard.java @@ -1,13 +1,12 @@ package appeng.api.implementations.items; -import java.util.EnumSet; - -import net.minecraft.item.ItemStack; import appeng.api.config.SecurityPermissions; import appeng.api.features.IPlayerRegistry; -import appeng.api.networking.security.ISecurityRegister; - +import appeng.api.networking.security.ISecurityRegistry; import com.mojang.authlib.GameProfile; +import net.minecraft.item.ItemStack; + +import java.util.EnumSet; public interface IBiometricCard { @@ -23,7 +22,7 @@ public interface IBiometricCard GameProfile getProfile(ItemStack is); /** - * @param itemStack + * @param itemStack card * @return the full list of permissions encoded on the card. */ EnumSet getPermissions(ItemStack itemStack); @@ -31,7 +30,7 @@ public interface IBiometricCard /** * Check if a permission is encoded on the card. * - * @param permission + * @param permission card * @return true if this permission is set on the card. */ boolean hasPermission(ItemStack is, SecurityPermissions permission); @@ -39,26 +38,26 @@ public interface IBiometricCard /** * remove a permission from the item stack. * - * @param itemStack - * @param permission + * @param itemStack card + * @param permission to be removed permission */ void removePermission(ItemStack itemStack, SecurityPermissions permission); /** * add a permission to the item stack. * - * @param itemStack - * @param permission + * @param itemStack card + * @param permission to be added permission */ void addPermission(ItemStack itemStack, SecurityPermissions permission); /** * lets you handle submission of security values on the card for custom behavior. * - * @param register - * @param pr - * @param is + * @param registry security registry + * @param pr player registry + * @param is card */ - void registerPermissions(ISecurityRegister register, IPlayerRegistry pr, ItemStack is); + void registerPermissions(ISecurityRegistry registry, IPlayerRegistry pr, ItemStack is); } diff --git a/src/api/java/appeng/api/implementations/items/IItemGroup.java b/src/api/java/appeng/api/implementations/items/IItemGroup.java index 7dfa21e1..2dce5719 100644 --- a/src/api/java/appeng/api/implementations/items/IItemGroup.java +++ b/src/api/java/appeng/api/implementations/items/IItemGroup.java @@ -1,9 +1,9 @@ package appeng.api.implementations.items; -import java.util.Set; - import net.minecraft.item.ItemStack; +import java.util.Set; + /** * Lets you specify the name of the group of items this falls under. */ @@ -13,7 +13,7 @@ public interface IItemGroup /** * returning null, is the same as not implementing the interface at all. * - * @param is + * @param is item * @return an unlocalized string to use for the items group name. */ String getUnlocalizedGroupName(Set otherItems, ItemStack is); diff --git a/src/api/java/appeng/api/implementations/items/IMemoryCard.java b/src/api/java/appeng/api/implementations/items/IMemoryCard.java index 34a9d845..14692313 100644 --- a/src/api/java/appeng/api/implementations/items/IMemoryCard.java +++ b/src/api/java/appeng/api/implementations/items/IMemoryCard.java @@ -16,7 +16,7 @@ public interface IMemoryCard * Configures the data stored on the memory card, the SettingsName, will be * localized when displayed. * - * @param is + * @param is item * @param SettingsName * unlocalized string that represents the tile entity. * @param data @@ -27,17 +27,17 @@ public interface IMemoryCard void setMemoryCardContents(ItemStack is, String SettingsName, NBTTagCompound data); /** - * returns the settings name provided by a pervious call to + * returns the settings name provided by a previous call to * setMemoryCardContents, or "AppEng.GuiITooltip.Blank" if there was no * previous call to setMemoryCardContents. * - * @param is - * @return + * @param is item + * @return setting name */ String getSettingsName(ItemStack is); /** - * @param is + * @param is item * @return the NBT Data previously saved by setMemoryCardContents, or an * empty NBTCompound */ @@ -48,7 +48,7 @@ public interface IMemoryCard * * @param player * that used the card. - * @param settingsSaved + * @param msg * which message to send. */ void notifyUser(EntityPlayer player, MemoryCardMessages msg); diff --git a/src/api/java/appeng/api/implementations/items/ISpatialStorageCell.java b/src/api/java/appeng/api/implementations/items/ISpatialStorageCell.java index 581cf856..5aaf997a 100644 --- a/src/api/java/appeng/api/implementations/items/ISpatialStorageCell.java +++ b/src/api/java/appeng/api/implementations/items/ISpatialStorageCell.java @@ -13,19 +13,19 @@ public interface ISpatialStorageCell { /** - * @param is + * @param is spatial storage cell * @return true if this item is a spatial storage cell */ boolean isSpatialStorage(ItemStack is); /** - * @param is + * @param is spatial storage cell * @return the maximum size of the spatial storage cell along any given axis */ int getMaxStoredDim(ItemStack is); /** - * @param is + * @param is spatial storage cell * @return the world for this cell */ World getWorld(ItemStack is); @@ -33,36 +33,36 @@ public interface ISpatialStorageCell /** * get the currently stored size. * - * @param is - * @return + * @param is spatial storage cell + * @return size of spatial */ WorldCoord getStoredSize(ItemStack is); /** * Minimum coordinates in its world for the storage cell. * - * @param is - * @return + * @param is spatial storage cell + * @return minimum coordinate of dimension */ WorldCoord getMin(ItemStack is); /** * Maximum coordinates in its world for the storage cell. * - * @param is - * @return + * @param is spatial storage cell + * @return maximum coordinate of dimension */ WorldCoord getMax(ItemStack is); /** * Perform a spatial swap with the contents of the cell, and the world. * - * @param is - * @param w - * @param min - * @param max - * @param doTransition - * @return + * @param is spatial storage cell + * @param w world of spatial + * @param min min coord + * @param max max coord + * @param doTransition transition + * @return result of transition */ TransitionResult doSpatialTransition(ItemStack is, World w, WorldCoord min, WorldCoord max, boolean doTransition); diff --git a/src/api/java/appeng/api/implementations/items/IStorageCell.java b/src/api/java/appeng/api/implementations/items/IStorageCell.java index 425e5b19..ef0d8420 100644 --- a/src/api/java/appeng/api/implementations/items/IStorageCell.java +++ b/src/api/java/appeng/api/implementations/items/IStorageCell.java @@ -22,16 +22,16 @@ public interface IStorageCell extends ICellWorkbenchItem * If this returns something where N % 8 != 0 Then you will be shot on * sight, or your car will explode, something like that least... * - * @param cellItem - * @return numberofBytes + * @param cellItem item + * @return number of bytes */ int getBytes(ItemStack cellItem); /** * Determines the number of bytes used for any type included on the cell. * - * @param cellItem - * @return numberOfBytes + * @param cellItem item + * @return number of bytes */ int BytePerType(ItemStack cellItem); @@ -39,8 +39,8 @@ public interface IStorageCell extends ICellWorkbenchItem * Must be between 1 and 63, indicates how many types you want to store on * the item. * - * @param cellItem - * @return numberOfTypes + * @param cellItem item + * @return number of types */ int getTotalTypes(ItemStack cellItem); @@ -49,8 +49,8 @@ public interface IStorageCell extends ICellWorkbenchItem * don't care, just return false; As the handler for this type of cell is * still the default cells, the normal AE black list is also applied. * - * @param cellItem - * @param requestedAddition + * @param cellItem item + * @param requestedAddition requested addition * @return true to preventAdditionOfItem */ boolean isBlackListed(ItemStack cellItem, IAEItemStack requestedAddition); @@ -70,7 +70,7 @@ public interface IStorageCell extends ICellWorkbenchItem * Allows an item to selectively enable or disable its status as a storage * cell. * - * @param i + * @param i item * @return if the ItemStack should behavior as a storage cell. */ boolean isStorageCell(ItemStack i); diff --git a/src/api/java/appeng/api/implementations/items/IStorageComponent.java b/src/api/java/appeng/api/implementations/items/IStorageComponent.java index f22bec77..497d2768 100644 --- a/src/api/java/appeng/api/implementations/items/IStorageComponent.java +++ b/src/api/java/appeng/api/implementations/items/IStorageComponent.java @@ -14,16 +14,16 @@ public interface IStorageComponent * but all of AE's default cells do it that way, its currently only used for * the condenser. * - * @param cellItem - * @return numberofBytes + * @param is item + * @return number of bytes */ int getBytes(ItemStack is); /** * Just true or false for the item stack. * - * @param is - * @return + * @param is item + * @return true if item is a storage component */ boolean isStorageComponent(ItemStack is); diff --git a/src/api/java/appeng/api/implementations/items/IUpgradeModule.java b/src/api/java/appeng/api/implementations/items/IUpgradeModule.java index b950f5e1..55a8166b 100644 --- a/src/api/java/appeng/api/implementations/items/IUpgradeModule.java +++ b/src/api/java/appeng/api/implementations/items/IUpgradeModule.java @@ -7,7 +7,7 @@ public interface IUpgradeModule { /** - * @param itemstack + * @param itemstack item with potential upgrades * @return null, or a valid upgrade type. */ Upgrades getType(ItemStack itemstack); diff --git a/src/api/java/appeng/api/implementations/parts/IPartCable.java b/src/api/java/appeng/api/implementations/parts/IPartCable.java index 6aefda8e..16009ca4 100644 --- a/src/api/java/appeng/api/implementations/parts/IPartCable.java +++ b/src/api/java/appeng/api/implementations/parts/IPartCable.java @@ -1,18 +1,18 @@ package appeng.api.implementations.parts; -import java.util.EnumSet; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraftforge.common.util.ForgeDirection; import appeng.api.networking.IGridHost; import appeng.api.parts.BusSupport; import appeng.api.parts.IPart; import appeng.api.parts.IPartHost; import appeng.api.util.AECableType; import appeng.api.util.AEColor; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraftforge.common.util.ForgeDirection; + +import java.util.EnumSet; /** - * Implemented on the {@link IPart}s cable objects that can be placed at {@link ForgeDirection}.UNKNWON in + * Implemented on the {@link IPart}s cable objects that can be placed at {@link ForgeDirection}.UNKNOWN in * {@link IPartHost}s */ public interface IPartCable extends IPart, IGridHost @@ -36,7 +36,7 @@ public interface IPartCable extends IPart, IGridHost /** * Change the color of the cable, this should cost a small amount of dye, or something. * - * @param newColor + * @param newColor new color * @return if the color change was successful. */ boolean changeColor(AEColor newColor, EntityPlayer who); @@ -46,14 +46,14 @@ public interface IPartCable extends IPart, IGridHost * * Called by AE, do not invoke. * - * @param sides + * @param sides sides of cable */ void setValidSides(EnumSet sides); /** * used to tests if a cable connects to neighbors visually. * - * @param side + * @param side neighbor side * @return true if this side is currently connects to an external block. */ boolean isConnected(ForgeDirection side); diff --git a/src/api/java/appeng/api/implementations/tiles/IChestOrDrive.java b/src/api/java/appeng/api/implementations/tiles/IChestOrDrive.java index 76524f69..0b1388b9 100644 --- a/src/api/java/appeng/api/implementations/tiles/IChestOrDrive.java +++ b/src/api/java/appeng/api/implementations/tiles/IChestOrDrive.java @@ -21,7 +21,7 @@ public interface IChestOrDrive extends ICellContainer, IGridHost, IOrientable * * 3 - red * - * @param slot + * @param slot slot index * @return status of the slot, one of the above indices. */ int getCellStatus(int slot); @@ -32,7 +32,7 @@ public interface IChestOrDrive extends ICellContainer, IGridHost, IOrientable boolean isPowered(); /** - * @param slot + * @param slot slot index * @return is the cell currently blinking to show activity. */ boolean isCellBlinking(int slot); diff --git a/src/api/java/appeng/api/implementations/tiles/ICraftingMachine.java b/src/api/java/appeng/api/implementations/tiles/ICraftingMachine.java index 11b5339a..2f6071f5 100644 --- a/src/api/java/appeng/api/implementations/tiles/ICraftingMachine.java +++ b/src/api/java/appeng/api/implementations/tiles/ICraftingMachine.java @@ -10,17 +10,17 @@ public interface ICraftingMachine /** * inserts a crafting plan, and the necessary items into the crafting machine. * - * @param patternDetails - * @param table - * @param ejectionDirection + * @param patternDetails details of pattern + * @param table crafting table + * @param ejectionDirection ejection direction * * @return if it was accepted, all or nothing. */ boolean pushPattern(ICraftingPatternDetails patternDetails, InventoryCrafting table, ForgeDirection ejectionDirection); /** - * check if the crafting machine is accepting pushes via pushPattern, if this is false, all cals to push will fail, - * you can try inserting into the inventry instead. + * check if the crafting machine is accepting pushes via pushPattern, if this is false, all calls to push will fail, + * you can try inserting into the inventory instead. * * @return true, if pushPattern can complete, if its false push will always be false. */ diff --git a/src/api/java/appeng/api/implementations/tiles/ISegmentedInventory.java b/src/api/java/appeng/api/implementations/tiles/ISegmentedInventory.java index 6d001771..b985b044 100644 --- a/src/api/java/appeng/api/implementations/tiles/ISegmentedInventory.java +++ b/src/api/java/appeng/api/implementations/tiles/ISegmentedInventory.java @@ -9,8 +9,8 @@ public interface ISegmentedInventory * Access an internal inventory, note, not all inventories contain real items, some may be ghost items, and treating * them a real inventories will result in duplication. * - * @param name - * @return + * @param name inventory name + * @return inventory with inventory name */ IInventory getInventoryByName(String name); diff --git a/src/api/java/appeng/api/implementations/tiles/ITileStorageMonitorable.java b/src/api/java/appeng/api/implementations/tiles/ITileStorageMonitorable.java index f6ef62fb..943c052e 100644 --- a/src/api/java/appeng/api/implementations/tiles/ITileStorageMonitorable.java +++ b/src/api/java/appeng/api/implementations/tiles/ITileStorageMonitorable.java @@ -1,15 +1,15 @@ -package appeng.api.implementations.tiles; - -import net.minecraftforge.common.util.ForgeDirection; -import appeng.api.networking.security.BaseActionSource; -import appeng.api.storage.IStorageMonitorable; - -/** - * Implemented on inventories that can share their inventories with other networks, best example, ME Interface. - */ -public interface ITileStorageMonitorable -{ - - IStorageMonitorable getMonitorable(ForgeDirection side, BaseActionSource src); - -} +package appeng.api.implementations.tiles; + +import net.minecraftforge.common.util.ForgeDirection; +import appeng.api.networking.security.BaseActionSource; +import appeng.api.storage.IStorageMonitorable; + +/** + * Implemented on inventories that can share their inventories with other networks, best example, ME Interface. + */ +public interface ITileStorageMonitorable +{ + + IStorageMonitorable getMonitorable(ForgeDirection side, BaseActionSource src); + +} diff --git a/src/api/java/appeng/api/implementations/tiles/IWirelessAccessPoint.java b/src/api/java/appeng/api/implementations/tiles/IWirelessAccessPoint.java index ea966ad7..658c1e25 100644 --- a/src/api/java/appeng/api/implementations/tiles/IWirelessAccessPoint.java +++ b/src/api/java/appeng/api/implementations/tiles/IWirelessAccessPoint.java @@ -1,30 +1,30 @@ -package appeng.api.implementations.tiles; - -import appeng.api.networking.IGrid; -import appeng.api.networking.security.IActionHost; -import appeng.api.util.DimensionalCoord; - -public interface IWirelessAccessPoint extends IActionHost -{ - - /** - * @return location of WAP - */ - DimensionalCoord getLocation(); - - /** - * @return max range for this WAP - */ - double getRange(); - - /** - * @return can you use this WAP? - */ - boolean isActive(); - - /** - * @return - */ - IGrid getGrid(); - -} +package appeng.api.implementations.tiles; + +import appeng.api.networking.IGrid; +import appeng.api.networking.security.IActionHost; +import appeng.api.util.DimensionalCoord; + +public interface IWirelessAccessPoint extends IActionHost +{ + + /** + * @return location of WAP + */ + DimensionalCoord getLocation(); + + /** + * @return max range for this WAP + */ + double getRange(); + + /** + * @return can you use this WAP? + */ + boolean isActive(); + + /** + * @return grid of linked WAP + */ + IGrid getGrid(); + +} diff --git a/src/api/java/appeng/api/integration/IBeeComparison.java b/src/api/java/appeng/api/integration/IBeeComparison.java index ab1ccb44..ab515e6d 100644 --- a/src/api/java/appeng/api/integration/IBeeComparison.java +++ b/src/api/java/appeng/api/integration/IBeeComparison.java @@ -1,20 +1,20 @@ package appeng.api.integration; - -/** - * An interface to get access to the individual settings for AE's Internal Bee - * Comparison handler. - * - * Assessable via: ( IBeeComparison ) - * IAEItemStack.getTagCompound().getSpecialComparison() - * - * If you don't have the forestry API, just delete this file when using the API. - */ -public interface IBeeComparison -{ - - /** - * @return the Forestry IIndividual for this comparison object - cast this to a IIndividual if you want to use it. - */ - Object getIndividual(); - + +/** + * An interface to get access to the individual settings for AE's Internal Bee + * Comparison handler. + * + * Assessable via: ( IBeeComparison ) + * IAEItemStack.getTagCompound().getSpecialComparison() + * + * If you don't have the forestry API, just delete this file when using the API. + */ +public interface IBeeComparison +{ + + /** + * @return the Forestry IIndividual for this comparison object - cast this to a IIndividual if you want to use it. + */ + Object getIndividual(); + } \ No newline at end of file diff --git a/src/api/java/appeng/api/movable/IMovableHandler.java b/src/api/java/appeng/api/movable/IMovableHandler.java index 3706180d..78817bb0 100644 --- a/src/api/java/appeng/api/movable/IMovableHandler.java +++ b/src/api/java/appeng/api/movable/IMovableHandler.java @@ -10,9 +10,9 @@ public interface IMovableHandler * if you return true from this, your saying you can handle the class, not * that single entity, you cannot opt out of single entities. * - * @param myClass - * @param tile - * @return + * @param myClass tile entity class + * @param tile tile entity + * @return true if it can handle moving */ boolean canHandle(Class myClass, TileEntity tile); @@ -22,19 +22,22 @@ public interface IMovableHandler * already been fully moved. * * Potential Example: - * + * + *
+	 * {@code
 	 * Chunk c = world.getChunkFromBlockCoords( x, z ); c.setChunkBlockTileEntity( x
 	 * & 0xF, y + y, z & 0xF, tile );
 	 * 
 	 * if ( c.isChunkLoaded ) { world.addTileEntity( tile ); world.markBlockForUpdate( x,
 	 * y, z ); }
+	 * }
+	 * 
* - * @param tile - * @param world - * @param x - * @param y - * @param z - * @return + * @param tile to be moved tile + * @param world world of tile + * @param x x coord of tile + * @param y y coord of tile + * @param z z coord of tile */ void moveTile(TileEntity tile, World world, int x, int y, int z); diff --git a/src/api/java/appeng/api/movable/IMovableRegistry.java b/src/api/java/appeng/api/movable/IMovableRegistry.java index 745bea78..6a0d4a9f 100644 --- a/src/api/java/appeng/api/movable/IMovableRegistry.java +++ b/src/api/java/appeng/api/movable/IMovableRegistry.java @@ -39,7 +39,7 @@ public interface IMovableRegistry * You can also use the IMC, FMLInterModComms.sendMessage( "appliedenergistics2", "whitelist-spatial", * "appeng.common.AppEngTile" ); * - * @param blk + * @param blk block */ void blacklistBlock(Block blk); @@ -54,7 +54,7 @@ public interface IMovableRegistry void whiteListTileEntity(Class c); /** - * @param te + * @param te to be moved tile entity * @return true if the tile has accepted your request to move it */ boolean askToMove(TileEntity te); @@ -62,14 +62,14 @@ public interface IMovableRegistry /** * tells the tile you are done moving it. * - * @param te + * @param te moved tile entity */ void doneMoving(TileEntity te); /** * add a new handler movable handler. * - * @param handler + * @param handler moving handler */ void addHandler(IMovableHandler handler); @@ -78,8 +78,8 @@ public interface IMovableRegistry * * only valid after askToMove(...) = true * - * @param te - * @return + * @param te tile entity + * @return moving handler of tile entity */ IMovableHandler getHandler(TileEntity te); @@ -89,7 +89,7 @@ public interface IMovableRegistry IMovableHandler getDefaultHandler(); /** - * @param blk + * @param blk block * @return true if this block is blacklisted */ boolean isBlacklisted(Block blk); diff --git a/src/api/java/appeng/api/movable/IMovableTile.java b/src/api/java/appeng/api/movable/IMovableTile.java index dc65491d..9139a41b 100644 --- a/src/api/java/appeng/api/movable/IMovableTile.java +++ b/src/api/java/appeng/api/movable/IMovableTile.java @@ -11,7 +11,7 @@ public interface IMovableTile * notification that your block will be moved, called instead of invalidate, * return false to prevent movement. * - * @return + * @return false to prevent movement */ boolean prepareToMove(); diff --git a/src/api/java/appeng/api/networking/GridFlags.java b/src/api/java/appeng/api/networking/GridFlags.java index 3884cfab..3a92bbb1 100644 --- a/src/api/java/appeng/api/networking/GridFlags.java +++ b/src/api/java/appeng/api/networking/GridFlags.java @@ -1,45 +1,45 @@ -package appeng.api.networking; - -/** - * Various flags to determine network node behavior. - */ -public enum GridFlags -{ - /** - * import/export buses, terminals, and other devices that use network features, will use this setting. - */ - REQUIRE_CHANNEL, - - /** - * P2P ME tunnels use this setting. - */ - COMPRESSED_CHANNEL, - - /** - * cannot carry channels over this node. - */ - CANNOT_CARRY, - - /** - * Used by P2P Tunnels to prevent tunnels from tunneling recursively. - */ - CANNOT_CARRY_COMPRESSED, - - /** - * This node can transmit 32 signals, this should only apply to Tier2 Cable, P2P Tunnels, and Quantum Network - * Bridges. - */ - DENSE_CAPACITY, - - /** - * This block is part of a multiblock, used in conjunction with REQUIRE_CANNEL, and {@link IGridMultiblock} see this - * interface for details. - */ - MULTIBLOCK, - - /** - * Indicates which path might be preferred, this only matters if two routes of equal length exist, ad only changes - * the order they are processed in. - */ - PREFERED -} +package appeng.api.networking; + +/** + * Various flags to determine network node behavior. + */ +public enum GridFlags +{ + /** + * import/export buses, terminals, and other devices that use network features, will use this setting. + */ + REQUIRE_CHANNEL, + + /** + * P2P ME tunnels use this setting. + */ + COMPRESSED_CHANNEL, + + /** + * cannot carry channels over this node. + */ + CANNOT_CARRY, + + /** + * Used by P2P Tunnels to prevent tunnels from tunneling recursively. + */ + CANNOT_CARRY_COMPRESSED, + + /** + * This node can transmit 32 signals, this should only apply to Tier2 Cable, P2P Tunnels, and Quantum Network + * Bridges. + */ + DENSE_CAPACITY, + + /** + * This block is part of a multiblock, used in conjunction with REQUIRE_CHANNEL, and {@link IGridMultiblock} see this + * interface for details. + */ + MULTIBLOCK, + + /** + * Indicates which path might be preferred, this only matters if two routes of equal length exist, ad only changes + * the order they are processed in. + */ + PREFERRED +} diff --git a/src/api/java/appeng/api/networking/GridNotification.java b/src/api/java/appeng/api/networking/GridNotification.java index 78c4d19d..5a46fb43 100644 --- a/src/api/java/appeng/api/networking/GridNotification.java +++ b/src/api/java/appeng/api/networking/GridNotification.java @@ -1,9 +1,9 @@ -package appeng.api.networking; - -public enum GridNotification -{ - /** - * the visible connections for this node have changed, useful for cable. - */ - ConnectionsChanged, -} +package appeng.api.networking; + +public enum GridNotification +{ + /** + * the visible connections for this node have changed, useful for cable. + */ + ConnectionsChanged, +} diff --git a/src/api/java/appeng/api/networking/IGrid.java b/src/api/java/appeng/api/networking/IGrid.java index 8ce3df19..1751e67e 100644 --- a/src/api/java/appeng/api/networking/IGrid.java +++ b/src/api/java/appeng/api/networking/IGrid.java @@ -1,71 +1,71 @@ -package appeng.api.networking; - -import appeng.api.networking.events.MENetworkEvent; -import appeng.api.util.IReadOnlyCollection; - -/** - * Gives you access to Grid based information. - * - * Don't Implement. - */ -public interface IGrid -{ - - /** - * Get Access to various grid modules - * - * @param iface - * @return the IGridCache you requested. - */ - public C getCache(Class iface); - - /** - * Post an event into the network event bus. - * - * @param ev - * - event to post - * @return returns ev back to original poster - */ - public MENetworkEvent postEvent(MENetworkEvent ev); - - /** - * Post an event into the network event bus, but direct it at a single node. - * - * @param ev - * event to post - * @return returns ev back to original poster - */ - public MENetworkEvent postEventTo(IGridNode node, MENetworkEvent ev); - - /** - * get a list of the diversity of classes, you can use this to better detect which machines your interested in, - * rather then iterating the entire grid to test them. - * - * @return IReadOnlyCollection of all available host types (Of Type IGridHost). - */ - public IReadOnlyCollection> getMachinesClasses(); - - /** - * Get machines on the network. - * - * @param classofIGridHost - * @return IMachineSet of all nodes belonging to hosts of specified class. - */ - public IMachineSet getMachines(Class classofIGridHost); - - /** - * @return IReadOnlyCollection for all nodes on the network, node visitors are prefered. - */ - IReadOnlyCollection getNodes(); - - /** - * @return true if the last node has been removed from the grid. - */ - public boolean isEmpty(); - - /** - * @return the node considered the pivot point of the grid. - */ - public IGridNode getPivot(); - -} +package appeng.api.networking; + +import appeng.api.networking.events.MENetworkEvent; +import appeng.api.util.IReadOnlyCollection; + +/** + * Gives you access to Grid based information. + * + * Don't Implement. + */ +public interface IGrid +{ + + /** + * Get Access to various grid modules + * + * @param iface face + * @return the IGridCache you requested. + */ + public C getCache(Class iface); + + /** + * Post an event into the network event bus. + * + * @param ev + * - event to post + * @return returns ev back to original poster + */ + public MENetworkEvent postEvent(MENetworkEvent ev); + + /** + * Post an event into the network event bus, but direct it at a single node. + * + * @param ev + * event to post + * @return returns ev back to original poster + */ + public MENetworkEvent postEventTo(IGridNode node, MENetworkEvent ev); + + /** + * get a list of the diversity of classes, you can use this to better detect which machines your interested in, + * rather then iterating the entire grid to test them. + * + * @return IReadOnlyCollection of all available host types (Of Type IGridHost). + */ + public IReadOnlyCollection> getMachinesClasses(); + + /** + * Get machines on the network. + * + * @param gridHostClass class of the grid host + * @return IMachineSet of all nodes belonging to hosts of specified class. + */ + public IMachineSet getMachines(Class gridHostClass); + + /** + * @return IReadOnlyCollection for all nodes on the network, node visitors are preferred. + */ + IReadOnlyCollection getNodes(); + + /** + * @return true if the last node has been removed from the grid. + */ + public boolean isEmpty(); + + /** + * @return the node considered the pivot point of the grid. + */ + public IGridNode getPivot(); + +} diff --git a/src/api/java/appeng/api/networking/IGridBlock.java b/src/api/java/appeng/api/networking/IGridBlock.java index 730e2e80..379d2f0d 100644 --- a/src/api/java/appeng/api/networking/IGridBlock.java +++ b/src/api/java/appeng/api/networking/IGridBlock.java @@ -1,88 +1,89 @@ -package appeng.api.networking; - -import java.util.EnumSet; - -import net.minecraft.item.ItemStack; -import net.minecraftforge.common.util.ForgeDirection; -import appeng.api.parts.IPart; -import appeng.api.util.AEColor; -import appeng.api.util.DimensionalCoord; - -/** - * An Implementation is required to create your node for IGridHost - * - * Implement for use with IGridHost - */ -public interface IGridBlock -{ - - /** - * how much power to drain per tick as part of idle network usage. - * - * if the value of this changes, you must post a MENetworkPowerIdleChange - * - * @return ae/t to use. - */ - double getIdlePowerUsage(); - - /** - * Various flags that AE uses to modify basic behavior for various parts of the network. - * - * @return Set of flags for this IGridBlock - */ - EnumSet getFlags(); - - /** - * generally speaking you will return true for this, the one exception is buses, or worm holes where the node - * represents something that isn't a real connection in the world, but rather one represented internally to the - * block. - * - * @return if the world can connect to this node, and the node can connect to the world. - */ - boolean isWorldAccessable(); - - /** - * @return current location of this node - */ - DimensionalCoord getLocation(); - - /** - * @return Transparent, or a valid color, NULL IS NOT A VALID RETURN - */ - AEColor getGridColor(); - - /** - * Notifies your IGridBlock that changes were made to your connections - */ - void onGridNotification(GridNotification notification); - - /** - * Update Blocks network/connection/booting status. grid, - * - * @param isReady - */ - public void setNetworkStatus(IGrid grid, int channelsInUse); - - /** - * Determine which sides of the block can be connected too, only used when isWorldAccessable returns true, not used - * for {@link IPart} implementations. - */ - EnumSet getConnectableSides(); - - /** - * @return the IGridHost for the node, this will be an IGridPart or a TileEntity generally speaking. - */ - IGridHost getMachine(); - - /** - * called when the grid for the node has changed, the general grid state should not be trusted at this point. - */ - void gridChanged(); - - /** - * Determines what item stack is used to render this node in the GUI. - * - * @return the render item stack to use to render this node, null is valid, and will not show this node. - */ - public ItemStack getMachineRepresentation(); -} +package appeng.api.networking; + +import appeng.api.parts.IPart; +import appeng.api.util.AEColor; +import appeng.api.util.DimensionalCoord; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.util.ForgeDirection; + +import java.util.EnumSet; + +/** + * An Implementation is required to create your node for IGridHost + * + * Implement for use with IGridHost + */ +public interface IGridBlock +{ + + /** + * how much power to drain per tick as part of idle network usage. + * + * if the value of this changes, you must post a MENetworkPowerIdleChange + * + * @return ae/t to use. + */ + double getIdlePowerUsage(); + + /** + * Various flags that AE uses to modify basic behavior for various parts of the network. + * + * @return Set of flags for this IGridBlock + */ + EnumSet getFlags(); + + /** + * generally speaking you will return true for this, the one exception is buses, or worm holes where the node + * represents something that isn't a real connection in the world, but rather one represented internally to the + * block. + * + * @return if the world can connect to this node, and the node can connect to the world. + */ + boolean isWorldAccessible(); + + /** + * @return current location of this node + */ + DimensionalCoord getLocation(); + + /** + * @return Transparent, or a valid color, NULL IS NOT A VALID RETURN + */ + AEColor getGridColor(); + + /** + * Notifies your IGridBlock that changes were made to your connections + */ + void onGridNotification(GridNotification notification); + + /** + * Update Blocks network/connection/booting status. grid, + * + * @param grid grid + * @param channelsInUse used channels + */ + public void setNetworkStatus(IGrid grid, int channelsInUse); + + /** + * Determine which sides of the block can be connected too, only used when isWorldAccessible returns true, not used + * for {@link IPart} implementations. + */ + EnumSet getConnectableSides(); + + /** + * @return the IGridHost for the node, this will be an IGridPart or a TileEntity generally speaking. + */ + IGridHost getMachine(); + + /** + * called when the grid for the node has changed, the general grid state should not be trusted at this point. + */ + void gridChanged(); + + /** + * Determines what item stack is used to render this node in the GUI. + * + * @return the render item stack to use to render this node, null is valid, and will not show this node. + */ + public ItemStack getMachineRepresentation(); +} diff --git a/src/api/java/appeng/api/networking/IGridCache.java b/src/api/java/appeng/api/networking/IGridCache.java index 7fe0d457..3e608aae 100644 --- a/src/api/java/appeng/api/networking/IGridCache.java +++ b/src/api/java/appeng/api/networking/IGridCache.java @@ -1,71 +1,71 @@ -package appeng.api.networking; - -/** - * - * Allows you to create a network wise service, AE2 uses these for providing - * item, spatial, and tunnel services. - * - * Any Class that implements this, should have a public default constructor that - * takes a single argument of type IGrid. - * - */ -public interface IGridCache -{ - - /** - * Called each tick for the network, allows you to have active network wide - * behaviors. - * - */ - void onUpdateTick(); - - /** - * inform your cache, that a machine was removed from the grid. - * - * Important: Do not trust the grids state in this method, interact only - * with the node you are passed, if you need to manage other grid - * information, do it on the next updateTick. - * - * @param gridNode - * @param machine - */ - void removeNode(IGridNode gridNode, IGridHost machine); - - /** - * informs you cache that a machine was added to the grid. - * - * Important: Do not trust the grids state in this method, interact only - * with the node you are passed, if you need to manage other grid - * information, do it on the next updateTick. - * - * @param gridNode - * @param machine - */ - void addNode(IGridNode gridNode, IGridHost machine); - - /** - * Called when a grid splits into two grids, AE will call a split as it - * Iteratively processes changes. The destination should receive half, and - * the current cache should receive half. - * - * @param destinationStorage - */ - void onSplit(IGridStorage destinationStorage); - - /** - * Called when two grids merge into one, AE will call a join as it - * Iteratively processes changes. Use this method to incorporate all the - * data from the source into your cache. - * - * @param sourceStorage - */ - void onJoin(IGridStorage sourceStorage); - - /** - * Called when saving changes, - * - * @param destinationStorage - */ - void populateGridStorage(IGridStorage destinationStorage); - -} +package appeng.api.networking; + +/** + * + * Allows you to create a network wise service, AE2 uses these for providing + * item, spatial, and tunnel services. + * + * Any Class that implements this, should have a public default constructor that + * takes a single argument of type IGrid. + * + */ +public interface IGridCache +{ + + /** + * Called each tick for the network, allows you to have active network wide + * behaviors. + * + */ + void onUpdateTick(); + + /** + * inform your cache, that a machine was removed from the grid. + * + * Important: Do not trust the grids state in this method, interact only + * with the node you are passed, if you need to manage other grid + * information, do it on the next updateTick. + * + * @param gridNode removed from that grid + * @param machine to be removed machine + */ + void removeNode(IGridNode gridNode, IGridHost machine); + + /** + * informs you cache that a machine was added to the grid. + * + * Important: Do not trust the grids state in this method, interact only + * with the node you are passed, if you need to manage other grid + * information, do it on the next updateTick. + * + * @param gridNode added to grid node + * @param machine to be added machine + */ + void addNode(IGridNode gridNode, IGridHost machine); + + /** + * Called when a grid splits into two grids, AE will call a split as it + * Iteratively processes changes. The destination should receive half, and + * the current cache should receive half. + * + * @param destinationStorage storage which receives half of old grid + */ + void onSplit(IGridStorage destinationStorage); + + /** + * Called when two grids merge into one, AE will call a join as it + * Iteratively processes changes. Use this method to incorporate all the + * data from the source into your cache. + * + * @param sourceStorage old storage + */ + void onJoin(IGridStorage sourceStorage); + + /** + * Called when saving changes, + * + * @param destinationStorage storage + */ + void populateGridStorage(IGridStorage destinationStorage); + +} diff --git a/src/api/java/appeng/api/networking/IGridCacheRegistry.java b/src/api/java/appeng/api/networking/IGridCacheRegistry.java index d1b68b83..bd36fe29 100644 --- a/src/api/java/appeng/api/networking/IGridCacheRegistry.java +++ b/src/api/java/appeng/api/networking/IGridCacheRegistry.java @@ -1,28 +1,27 @@ -package appeng.api.networking; - -import java.util.HashMap; - -/** - * A registry of grid caches to extend grid functionality. - */ -public interface IGridCacheRegistry -{ - - /** - * Register a new grid cache for use during operation, must be called during the loading phase. - * - * @param cl - * @return cache id ( can be used later to ask the grid for you cache. ) - */ - void registerGridCache(Class iface, Class implementation); - - /** - * requests a new instance of a grid cache for use, used internally - * - * @param grid - * - * @return a new HashMap of IGridCaches from the registry, called from IGrid when constructing a new grid. - */ - HashMap, IGridCache> createCacheInstance(IGrid grid); - -} +package appeng.api.networking; + +import java.util.HashMap; + +/** + * A registry of grid caches to extend grid functionality. + */ +public interface IGridCacheRegistry +{ + + /** + * Register a new grid cache for use during operation, must be called during the loading phase. + * + * @param iface grid cache class + */ + void registerGridCache(Class iface, Class implementation); + + /** + * requests a new instance of a grid cache for use, used internally + * + * @param grid grid + * + * @return a new HashMap of IGridCaches from the registry, called from IGrid when constructing a new grid. + */ + HashMap, IGridCache> createCacheInstance(IGrid grid); + +} diff --git a/src/api/java/appeng/api/networking/IGridConnection.java b/src/api/java/appeng/api/networking/IGridConnection.java index 9e07090a..bbeea1b5 100644 --- a/src/api/java/appeng/api/networking/IGridConnection.java +++ b/src/api/java/appeng/api/networking/IGridConnection.java @@ -1,58 +1,58 @@ -package appeng.api.networking; - -import net.minecraftforge.common.util.ForgeDirection; - -/** - * Access to AE's internal grid connections. - * - * Messing with connection is generally completely unnecessary, you should be able to just use IGridNode.updateState() - * to have AE manage them for you. - * - * Don't Implement. - */ -public interface IGridConnection -{ - - /** - * lets you get the opposing node of the connection by passing your own node. - * - * @param gridNode - * @return the IGridNode which represents the opposite side of the connection. - */ - IGridNode getOtherSide(IGridNode gridNode); - - /** - * determine the direction of the connection based on your node. - * - * @param gridNode - * @return the direction of the connection, only valid for in world connections. - */ - ForgeDirection getDirection(IGridNode gridNode); - - /** - * by destroying a connection you may create new grids, and trigger un-expected behavior, you should only destroy - * connections if you created them. - */ - void destroy(); - - /** - * @return node A - */ - IGridNode a(); - - /** - * @return node B - */ - IGridNode b(); - - /** - * @return if the connection is invisible this returns false - */ - boolean hasDirection(); - - /** - * @return how many channels pass over this connections. - */ - int getUsedChannels(); - +package appeng.api.networking; + +import net.minecraftforge.common.util.ForgeDirection; + +/** + * Access to AE's internal grid connections. + * + * Messing with connection is generally completely unnecessary, you should be able to just use IGridNode.updateState() + * to have AE manage them for you. + * + * Don't Implement. + */ +public interface IGridConnection +{ + + /** + * lets you get the opposing node of the connection by passing your own node. + * + * @param gridNode current grid node + * @return the IGridNode which represents the opposite side of the connection. + */ + IGridNode getOtherSide(IGridNode gridNode); + + /** + * determine the direction of the connection based on your node. + * + * @param gridNode current grid node + * @return the direction of the connection, only valid for in world connections. + */ + ForgeDirection getDirection(IGridNode gridNode); + + /** + * by destroying a connection you may create new grids, and trigger un-expected behavior, you should only destroy + * connections if you created them. + */ + void destroy(); + + /** + * @return node A + */ + IGridNode a(); + + /** + * @return node B + */ + IGridNode b(); + + /** + * @return if the connection is invisible this returns false + */ + boolean hasDirection(); + + /** + * @return how many channels pass over this connections. + */ + int getUsedChannels(); + } \ No newline at end of file diff --git a/src/api/java/appeng/api/networking/IGridConnecitonVisitor.java b/src/api/java/appeng/api/networking/IGridConnectionVisitor.java similarity index 75% rename from src/api/java/appeng/api/networking/IGridConnecitonVisitor.java rename to src/api/java/appeng/api/networking/IGridConnectionVisitor.java index b3da721c..d79ce670 100644 --- a/src/api/java/appeng/api/networking/IGridConnecitonVisitor.java +++ b/src/api/java/appeng/api/networking/IGridConnectionVisitor.java @@ -1,6 +1,6 @@ package appeng.api.networking; -public interface IGridConnecitonVisitor extends IGridVisitor +public interface IGridConnectionVisitor extends IGridVisitor { /** diff --git a/src/api/java/appeng/api/networking/IGridHost.java b/src/api/java/appeng/api/networking/IGridHost.java index f69b347f..818cb741 100644 --- a/src/api/java/appeng/api/networking/IGridHost.java +++ b/src/api/java/appeng/api/networking/IGridHost.java @@ -1,43 +1,43 @@ -package appeng.api.networking; - -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; -import appeng.api.parts.IPart; -import appeng.api.util.AECableType; - -/** - * - * Implement to create a networked {@link TileEntity} or {@link IPart} must - * be implemented for a part, or tile entity to become part of a grid. - * - */ -public interface IGridHost -{ - - /** - * get the grid node for a particular side of a block, you can return null, - * by returning a valid node later and calling updateState, you can join the - * Grid when your block is ready. - * - * @param dir - * feel free to ignore this, most blocks will use the same node - * for every side. - * @return a new IGridNode, create these with - * AEApi.instance().createGridNode( MyIGridBlock ) - */ - public IGridNode getGridNode(ForgeDirection dir); - - /** - * Determines how cables render when they connect to this block. Priority is - * Smart > Covered > Glass - * - * @param dir - */ - public AECableType getCableConnectionType(ForgeDirection dir); - - /** - * break this host, its violating security rules, just break your block, or part. - */ - public void securityBreak(); - -} +package appeng.api.networking; + +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; +import appeng.api.parts.IPart; +import appeng.api.util.AECableType; + +/** + * + * Implement to create a networked {@link TileEntity} or {@link IPart} must + * be implemented for a part, or tile entity to become part of a grid. + * + */ +public interface IGridHost +{ + + /** + * get the grid node for a particular side of a block, you can return null, + * by returning a valid node later and calling updateState, you can join the + * Grid when your block is ready. + * + * @param dir + * feel free to ignore this, most blocks will use the same node + * for every side. + * @return a new IGridNode, create these with + * AEApi.instance().createGridNode( MyIGridBlock ) + */ + public IGridNode getGridNode(ForgeDirection dir); + + /** + * Determines how cables render when they connect to this block. Priority is + * Smart > Covered > Glass + * + * @param dir direction + */ + public AECableType getCableConnectionType(ForgeDirection dir); + + /** + * break this host, its violating security rules, just break your block, or part. + */ + public void securityBreak(); + +} diff --git a/src/api/java/appeng/api/networking/IGridNode.java b/src/api/java/appeng/api/networking/IGridNode.java index bb99e2c0..30a3bb5f 100644 --- a/src/api/java/appeng/api/networking/IGridNode.java +++ b/src/api/java/appeng/api/networking/IGridNode.java @@ -1,141 +1,141 @@ -package appeng.api.networking; - -import java.util.EnumSet; - -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; -import appeng.api.IAppEngApi; -import appeng.api.util.IReadOnlyCollection; - -/** - * - * Gives you a view into your Nodes connections and information. - * - * updateState, getGrid, destroy are required to implement a proper IGridHost. - * - * Don't Implement; Acquire from {@link IAppEngApi}.createGridNode - * - */ -public interface IGridNode -{ - - /** - * lets you walk the grid stating at the current node using a IGridVisitor, generally not needed, please use only if - * required. - * - * @param g - */ - void beginVisition(IGridVisitor g); - - /** - * inform the node that your IGridBlock has changed its internal state, and force the node to update. - * - * ALWAYS make sure that your tile entity is in the world, and has its node properly saved to be returned from the - * host before updating state, - * - * If your entity is not in the world, or if you IGridHost returns a different node for the same side you will - * likely crash the game. - * - */ - void updateState(); - - /** - * get the machine represented by the node. - * - * @return - */ - IGridHost getMachine(); - - /** - * get the grid for the node, this can change at a moments notice. - * - * @return - */ - IGrid getGrid(); - - /** - * By destroying your node, you destroy any connections, and its existence in the grid, use in invalidate, or - * onChunkUnload - */ - void destroy(); - - /** - * @return the world the node is located in - */ - World getWorld(); - - /** - * - * @return a set of the connected sides, UNKNOWN represents an invisible connection - */ - EnumSet getConnectedSides(); - - /** - * lets you iterate a nodes connections - * - * @return - */ - IReadOnlyCollection getConnections(); - - /** - * @return the IGridBlock for this node - */ - IGridBlock getGridBlock(); - - /** - * Reflects the networks status, returns true only if the network is powered, and the network is not booting, this - * also takes into account channels. - * - * @return true if is Network node active, and participating. - */ - boolean isActive(); - - /** - * this should be called for each node you create, if you have a nodeData compound to load from, you can store all - * your nods on a single compound using name. - * - * Important: You must call this before updateState. - * - * @param name - * @param nodeData - */ - void loadFromNBT(String name, NBTTagCompound nodeData); - - /** - * this should be called for each node you maintain, you can save all your nodes to the same tag with different - * names, if you fail to complete the load / save procedure, network state may be lost between game load/saves. - * - * @param name - * @param nodeData - */ - void saveToNBT(String name, NBTTagCompound nodeData); - - /** - * @return if the node's channel requirements are currently met, use this for display purposes, use isActive for - * status. - */ - boolean meetsChannelRequirements(); - - /** - * see if this node has a certain flag - * - * @param tier2Capacity - * @return - */ - boolean hasFlag(GridFlags flag); - - /** - * tell the node who was responsible for placing it, failure to do this may result in in-compatibility with the - * security system. Called instead of loadFromNBT when intialily placed, once set never required again, the value is saved with the Node NBT. - * - * @param p - */ - void setPlayerID(int playerID); - - /** - * @return the ownerID this represents the person who placed the node. - */ - int getPlayerID(); - +package appeng.api.networking; + +import appeng.api.IAppEngApi; +import appeng.api.util.IReadOnlyCollection; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + +import java.util.EnumSet; + +/** + * + * Gives you a view into your Nodes connections and information. + * + * updateState, getGrid, destroy are required to implement a proper IGridHost. + * + * Don't Implement; Acquire from {@link IAppEngApi}.createGridNode + * + */ +public interface IGridNode +{ + + /** + * lets you walk the grid stating at the current node using a IGridVisitor, generally not needed, please use only if + * required. + * + * @param visitor visitor + */ + void beginVisit(IGridVisitor visitor); + + /** + * inform the node that your IGridBlock has changed its internal state, and force the node to update. + * + * ALWAYS make sure that your tile entity is in the world, and has its node properly saved to be returned from the + * host before updating state, + * + * If your entity is not in the world, or if you IGridHost returns a different node for the same side you will + * likely crash the game. + * + */ + void updateState(); + + /** + * get the machine represented by the node. + * + * @return grid host + */ + IGridHost getMachine(); + + /** + * get the grid for the node, this can change at a moments notice. + * + * @return grid + */ + IGrid getGrid(); + + /** + * By destroying your node, you destroy any connections, and its existence in the grid, use in invalidate, or + * onChunkUnload + */ + void destroy(); + + /** + * @return the world the node is located in + */ + World getWorld(); + + /** + * + * @return a set of the connected sides, UNKNOWN represents an invisible connection + */ + EnumSet getConnectedSides(); + + /** + * lets you iterate a nodes connections + * + * @return grid connections + */ + IReadOnlyCollection getConnections(); + + /** + * @return the IGridBlock for this node + */ + IGridBlock getGridBlock(); + + /** + * Reflects the networks status, returns true only if the network is powered, and the network is not booting, this + * also takes into account channels. + * + * @return true if is Network node active, and participating. + */ + boolean isActive(); + + /** + * this should be called for each node you create, if you have a nodeData compound to load from, you can store all + * your nods on a single compound using name. + * + * Important: You must call this before updateState. + * + * @param name nbt name + * @param nodeData to be loaded data + */ + void loadFromNBT(String name, NBTTagCompound nodeData); + + /** + * this should be called for each node you maintain, you can save all your nodes to the same tag with different + * names, if you fail to complete the load / save procedure, network state may be lost between game load/saves. + * + * @param name nbt name + * @param nodeData to be saved data + */ + void saveToNBT(String name, NBTTagCompound nodeData); + + /** + * @return if the node's channel requirements are currently met, use this for display purposes, use isActive for + * status. + */ + boolean meetsChannelRequirements(); + + /** + * see if this node has a certain flag + * + * @param flag flags + * @return true if has flag + */ + boolean hasFlag(GridFlags flag); + + /** + * tell the node who was responsible for placing it, failure to do this may result in in-compatibility with the + * security system. Called instead of loadFromNBT when initially placed, once set never required again, the value is saved with the Node NBT. + * + * @param playerID new player id + */ + void setPlayerID(int playerID); + + /** + * @return the ownerID this represents the person who placed the node. + */ + int getPlayerID(); + } \ No newline at end of file diff --git a/src/api/java/appeng/api/networking/IGridVisitor.java b/src/api/java/appeng/api/networking/IGridVisitor.java index 2593160f..0b85b07f 100644 --- a/src/api/java/appeng/api/networking/IGridVisitor.java +++ b/src/api/java/appeng/api/networking/IGridVisitor.java @@ -1,21 +1,21 @@ -package appeng.api.networking; - -/** - * Simple Visitor pattern access to network nodes. - */ -public interface IGridVisitor -{ - - /** - * Called for each node on the network. - * - * By returning false your informing the host to stop visiting nodes beyond the current node. - * - * @param n - * the current node. - * - * @return true to continue visiting nodes beyond this node. - */ - public boolean visitNode(IGridNode n); - -} +package appeng.api.networking; + +/** + * Simple Visitor pattern access to network nodes. + */ +public interface IGridVisitor +{ + + /** + * Called for each node on the network. + * + * By returning false your informing the host to stop visiting nodes beyond the current node. + * + * @param n + * the current node. + * + * @return true to continue visiting nodes beyond this node. + */ + public boolean visitNode(IGridNode n); + +} diff --git a/src/api/java/appeng/api/networking/crafting/ICraftingGrid.java b/src/api/java/appeng/api/networking/crafting/ICraftingGrid.java index 65890cca..8ac1dc83 100644 --- a/src/api/java/appeng/api/networking/crafting/ICraftingGrid.java +++ b/src/api/java/appeng/api/networking/crafting/ICraftingGrid.java @@ -1,24 +1,23 @@ package appeng.api.networking.crafting; -import java.util.concurrent.Future; - -import net.minecraft.world.World; import appeng.api.networking.IGrid; import appeng.api.networking.IGridCache; import appeng.api.networking.security.BaseActionSource; import appeng.api.storage.data.IAEItemStack; - import com.google.common.collect.ImmutableCollection; import com.google.common.collect.ImmutableSet; +import net.minecraft.world.World; + +import java.util.concurrent.Future; public interface ICraftingGrid extends IGridCache { /** - * @param whatToCraft - * @param world - * @param slot - * @param details + * @param whatToCraft requested craft + * @param world crafting world + * @param slot slot index + * @param details pattern details * @return a collection of crafting patterns for the item in question. */ ImmutableCollection getCraftingFor(IAEItemStack whatToCraft, ICraftingPatternDetails details, int slot, World world); @@ -26,11 +25,11 @@ public interface ICraftingGrid extends IGridCache /** * Begin calculating a crafting job. * - * @param world - * @param grid - * @param actionSrc - * @param craftWhat - * @param callback + * @param world crafting world + * @param grid network + * @param actionSrc source + * @param craftWhat result + * @param callback callback * -- optional * * @return a future which will at an undetermined point in the future get you the {@link ICraftingJob} do not wait @@ -41,18 +40,18 @@ public interface ICraftingGrid extends IGridCache /** * Submit the job to the Crafting system for processing. * - * @param result + * @param job * - the crafting job from beginCraftingJob * @param requestingMachine * - a machine if its being requested via automation, may be null. - * @param cpu + * @param target * - can be null * * @param prioritizePower * - if cpu is null, this determine if the system should prioritize power, or if it should find the lower * end cpus, automatic processes generally should pick lower end cpus. * - * @param actionSrc + * @param src * - the action source to use when starting the job, this will be used for extracting items, should * usually be the same as the one provided to beginCraftingJob. * @@ -69,7 +68,7 @@ public interface ICraftingGrid extends IGridCache ImmutableSet getCpus(); /** - * @param what + * @param what to be requested item * @return true if the item can be requested via a crafting emitter. */ boolean canEmitFor(IAEItemStack what); @@ -77,8 +76,8 @@ public interface ICraftingGrid extends IGridCache /** * is this item being crafted? * - * @param aeStackInSlot - * @return + * @param aeStackInSlot item being crafted + * @return true if it is being crafting */ boolean isRequesting(IAEItemStack aeStackInSlot); diff --git a/src/api/java/appeng/api/networking/crafting/ICraftingJob.java b/src/api/java/appeng/api/networking/crafting/ICraftingJob.java index fcef0f94..8eeb29eb 100644 --- a/src/api/java/appeng/api/networking/crafting/ICraftingJob.java +++ b/src/api/java/appeng/api/networking/crafting/ICraftingJob.java @@ -21,7 +21,7 @@ public interface ICraftingJob * Populates the plan list with stack size, and requestable values that represent the stored, and crafting job * contents respectively. * - * @param plan + * @param plan plan */ void populatePlan(IItemList plan); diff --git a/src/api/java/appeng/api/networking/crafting/ICraftingLink.java b/src/api/java/appeng/api/networking/crafting/ICraftingLink.java index d1a480c6..be7f4f38 100644 --- a/src/api/java/appeng/api/networking/crafting/ICraftingLink.java +++ b/src/api/java/appeng/api/networking/crafting/ICraftingLink.java @@ -28,7 +28,7 @@ public interface ICraftingLink /** * write the link to an NBT Tag * - * @param tag + * @param tag to be written data */ void writeToNBT(NBTTagCompound tag); diff --git a/src/api/java/appeng/api/networking/crafting/ICraftingMedium.java b/src/api/java/appeng/api/networking/crafting/ICraftingMedium.java index ba27d8c9..b84e7937 100644 --- a/src/api/java/appeng/api/networking/crafting/ICraftingMedium.java +++ b/src/api/java/appeng/api/networking/crafting/ICraftingMedium.java @@ -12,9 +12,8 @@ public interface ICraftingMedium * instruct a medium to create the item represented by the pattern+details, the items on the table, and where if * possible the output should be directed. * - * @param pattern - * @param patternDetails - * @param table + * @param patternDetails details + * @param table crafting table * @return if the pattern was successfully pushed. */ boolean pushPattern(ICraftingPatternDetails patternDetails, InventoryCrafting table); diff --git a/src/api/java/appeng/api/networking/crafting/ICraftingPatternDetails.java b/src/api/java/appeng/api/networking/crafting/ICraftingPatternDetails.java index f364e5e7..0fb4eb34 100644 --- a/src/api/java/appeng/api/networking/crafting/ICraftingPatternDetails.java +++ b/src/api/java/appeng/api/networking/crafting/ICraftingPatternDetails.java @@ -9,7 +9,7 @@ import appeng.api.storage.data.IAEItemStack; /** * do not implement provided by {@link ICraftingPatternItem} * - * caching this instance will increase preformance of validation and checks. + * caching this instance will increase performance of validation and checks. */ public interface ICraftingPatternDetails { @@ -20,9 +20,9 @@ public interface ICraftingPatternDetails ItemStack getPattern(); /** - * @param slotIndex - * @param itemStack - * @param world + * @param slotIndex specific slot index + * @param itemStack item in slot + * @param world crafting world * * @return if an item can be used in the specific slot for this pattern. */ @@ -41,12 +41,12 @@ public interface ICraftingPatternDetails /** * @return a list of the inputs, will be clean */ - IAEItemStack[] getCondencedInputs(); + IAEItemStack[] getCondensedInputs(); /** * @return a list of the outputs, will be clean */ - IAEItemStack[] getCondencedOutputs(); + IAEItemStack[] getCondensedOutputs(); /** * @return a list of the outputs, will include nulls. @@ -59,10 +59,10 @@ public interface ICraftingPatternDetails boolean canSubstitute(); /** - * Allow using this instance of the pattern details to preform the crafting action with preformance enhancements. + * Allow using this instance of the pattern details to preform the crafting action with performance enhancements. * - * @param craftingInv - * @param world + * @param craftingInv inventory + * @param world crafting world * @return the crafted ( work bench ) item. */ ItemStack getOutput(InventoryCrafting craftingInv, World world); @@ -70,8 +70,14 @@ public interface ICraftingPatternDetails /** * Set the priority the of this pattern. * - * @param priority + * @param priority priority of pattern */ void setPriority(int priority); + /** + * Get the priority of this pattern + * + * @return the priority of this pattern + */ + int getPriority(); } diff --git a/src/api/java/appeng/api/networking/crafting/ICraftingProvider.java b/src/api/java/appeng/api/networking/crafting/ICraftingProvider.java index 11faa2b1..edd05177 100644 --- a/src/api/java/appeng/api/networking/crafting/ICraftingProvider.java +++ b/src/api/java/appeng/api/networking/crafting/ICraftingProvider.java @@ -12,7 +12,7 @@ public interface ICraftingProvider extends ICraftingMedium /** * called when the network is looking for possible crafting jobs. * - * @param craftingTracker + * @param craftingTracker crafting helper */ void provideCrafting(ICraftingProviderHelper craftingTracker); diff --git a/src/api/java/appeng/api/networking/crafting/ICraftingRequester.java b/src/api/java/appeng/api/networking/crafting/ICraftingRequester.java index c0eabbe0..0f29bdcf 100644 --- a/src/api/java/appeng/api/networking/crafting/ICraftingRequester.java +++ b/src/api/java/appeng/api/networking/crafting/ICraftingRequester.java @@ -21,11 +21,11 @@ public interface ICraftingRequester extends IActionHost * items are injected into the requester as they are completed, any items that cannot be taken, or are unwanted can * be returned. * - * @param items - * @param mode - * @return + * @param items item + * @param mode action mode + * @return unwanted item */ - IAEItemStack injectCratedItems(ICraftingLink link, IAEItemStack items, Actionable mode); + IAEItemStack injectCraftedItems(ICraftingLink link, IAEItemStack items, Actionable mode); /** * called when the job changes from in progress, to either complete, or canceled. diff --git a/src/api/java/appeng/api/networking/crafting/ICraftingWatcherHost.java b/src/api/java/appeng/api/networking/crafting/ICraftingWatcherHost.java index 4cc7ee30..b5ae4384 100644 --- a/src/api/java/appeng/api/networking/crafting/ICraftingWatcherHost.java +++ b/src/api/java/appeng/api/networking/crafting/ICraftingWatcherHost.java @@ -6,18 +6,18 @@ public interface ICraftingWatcherHost { /** - * provides the ICraftngiWatcher for this host, for the current network, is called when the hot changes networks. + * provides the ICraftingWatcher for this host, for the current network, is called when the hot changes networks. * You do not need to clear your old watcher, its already been removed by the time this gets called. * - * @param newWatcher + * @param newWatcher crafting watcher for this host */ void updateWatcher(ICraftingWatcher newWatcher); /** * Called when a crafting status changes. * - * @param craftingGrid - * @param what + * @param craftingGrid current crafting grid + * @param what change */ void onRequestChange(ICraftingGrid craftingGrid, IAEItemStack what); diff --git a/src/api/java/appeng/api/networking/energy/IAEPowerStorage.java b/src/api/java/appeng/api/networking/energy/IAEPowerStorage.java index 3256ed27..a97c5e60 100644 --- a/src/api/java/appeng/api/networking/energy/IAEPowerStorage.java +++ b/src/api/java/appeng/api/networking/energy/IAEPowerStorage.java @@ -12,9 +12,10 @@ public interface IAEPowerStorage extends IEnergySource /** * Inject amt, power into the device, it will store what it can, and return the amount unable to be stored. * - * @param simulate + * @param amt to be injected amount + * @param mode action mode * - * @return + * @return amount of power which was unable to be stored */ public double injectAEPower(double amt, Actionable mode); @@ -32,14 +33,14 @@ public interface IAEPowerStorage extends IEnergySource * Checked on network reset to see if your block can be used as a public power storage ( use getPowerFlow to control * the behavior ) * - * @return + * @return true if it can be used as a public power storage */ public boolean isAEPublicPowerStorage(); /** * Control the power flow by telling what the network can do, either add? or subtract? or both! * - * @return + * @return access restriction what the network can do */ public AccessRestriction getPowerFlow(); diff --git a/src/api/java/appeng/api/networking/energy/IEnergyGrid.java b/src/api/java/appeng/api/networking/energy/IEnergyGrid.java index 041cfebb..61c0613c 100644 --- a/src/api/java/appeng/api/networking/energy/IEnergyGrid.java +++ b/src/api/java/appeng/api/networking/energy/IEnergyGrid.java @@ -1,82 +1,82 @@ -package appeng.api.networking.energy; - -import appeng.api.config.Actionable; -import appeng.api.networking.IGridCache; -import appeng.api.networking.events.MENetworkPowerStatusChange; - -/** - * AE's Power system. - */ -public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvider -{ - - /** - * @return the current calculated idle energy drain each tick, is used internally to drain power for each tick. - */ - public double getIdlePowerUsage(); - - /** - * @return the average power drain over the past 10 ticks, includes idle usage during this time, and all use of - * extractPower. - */ - public double getAvgPowerUsage(); - - /** - * @return the average energy injected into the system per tick, for the last 10 ticks. - */ - public double getAvgPowerInjection(); - - /** - * AE maintains an idle draw of power separate from active power draw, it condenses this into a single operation - * that determines the networks "powered state" if the network is considered off-line, your machines should not - * function. - * - * {@link MENetworkPowerStatusChange} events are posted when this value changes if you need to be notified of the - * change, most machines can simply test the value when they operate. - * - * @return if the network is powered or not. - */ - public boolean isNetworkPowered(); - - /** - * AE will accept any power, and store it, to maintain sanity please don't send more then 10,000 at a time. - * - * IMPORTANT: Network power knows no bounds, for less spamy power flow, networks can store more then their alloted - * storage, however, it should be kept to a minimum, to help with this, this method returns the networks current - * OVERFLOW, this is not energy you can store some where else, its already stored in the network, you can extract it - * if you want, however it it owned by the network, this is different then IAEEnergyStore - * - * Another important note, is that if a network that had overflow is deleted, its power is gone, this is one of the - * reasons why keeping overflow to a minimum is important. - * - * @param amt - * power to inject into the network - * @param mode - * should the action be simulated or performed? - * @return the amount of power that the network has OVER the limit. - */ - public double injectPower(double amt, Actionable mode); - - /** - * this is should be considered an estimate, and not relied upon for real calculations. - * - * @return estimated available power. - */ - public double getStoredPower(); - - /** - * this is should be considered an estimate, and not relied upon for real calculations. - * - * @return estimated available power. - */ - double getMaxStoredPower(); - - /** - * Calculation will be capped at maxRequired, this improves performance by limiting the number of nodes needed to - * calculate the demand. - * - * @return Amount of power required to charge the grid, in AE. - */ - public double getEnergyDemand(double maxRequired); - -} +package appeng.api.networking.energy; + +import appeng.api.config.Actionable; +import appeng.api.networking.IGridCache; +import appeng.api.networking.events.MENetworkPowerStatusChange; + +/** + * AE's Power system. + */ +public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvider +{ + + /** + * @return the current calculated idle energy drain each tick, is used internally to drain power for each tick. + */ + public double getIdlePowerUsage(); + + /** + * @return the average power drain over the past 10 ticks, includes idle usage during this time, and all use of + * extractPower. + */ + public double getAvgPowerUsage(); + + /** + * @return the average energy injected into the system per tick, for the last 10 ticks. + */ + public double getAvgPowerInjection(); + + /** + * AE maintains an idle draw of power separate from active power draw, it condenses this into a single operation + * that determines the networks "powered state" if the network is considered off-line, your machines should not + * function. + * + * {@link MENetworkPowerStatusChange} events are posted when this value changes if you need to be notified of the + * change, most machines can simply test the value when they operate. + * + * @return if the network is powered or not. + */ + public boolean isNetworkPowered(); + + /** + * AE will accept any power, and store it, to maintain sanity please don't send more then 10,000 at a time. + * + * IMPORTANT: Network power knows no bounds, for less spamy power flow, networks can store more then their allotted + * storage, however, it should be kept to a minimum, to help with this, this method returns the networks current + * OVERFLOW, this is not energy you can store some where else, its already stored in the network, you can extract it + * if you want, however it it owned by the network, this is different then IAEEnergyStore + * + * Another important note, is that if a network that had overflow is deleted, its power is gone, this is one of the + * reasons why keeping overflow to a minimum is important. + * + * @param amt + * power to inject into the network + * @param mode + * should the action be simulated or performed? + * @return the amount of power that the network has OVER the limit. + */ + public double injectPower(double amt, Actionable mode); + + /** + * this is should be considered an estimate, and not relied upon for real calculations. + * + * @return estimated available power. + */ + public double getStoredPower(); + + /** + * this is should be considered an estimate, and not relied upon for real calculations. + * + * @return estimated available power. + */ + double getMaxStoredPower(); + + /** + * Calculation will be capped at maxRequired, this improves performance by limiting the number of nodes needed to + * calculate the demand. + * + * @return Amount of power required to charge the grid, in AE. + */ + public double getEnergyDemand(double maxRequired); + +} diff --git a/src/api/java/appeng/api/networking/energy/IEnergyGridProvider.java b/src/api/java/appeng/api/networking/energy/IEnergyGridProvider.java index a7412630..656ae7a4 100644 --- a/src/api/java/appeng/api/networking/energy/IEnergyGridProvider.java +++ b/src/api/java/appeng/api/networking/energy/IEnergyGridProvider.java @@ -1,28 +1,28 @@ -package appeng.api.networking.energy; - -import java.util.Set; - -import appeng.api.config.Actionable; - -/** - * internal use only. - */ -public interface IEnergyGridProvider -{ - - /** - * internal use only - */ - public double extractAEPower(double amt, Actionable mode, Set seen); - - /** - * internal use only - */ - public double injectAEPower(double amt, Actionable mode, Set seen); - - /** - * internal use only - */ - public double getEnergyDemand(double d, Set seen); - -} +package appeng.api.networking.energy; + +import java.util.Set; + +import appeng.api.config.Actionable; + +/** + * internal use only. + */ +public interface IEnergyGridProvider +{ + + /** + * internal use only + */ + public double extractAEPower(double amt, Actionable mode, Set seen); + + /** + * internal use only + */ + public double injectAEPower(double amt, Actionable mode, Set seen); + + /** + * internal use only + */ + public double getEnergyDemand(double d, Set seen); + +} diff --git a/src/api/java/appeng/api/networking/energy/IEnergySource.java b/src/api/java/appeng/api/networking/energy/IEnergySource.java index fa18d1e1..52a8c272 100644 --- a/src/api/java/appeng/api/networking/energy/IEnergySource.java +++ b/src/api/java/appeng/api/networking/energy/IEnergySource.java @@ -9,9 +9,8 @@ public interface IEnergySource /** * Extract power from the network. * - * @param amt - * @param mode - * should the action be simulated or performed? + * @param amt extracted power + * @param mode should the action be simulated or performed? * @return returns extracted power. */ public double extractAEPower(double amt, Actionable mode, PowerMultiplier usePowerMultiplier); diff --git a/src/api/java/appeng/api/networking/energy/IEnergyWatcherHost.java b/src/api/java/appeng/api/networking/energy/IEnergyWatcherHost.java index c844d73e..775380ca 100644 --- a/src/api/java/appeng/api/networking/energy/IEnergyWatcherHost.java +++ b/src/api/java/appeng/api/networking/energy/IEnergyWatcherHost.java @@ -7,15 +7,15 @@ public interface IEnergyWatcherHost * provides the IEnergyWatcher for this host, for the current network, is called when the hot changes networks. You * do not need to clear your old watcher, its already been removed by the time this gets called. * - * @param newWatcher + * @param newWatcher new watcher */ void updateWatcher(IEnergyWatcher newWatcher); /** * Called when a threshold is crossed. * - * @param energyGrid + * @param energyGrid grid */ - void onThreshholdPass(IEnergyGrid energyGrid); + void onThresholdPass(IEnergyGrid energyGrid); } diff --git a/src/api/java/appeng/api/networking/events/MENetworkCellArrayUpdate.java b/src/api/java/appeng/api/networking/events/MENetworkCellArrayUpdate.java index 1260216a..aec90e78 100644 --- a/src/api/java/appeng/api/networking/events/MENetworkCellArrayUpdate.java +++ b/src/api/java/appeng/api/networking/events/MENetworkCellArrayUpdate.java @@ -1,7 +1,7 @@ package appeng.api.networking.events; /** - * Posted by storage devices to inform AE to refreash its storage structure. + * Posted by storage devices to inform AE to refresh its storage structure. * * This is done in cases such as a storage cell being removed or added to a * drive. diff --git a/src/api/java/appeng/api/networking/events/MENetworkChannelChanged.java b/src/api/java/appeng/api/networking/events/MENetworkChannelChanged.java index 85409c52..bce30749 100644 --- a/src/api/java/appeng/api/networking/events/MENetworkChannelChanged.java +++ b/src/api/java/appeng/api/networking/events/MENetworkChannelChanged.java @@ -3,7 +3,7 @@ package appeng.api.networking.events; import appeng.api.networking.IGridNode; /** - * Posted by storage devices to inform AE he channel chache that the included node has changed its mind about its + * Posted by storage devices to inform AE the channel cache that the included node has changed its mind about its * channel requirements. */ public class MENetworkChannelChanged extends MENetworkEvent diff --git a/src/api/java/appeng/api/networking/events/MENetworkEvent.java b/src/api/java/appeng/api/networking/events/MENetworkEvent.java index 3fb2dd36..34a2731d 100644 --- a/src/api/java/appeng/api/networking/events/MENetworkEvent.java +++ b/src/api/java/appeng/api/networking/events/MENetworkEvent.java @@ -24,7 +24,7 @@ public class MENetworkEvent /** * called by AE after each object is called to cancel any future calls. * - * @return + * @return true to cancel future calls */ public boolean isCanceled() { @@ -34,7 +34,7 @@ public class MENetworkEvent /** * the number of objects that were visited by the event. * - * @return + * @return number of visitors */ public int getVisitedObjects() { @@ -44,7 +44,7 @@ public class MENetworkEvent /** * Called by AE after iterating the event subscribers. * - * @param v + * @param v current number of visitors */ public void setVisitedObjects(int v) { diff --git a/src/api/java/appeng/api/networking/events/MENetworkPostCacheConstruction.java b/src/api/java/appeng/api/networking/events/MENetworkPostCacheConstruction.java index 05b28128..68cdb74b 100644 --- a/src/api/java/appeng/api/networking/events/MENetworkPostCacheConstruction.java +++ b/src/api/java/appeng/api/networking/events/MENetworkPostCacheConstruction.java @@ -1,10 +1,10 @@ -package appeng.api.networking.events; - -/** - * Posted after all the caches are available, but before the grid is fully - * constructed, can be used to perform cross cache construction processes. - */ -public class MENetworkPostCacheConstruction extends MENetworkEvent -{ - -} +package appeng.api.networking.events; + +/** + * Posted after all the caches are available, but before the grid is fully + * constructed, can be used to perform cross cache construction processes. + */ +public class MENetworkPostCacheConstruction extends MENetworkEvent +{ + +} diff --git a/src/api/java/appeng/api/networking/events/MENetworkPowerIdleChange.java b/src/api/java/appeng/api/networking/events/MENetworkPowerIdleChange.java index 59366847..803c5a7e 100644 --- a/src/api/java/appeng/api/networking/events/MENetworkPowerIdleChange.java +++ b/src/api/java/appeng/api/networking/events/MENetworkPowerIdleChange.java @@ -3,7 +3,7 @@ package appeng.api.networking.events; import appeng.api.networking.IGridNode; /** - * Implementors of a IGridBlock must post this event when your getIdlePowerUsage + * Implementers of a IGridBlock must post this event when your getIdlePowerUsage * starts returning a new value, if you do not post this event the network will * not change the idle draw. * diff --git a/src/api/java/appeng/api/networking/events/MENetworkPowerStorage.java b/src/api/java/appeng/api/networking/events/MENetworkPowerStorage.java index cd907bce..34643450 100644 --- a/src/api/java/appeng/api/networking/events/MENetworkPowerStorage.java +++ b/src/api/java/appeng/api/networking/events/MENetworkPowerStorage.java @@ -25,7 +25,7 @@ public class MENetworkPowerStorage extends MENetworkEvent * informs the network this tile is ready to provide power again. */ PROVIDE_POWER - }; + } public final IAEPowerStorage storage; public final PowerEventType type; diff --git a/src/api/java/appeng/api/networking/events/MENetworkSpatialEvent.java b/src/api/java/appeng/api/networking/events/MENetworkSpatialEvent.java index 2ba0f7ba..ba487aee 100644 --- a/src/api/java/appeng/api/networking/events/MENetworkSpatialEvent.java +++ b/src/api/java/appeng/api/networking/events/MENetworkSpatialEvent.java @@ -3,24 +3,20 @@ package appeng.api.networking.events; import appeng.api.networking.IGridHost; /** - * An event that is posted Whenever a spatial IO is Actived, called for IGridCache - * - * @param IGridHost ( instance of the SpatialIO block ) - * @param double ( the amount of energy that the SpatialIO uses) + * An event that is posted whenever a spatial IO is actived, called for IGridCache */ - - public class MENetworkSpatialEvent extends MENetworkEvent { + public final IGridHost host; + public final double spatialEnergyUsage; - public final IGridHost host; - public final double spatialEnergyUsage; - - - public MENetworkSpatialEvent(IGridHost SpatialIO, double EnergyUsage) { - host = SpatialIO; - spatialEnergyUsage = EnergyUsage; - - } - + /** + * @param SpatialIO ( instance of the SpatialIO block ) + * @param EnergyUsage ( the amount of energy that the SpatialIO uses) + */ + public MENetworkSpatialEvent(IGridHost SpatialIO, double EnergyUsage) + { + host = SpatialIO; + spatialEnergyUsage = EnergyUsage; + } } diff --git a/src/api/java/appeng/api/networking/pathing/IPathingGrid.java b/src/api/java/appeng/api/networking/pathing/IPathingGrid.java index 90f30e04..97416f89 100644 --- a/src/api/java/appeng/api/networking/pathing/IPathingGrid.java +++ b/src/api/java/appeng/api/networking/pathing/IPathingGrid.java @@ -1,24 +1,24 @@ -package appeng.api.networking.pathing; - -import appeng.api.networking.IGridCache; - -public interface IPathingGrid extends IGridCache -{ - - /** - * @return true if the network is in its booting stage - */ - boolean isNetworkBooting(); - - /** - * @return the controller state of the network, useful if you want to - * require a controller for a feature. - */ - ControllerState getControllerState(); - - /** - * trigger a network reset, booting, pathfinding and all. - */ - void repath(); - +package appeng.api.networking.pathing; + +import appeng.api.networking.IGridCache; + +public interface IPathingGrid extends IGridCache +{ + + /** + * @return true if the network is in its booting stage + */ + boolean isNetworkBooting(); + + /** + * @return the controller state of the network, useful if you want to + * require a controller for a feature. + */ + ControllerState getControllerState(); + + /** + * trigger a network reset, booting, pathfinding and all. + */ + void repath(); + } \ No newline at end of file diff --git a/src/api/java/appeng/api/networking/security/ISecurityGrid.java b/src/api/java/appeng/api/networking/security/ISecurityGrid.java index 6fb1d85d..aed72a7c 100644 --- a/src/api/java/appeng/api/networking/security/ISecurityGrid.java +++ b/src/api/java/appeng/api/networking/security/ISecurityGrid.java @@ -15,8 +15,8 @@ public interface ISecurityGrid extends IGridCache /** * Check if a player has permissions. * - * @param player - * @param perm + * @param player to be checked player + * @param perm checked permissions * * @return true if the player has permissions. */ @@ -25,8 +25,8 @@ public interface ISecurityGrid extends IGridCache /** * Check if a player has permissions. * - * @param player - * @param perm + * @param playerID id of player + * @param perm checked permissions * * @return true if the player has permissions. */ diff --git a/src/api/java/appeng/api/networking/security/ISecurityProvider.java b/src/api/java/appeng/api/networking/security/ISecurityProvider.java index 6db5f34f..be9ad4a8 100644 --- a/src/api/java/appeng/api/networking/security/ISecurityProvider.java +++ b/src/api/java/appeng/api/networking/security/ISecurityProvider.java @@ -1,10 +1,10 @@ package appeng.api.networking.security; +import appeng.api.config.SecurityPermissions; + import java.util.EnumSet; import java.util.HashMap; -import appeng.api.config.SecurityPermissions; - /** * Implemented on Security Terminal to interface with security cache. */ @@ -21,7 +21,7 @@ public interface ISecurityProvider /** * Push permission data into security cache. * - * @param playerPerms + * @param playerPerms player permissions */ void readPermissions(HashMap> playerPerms); diff --git a/src/api/java/appeng/api/networking/security/ISecurityRegister.java b/src/api/java/appeng/api/networking/security/ISecurityRegistry.java similarity index 75% rename from src/api/java/appeng/api/networking/security/ISecurityRegister.java rename to src/api/java/appeng/api/networking/security/ISecurityRegistry.java index 1f1ef358..b1abf80c 100644 --- a/src/api/java/appeng/api/networking/security/ISecurityRegister.java +++ b/src/api/java/appeng/api/networking/security/ISecurityRegistry.java @@ -1,20 +1,20 @@ package appeng.api.networking.security; -import java.util.EnumSet; - import appeng.api.config.SecurityPermissions; +import java.util.EnumSet; + /** * Used by vanilla Security Terminal to post biometric data into the security cache. */ -public interface ISecurityRegister +public interface ISecurityRegistry { /** * Submit Permissions into the register. * - * @param PlayerID - * @param permissions + * @param PlayerID player id + * @param permissions permissions of player */ void addPlayer(int PlayerID, EnumSet permissions); diff --git a/src/api/java/appeng/api/networking/spatial/ISpatialCache.java b/src/api/java/appeng/api/networking/spatial/ISpatialCache.java index 3a97868b..2921553f 100644 --- a/src/api/java/appeng/api/networking/spatial/ISpatialCache.java +++ b/src/api/java/appeng/api/networking/spatial/ISpatialCache.java @@ -7,7 +7,7 @@ public interface ISpatialCache extends IGridCache { /** - * @return true if a region is defined at all, it dosn't have to be valid, but all points must be in the same world. + * @return true if a region is defined at all, it doesn't have to be valid, but all points must be in the same world. */ boolean hasRegion(); @@ -32,8 +32,8 @@ public interface ISpatialCache extends IGridCache long requiredPower(); /** - * @return current 100% - 0% effiency. + * @return current 100% - 0% efficiency. */ - float currentEffiency(); + float currentEfficiency(); } diff --git a/src/api/java/appeng/api/networking/storage/IStackWatcherHost.java b/src/api/java/appeng/api/networking/storage/IStackWatcherHost.java index f94ef3c9..62b2541f 100644 --- a/src/api/java/appeng/api/networking/storage/IStackWatcherHost.java +++ b/src/api/java/appeng/api/networking/storage/IStackWatcherHost.java @@ -12,18 +12,18 @@ public interface IStackWatcherHost * provides the IStackWatcher for this host, for the current network, is called when the hot changes networks. You * do not need to clear your old watcher, its already been removed by the time this gets called. * - * @param newWatcher + * @param newWatcher stack watcher */ void updateWatcher(IStackWatcher newWatcher); /** * Called when a watched item changes amounts. * - * @param o - * @param fullStack - * @param diffStack - * @param src - * @param chan + * @param o changed item list + * @param fullStack old stack + * @param diffStack new stack + * @param src action source + * @param chan storage channel */ void onStackChange(IItemList o, IAEStack fullStack, IAEStack diffStack, BaseActionSource src, StorageChannel chan); diff --git a/src/api/java/appeng/api/networking/storage/IStorageGrid.java b/src/api/java/appeng/api/networking/storage/IStorageGrid.java index 76405d5c..5a7291a2 100644 --- a/src/api/java/appeng/api/networking/storage/IStorageGrid.java +++ b/src/api/java/appeng/api/networking/storage/IStorageGrid.java @@ -1,45 +1,45 @@ -package appeng.api.networking.storage; - -import appeng.api.networking.IGridCache; -import appeng.api.networking.IGridHost; -import appeng.api.networking.security.BaseActionSource; -import appeng.api.storage.ICellContainer; -import appeng.api.storage.ICellProvider; -import appeng.api.storage.IStorageMonitorable; -import appeng.api.storage.StorageChannel; -import appeng.api.storage.data.IAEStack; - -/** - * Common base class for item / fluid storage caches. - */ -public interface IStorageGrid extends IGridCache, IStorageMonitorable -{ - - /** - * Used to inform the network of alterations to the storage system that fall outside of the standard Network - * operations, Examples, ME Chest inputs from the world, or a Storage Bus detecting modifications made to the chest - * by an outside force. - * - * Expects the input to have either a negative or a positive stack size to correspond to the injection, or - * extraction operation. - * - * @param input - */ - void postAlterationOfStoredItems(StorageChannel chan, Iterable input, BaseActionSource src); - - /** - * Used to add a cell provider to the storage system - * - * THIS IT NOT FOR USE {@link IGridHost} THAT PROVIDE {@link ICellContainer} - those are automatically handled by - * the storage system. - * - * @param cc - */ - void registerCellProvider(ICellProvider cc); - - /** - * remove a provider added with addCellContainer - */ - void unregisterCellProvider(ICellProvider cc); - -} +package appeng.api.networking.storage; + +import appeng.api.networking.IGridCache; +import appeng.api.networking.IGridHost; +import appeng.api.networking.security.BaseActionSource; +import appeng.api.storage.ICellContainer; +import appeng.api.storage.ICellProvider; +import appeng.api.storage.IStorageMonitorable; +import appeng.api.storage.StorageChannel; +import appeng.api.storage.data.IAEStack; + +/** + * Common base class for item / fluid storage caches. + */ +public interface IStorageGrid extends IGridCache, IStorageMonitorable +{ + + /** + * Used to inform the network of alterations to the storage system that fall outside of the standard Network + * operations, Examples, ME Chest inputs from the world, or a Storage Bus detecting modifications made to the chest + * by an outside force. + * + * Expects the input to have either a negative or a positive stack size to correspond to the injection, or + * extraction operation. + * + * @param input injected items + */ + void postAlterationOfStoredItems(StorageChannel chan, Iterable input, BaseActionSource src); + + /** + * Used to add a cell provider to the storage system + * + * THIS IT NOT FOR USE {@link IGridHost} THAT PROVIDE {@link ICellContainer} - those are automatically handled by + * the storage system. + * + * @param cc to be added cell provider + */ + void registerCellProvider(ICellProvider cc); + + /** + * remove a provider added with addCellContainer + */ + void unregisterCellProvider(ICellProvider cc); + +} diff --git a/src/api/java/appeng/api/networking/ticking/IGridTickable.java b/src/api/java/appeng/api/networking/ticking/IGridTickable.java index 66d3c898..ea5c36ef 100644 --- a/src/api/java/appeng/api/networking/ticking/IGridTickable.java +++ b/src/api/java/appeng/api/networking/ticking/IGridTickable.java @@ -1,56 +1,56 @@ -package appeng.api.networking.ticking; - -import appeng.api.networking.IGridNode; - -/** - * Implement on IGridHosts which want to use AE's Network Ticking Feature. - */ -public interface IGridTickable -{ - - /** - * Important note regarding IGridTickables with more then one one node, - * - * If your IGridHost hosts multiple nodes, it may be on multiple grids, or - * its node may be present on the same grid multiple times, this is as - * designed, however if you choose to use the grid to tick these Hosts you - * must be aware that they they should probably pick a single node to tick - * for, and not tick for each node. - * - */ - - /** - * You can return null, if you wish to tick using MC's ticking mechanism, or - * you can return a valid TickingRequest to tell AE a guide for which type - * of responsiveness your device wants. - * - * this will be called for your tile any time your tile changes grids, this - * can happen at any time, so if your using the sleep feature you may wish - * to preserve your sleep, in the result of this method. or you can simply - * reset it. - * - * @return null or a valid new TickingRequest - * - */ - TickingRequest getTickingRequest(IGridNode node); - - /** - * AE lets you adjust your tick rate based on the results of your tick, if - * your block as accomplished work you may wish to increase the ticking - * speed, if your block is idle you may wish to slow it down. - * - * Its up to you. - * - * Note: this is never called if you return null from getTickingRequest. - * - * @param TicksSinceLastCall - * the number of world ticks that were skipped since your last - * tick, you can use this to adjust speed of processing or adjust - * your tick rate. - * - * @return tick rate adjustment. - * - */ - TickRateModulation tickingRequest(IGridNode node, int TicksSinceLastCall); - -} +package appeng.api.networking.ticking; + +import appeng.api.networking.IGridNode; + +/** + * Implement on IGridHosts which want to use AE's Network Ticking Feature. + */ +public interface IGridTickable +{ + + /** + * Important note regarding IGridTickables with more then one one node, + * + * If your IGridHost hosts multiple nodes, it may be on multiple grids, or + * its node may be present on the same grid multiple times, this is as + * designed, however if you choose to use the grid to tick these Hosts you + * must be aware that they they should probably pick a single node to tick + * for, and not tick for each node. + * + */ + + /** + * You can return null, if you wish to tick using MC's ticking mechanism, or + * you can return a valid TickingRequest to tell AE a guide for which type + * of responsiveness your device wants. + * + * this will be called for your tile any time your tile changes grids, this + * can happen at any time, so if your using the sleep feature you may wish + * to preserve your sleep, in the result of this method. or you can simply + * reset it. + * + * @return null or a valid new TickingRequest + * + */ + TickingRequest getTickingRequest(IGridNode node); + + /** + * AE lets you adjust your tick rate based on the results of your tick, if + * your block as accomplished work you may wish to increase the ticking + * speed, if your block is idle you may wish to slow it down. + * + * Its up to you. + * + * Note: this is never called if you return null from getTickingRequest. + * + * @param TicksSinceLastCall + * the number of world ticks that were skipped since your last + * tick, you can use this to adjust speed of processing or adjust + * your tick rate. + * + * @return tick rate adjustment. + * + */ + TickRateModulation tickingRequest(IGridNode node, int TicksSinceLastCall); + +} diff --git a/src/api/java/appeng/api/networking/ticking/ITickManager.java b/src/api/java/appeng/api/networking/ticking/ITickManager.java index aa7c0325..3f423437 100644 --- a/src/api/java/appeng/api/networking/ticking/ITickManager.java +++ b/src/api/java/appeng/api/networking/ticking/ITickManager.java @@ -1,44 +1,44 @@ -package appeng.api.networking.ticking; - -import appeng.api.networking.IGridCache; -import appeng.api.networking.IGridNode; - -/** - * - * The network tick manager. - * - */ -public interface ITickManager extends IGridCache -{ - - /** - * immediately sets the node to tick, only valid if your node is marked as "Alertable" in its TickingRequest - * - * Sleeping Devices Still Alertable, when your tile is alerted its new status is determined by the result of its - * tick. - * - * @param node - */ - boolean alertDevice(IGridNode node); - - /** - * - * disables ticking for your device. - * - * @param node - * - * @return if the call was successful. - */ - boolean sleepDevice(IGridNode node); - - /** - * - * enables ticking for your device, undoes a sleepDevice call. - * - * @param node - * - * @return if the call was successful. - */ - boolean wakeDevice(IGridNode node); - -} +package appeng.api.networking.ticking; + +import appeng.api.networking.IGridCache; +import appeng.api.networking.IGridNode; + +/** + * + * The network tick manager. + * + */ +public interface ITickManager extends IGridCache +{ + + /** + * immediately sets the node to tick, only valid if your node is marked as "Alertable" in its TickingRequest + * + * Sleeping Devices Still Alertable, when your tile is alerted its new status is determined by the result of its + * tick. + * + * @param node gridnode + */ + boolean alertDevice(IGridNode node); + + /** + * + * disables ticking for your device. + * + * @param node gridnode + * + * @return if the call was successful. + */ + boolean sleepDevice(IGridNode node); + + /** + * + * enables ticking for your device, undoes a sleepDevice call. + * + * @param node gridnode + * + * @return if the call was successful. + */ + boolean wakeDevice(IGridNode node); + +} diff --git a/src/api/java/appeng/api/networking/ticking/TickRateModulation.java b/src/api/java/appeng/api/networking/ticking/TickRateModulation.java index 1298b5ab..e5a4e75b 100644 --- a/src/api/java/appeng/api/networking/ticking/TickRateModulation.java +++ b/src/api/java/appeng/api/networking/ticking/TickRateModulation.java @@ -1,34 +1,34 @@ -package appeng.api.networking.ticking; - -public enum TickRateModulation -{ - /** - * same as idle, but also puts the node to sleep. - */ - SLEEP, - - /** - * set tick rate to maximum. - */ - IDLE, - - /** - * decrease the tick rate marginally. - */ - SLOWER, - - /** - * continue at current rate. - */ - SAME, - - /** - * increase the tick rate marginally. - */ - FASTER, - - /** - * changes the tick rate to the minimum tick rate. - */ - URGENT -} +package appeng.api.networking.ticking; + +public enum TickRateModulation +{ + /** + * same as idle, but also puts the node to sleep. + */ + SLEEP, + + /** + * set tick rate to maximum. + */ + IDLE, + + /** + * decrease the tick rate marginally. + */ + SLOWER, + + /** + * continue at current rate. + */ + SAME, + + /** + * increase the tick rate marginally. + */ + FASTER, + + /** + * changes the tick rate to the minimum tick rate. + */ + URGENT +} diff --git a/src/api/java/appeng/api/networking/ticking/TickingRequest.java b/src/api/java/appeng/api/networking/ticking/TickingRequest.java index 02ac54e6..570d9f7d 100644 --- a/src/api/java/appeng/api/networking/ticking/TickingRequest.java +++ b/src/api/java/appeng/api/networking/ticking/TickingRequest.java @@ -1,54 +1,54 @@ -package appeng.api.networking.ticking; - -/** - * - * Describes how your tiles ticking is executed. - * - */ -public class TickingRequest -{ - - /** - * the minimum number of ticks that must pass between ticks. - * - * Valid Values are : 1+ - * - * Suggested is 5-20 - * - */ - public final int minTickRate; - - /** - * the maximum number of ticks that can pass between ticks, if this value is - * exceeded the tile must tick. - * - * Valid Values are 1+ - * - * Suggested is 20-40 - * - */ - public final int maxTickRate; - - /** - * - * Determines the current expected state of your node, if your node expects - * to be sleeping, then return true. - * - */ - public final boolean isSleeping; - - /** - * - * True only if you call {@link ITickManager}.alertDevice( IGridNode ); - * - */ - public final boolean canBeAlerted; - - public TickingRequest(int min, int max, boolean sleep, boolean alertable) { - minTickRate = min; - maxTickRate = max; - isSleeping = sleep; - canBeAlerted = alertable; - } - -} +package appeng.api.networking.ticking; + +/** + * + * Describes how your tiles ticking is executed. + * + */ +public class TickingRequest +{ + + /** + * the minimum number of ticks that must pass between ticks. + * + * Valid Values are : 1+ + * + * Suggested is 5-20 + * + */ + public final int minTickRate; + + /** + * the maximum number of ticks that can pass between ticks, if this value is + * exceeded the tile must tick. + * + * Valid Values are 1+ + * + * Suggested is 20-40 + * + */ + public final int maxTickRate; + + /** + * + * Determines the current expected state of your node, if your node expects + * to be sleeping, then return true. + * + */ + public final boolean isSleeping; + + /** + * + * True only if you call {@link ITickManager}.alertDevice( IGridNode ); + * + */ + public final boolean canBeAlerted; + + public TickingRequest(int min, int max, boolean sleep, boolean alertable) { + minTickRate = min; + maxTickRate = max; + isSleeping = sleep; + canBeAlerted = alertable; + } + +} diff --git a/src/api/java/appeng/api/package-info.java b/src/api/java/appeng/api/package-info.java index 4d7c0f18..c7171c43 100644 --- a/src/api/java/appeng/api/package-info.java +++ b/src/api/java/appeng/api/package-info.java @@ -1,5 +1,5 @@ -@API(apiVersion = "rv1", owner = "appliedenergistics2", provides = "appliedenergistics2|API") -package appeng.api; - -import cpw.mods.fml.common.API; - +@API(apiVersion = "rv2", owner = "appliedenergistics2", provides = "appliedenergistics2|API") +package appeng.api; + +import cpw.mods.fml.common.API; + diff --git a/src/api/java/appeng/api/parts/BusSupport.java b/src/api/java/appeng/api/parts/BusSupport.java index 1702bbce..b8b6e90e 100644 --- a/src/api/java/appeng/api/parts/BusSupport.java +++ b/src/api/java/appeng/api/parts/BusSupport.java @@ -1,10 +1,10 @@ -package appeng.api.parts; - -public enum BusSupport -{ - CABLE, - - DENSE_CABLE, - - NO_PARTS -} +package appeng.api.parts; + +public enum BusSupport +{ + CABLE, + + DENSE_CABLE, + + NO_PARTS +} diff --git a/src/api/java/appeng/api/parts/IAlphaPassItem.java b/src/api/java/appeng/api/parts/IAlphaPassItem.java index 106b86aa..b2dba861 100644 --- a/src/api/java/appeng/api/parts/IAlphaPassItem.java +++ b/src/api/java/appeng/api/parts/IAlphaPassItem.java @@ -8,8 +8,8 @@ public interface IAlphaPassItem /** * Extend, and return true to enable a second pass for your parts in the bus rendering pipe line. * - * @param is - * @return + * @param is item + * @return true to enable a second pass for your parts in the bus rendering pipe line. */ boolean useAlphaPass(ItemStack is); diff --git a/src/api/java/appeng/api/parts/IBoxProvider.java b/src/api/java/appeng/api/parts/IBoxProvider.java index 639d293c..653089a9 100644 --- a/src/api/java/appeng/api/parts/IBoxProvider.java +++ b/src/api/java/appeng/api/parts/IBoxProvider.java @@ -6,8 +6,8 @@ public interface IBoxProvider /** * add your collision information to the the list. * - * @param boxes + * @param boxes collision boxes */ - void getBoxes(IPartCollsionHelper bch); + void getBoxes(IPartCollisionHelper boxes); } diff --git a/src/api/java/appeng/api/parts/IFacadeContainer.java b/src/api/java/appeng/api/parts/IFacadeContainer.java index 5bcba344..1400725d 100644 --- a/src/api/java/appeng/api/parts/IFacadeContainer.java +++ b/src/api/java/appeng/api/parts/IFacadeContainer.java @@ -1,30 +1,75 @@ -package appeng.api.parts; - -import net.minecraftforge.common.util.ForgeDirection; - -/** - * Used Internally. - * - * not intended for implementation. - */ -public interface IFacadeContainer -{ - - /** - * Attempts to add the {@link IFacadePart} to the given side. - * - * @return true if the facade as successfully added. - */ - boolean addFacade(IFacadePart a); - - /** - * Removed the facade on the given side, or does nothing. - */ - void removeFacade(IPartHost host, ForgeDirection side); - - /** - * @return the {@link IFacadePart} for a given side, or null. - */ - IFacadePart getFacade(ForgeDirection s); - -} +package appeng.api.parts; + +import io.netty.buffer.ByteBuf; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; + +import java.io.IOException; + +/** + * Used Internally. + * + * not intended for implementation. + */ +public interface IFacadeContainer +{ + + /** + * Attempts to add the {@link IFacadePart} to the given side. + * + * @return true if the facade as successfully added. + */ + boolean addFacade(IFacadePart a); + + /** + * Removed the facade on the given side, or does nothing. + */ + void removeFacade(IPartHost host, ForgeDirection side); + + /** + * @return the {@link IFacadePart} for a given side, or null. + */ + IFacadePart getFacade(ForgeDirection s); + + /** + * rotate the facades left. + */ + void rotateLeft(); + + /** + * write nbt data + * + * @param data to be written data + */ + void writeToNBT(NBTTagCompound data); + + /** + * read from stream + * + * @param data to be read data + * @return true if it was readable + * @throws IOException + */ + boolean readFromStream(ByteBuf data) throws IOException; + + /** + * read from NBT + * + * @param data to be read data + */ + void readFromNBT(NBTTagCompound data); + + /** + * write to stream + * + * @param data to be written data + * @throws IOException + */ + void writeToStream(ByteBuf data) throws IOException; + + /** + * @return true if there are no facades. + */ + boolean isEmpty(); + +} diff --git a/src/api/java/appeng/api/parts/IFacadePart.java b/src/api/java/appeng/api/parts/IFacadePart.java index 49565353..c0e08f3f 100644 --- a/src/api/java/appeng/api/parts/IFacadePart.java +++ b/src/api/java/appeng/api/parts/IFacadePart.java @@ -1,76 +1,77 @@ -package appeng.api.parts; - -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.entity.Entity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.AxisAlignedBB; -import net.minecraftforge.common.util.ForgeDirection; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -/** - * Used Internally. - * - * not intended for implementation. - */ -public interface IFacadePart -{ - - /** - * used to save the part. - */ - ItemStack getItemStack(); - - /** - * used to collide, and pick the part - * - * @param ch - * @param e - */ - void getBoxes(IPartCollsionHelper ch, Entity e); - - /** - * render the part. - * - * @param xCoord - * @param yCoord - * @param zCoord - * @param instance - * @param renderer - * @param busBounds - * @param b - */ - @SideOnly(Side.CLIENT) - void renderStatic(int x, int y, int z, IPartRenderHelper instance, RenderBlocks renderer, IFacadeContainer fc, AxisAlignedBB busBounds, boolean renderStilt); - - /** - * render the part in inventory. - * - * @param instance - * @param renderer - */ - @SideOnly(Side.CLIENT) - void renderInventory(IPartRenderHelper instance, RenderBlocks renderer); - - /** - * @return side the facade is in - */ - ForgeDirection getSide(); - - /** - * @return the box for the face of the facade - */ - AxisAlignedBB getPrimaryBox(); - - Item getItem(); - - int getItemDamage(); - - boolean isBC(); - - void setThinFacades(boolean useThinFacades); - - boolean isTransparent(); - +package appeng.api.parts; + +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.entity.Entity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.AxisAlignedBB; +import net.minecraftforge.common.util.ForgeDirection; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +/** + * Used Internally. + * + * not intended for implementation. + */ +public interface IFacadePart +{ + + /** + * used to save the part. + */ + ItemStack getItemStack(); + + /** + * used to collide, and pick the part + * + * @param ch collision helper + * @param e colliding entity + */ + void getBoxes(IPartCollisionHelper ch, Entity e); + + /** + * render the part. + * + * @param x x pos of part + * @param y y pos of part + * @param z z pos of part + * @param instance render helper + * @param renderer renderer + * @param fc face container + * @param busBounds bounding box + * @param renderStilt if to render stilt + */ + @SideOnly(Side.CLIENT) + void renderStatic(int x, int y, int z, IPartRenderHelper instance, RenderBlocks renderer, IFacadeContainer fc, AxisAlignedBB busBounds, boolean renderStilt); + + /** + * render the part in inventory. + * + * @param instance render helper + * @param renderer renderer + */ + @SideOnly(Side.CLIENT) + void renderInventory(IPartRenderHelper instance, RenderBlocks renderer); + + /** + * @return side the facade is in + */ + ForgeDirection getSide(); + + /** + * @return the box for the face of the facade + */ + AxisAlignedBB getPrimaryBox(); + + Item getItem(); + + int getItemDamage(); + + boolean isBC(); + + void setThinFacades(boolean useThinFacades); + + boolean isTransparent(); + } \ No newline at end of file diff --git a/src/api/java/appeng/api/parts/IPart.java b/src/api/java/appeng/api/parts/IPart.java index 09227f7b..fdc4e0da 100644 --- a/src/api/java/appeng/api/parts/IPart.java +++ b/src/api/java/appeng/api/parts/IPart.java @@ -1,11 +1,9 @@ package appeng.api.parts; +import appeng.api.networking.IGridNode; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import io.netty.buffer.ByteBuf; - -import java.io.IOException; -import java.util.List; -import java.util.Random; - import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -17,9 +15,10 @@ import net.minecraft.util.IIcon; import net.minecraft.util.Vec3; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import appeng.api.networking.IGridNode; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.io.IOException; +import java.util.List; +import java.util.Random; public interface IPart extends IBoxProvider { @@ -27,66 +26,66 @@ public interface IPart extends IBoxProvider /** * get an ItemStack that represents the bus, should contain the settings for whatever, can also be used in * conjunction with removePart to take a part off and drop it or something. - * + * * This is used to drop the bus, and to save the bus, when saving the bus, wrenched is false, and writeToNBT will be - * called to save improtant details about the part, if the part is wrenched include in your NBT Data any settings + * called to save important details about the part, if the part is wrenched include in your NBT Data any settings * you might want to keep around, you can restore those settings when constructing your part. - * - * @param type - * , what kind of ItemStack to return? - * @return + * + * @param type , what kind of ItemStack to return? + * + * @return item of part */ ItemStack getItemStack(PartItemStack type); /** * render item form for inventory, or entity. - * + * * GL Available - * - * @param te - * @param rh + * + * @param rh helper + * @param renderer renderer */ @SideOnly(Side.CLIENT) void renderInventory(IPartRenderHelper rh, RenderBlocks renderer); /** * render world renderer ( preferred ) - * + * * GL is NOT Available - * - * @param x - * @param y - * @param z - * @param te - * @param rh + * + * @param x x coord + * @param y y coord + * @param z z coord + * @param rh helper + * @param renderer renderer */ @SideOnly(Side.CLIENT) void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer); /** * render TESR. - * + * * GL Available - * - * @param x - * @param y - * @param z - * @param te - * @param rh + * + * @param x x coord + * @param y y coord + * @param z z coord + * @param rh helper + * @param renderer renderer */ @SideOnly(Side.CLIENT) void renderDynamic(double x, double y, double z, IPartRenderHelper rh, RenderBlocks renderer); /** * @return the Block sheet icon used when rendering the breaking particles, return null to use the ItemStack - * texture. + * texture. */ @SideOnly(Side.CLIENT) IIcon getBreakingTexture(); /** * return true only if your part require dynamic rendering, must be consistent. - * + * * @return true to enable renderDynamic */ boolean requireDynamicRender(); @@ -104,15 +103,15 @@ public interface IPart extends IBoxProvider /** * Write the part information for saving, the part will be saved with getItemStack(false) and this method will be * called after to load settings, inventory or other values from the world. - * - * @param data + * + * @param data to be written nbt data */ void writeToNBT(NBTTagCompound data); /** * Read the previously written NBT Data. this is the mirror for writeToNBT - * - * @param data + * + * @param data to be read nbt data */ void readFromNBT(NBTTagCompound data); @@ -123,9 +122,10 @@ public interface IPart extends IBoxProvider /** * does this part act like a ladder? - * - * @param entity - * @return + * + * @param entity climbing entity + * + * @return true if entity can climb */ boolean isLadder(EntityLivingBase entity); @@ -146,35 +146,38 @@ public interface IPart extends IBoxProvider /** * write data to bus packet. - * - * @param data + * + * @param data to be written data + * * @throws IOException */ void writeToStream(ByteBuf data) throws IOException; /** * read data from bus packet. - * - * @param data + * + * @param data to be read data + * * @return true will re-draw the part. + * * @throws IOException */ boolean readFromStream(ByteBuf data) throws IOException; /** - * get the Grid Node for the Bus, be sure your IGridBlock is NOT isWorldAccessable, if it is your going to cause + * get the Grid Node for the Bus, be sure your IGridBlock is NOT isWorldAccessible, if it is your going to cause * crashes. - * + * * or null if you don't have a grid node. - * - * @return + * + * @return grid node */ IGridNode getGridNode(); /** * called when an entity collides with the bus. - * - * @param entity + * + * @param entity colliding entity */ void onEntityCollision(Entity entity); @@ -190,34 +193,36 @@ public interface IPart extends IBoxProvider /** * used for tunnels. - * - * @return a grid node that represents the external facing side, these must be isWorldAccessable with the correct - * faces marked as external + * + * @return a grid node that represents the external facing side, these must be isWorldAccessible with the correct + * faces marked as external */ IGridNode getExternalFacingNode(); /** * called by the Part host to keep your part informed. - * - * @param host - * @param tile + * + * @param host part side + * @param tile tile entity of part */ void setPartHostInfo(ForgeDirection side, IPartHost host, TileEntity tile); /** * Called when you right click the part, very similar to Block.onActivateBlock - * - * @param player - * @param pos + * + * @param player right clicking player + * @param pos position of block + * * @return if your activate method performed something. */ boolean onActivate(EntityPlayer player, Vec3 pos); /** * Called when you right click the part, very similar to Block.onActivateBlock - * - * @param player - * @param pos + * + * @param player shift right clicking player + * @param pos position of block + * * @return if your activate method performed something, you should use false unless you really need it. */ boolean onShiftActivate(EntityPlayer player, Vec3 pos); @@ -225,9 +230,9 @@ public interface IPart extends IBoxProvider /** * Add drops to the items being dropped into the world, if your item stores its contents when wrenched use the * wrenched boolean to control what data is saved vs dropped when it is broken. - * - * @param drops - * @param wrenched + * + * @param drops item drops if wrenched + * @param wrenched control flag for wrenched vs broken */ void getDrops(List drops, boolean wrenched); @@ -238,28 +243,29 @@ public interface IPart extends IBoxProvider /** * same as Block.randomDisplayTick, for but parts. - * - * @param world - * @param x - * @param y - * @param z - * @param r + * + * @param world world of block + * @param x x coord of block + * @param y y coord of block + * @param z z coord of block + * @param r random */ void randomDisplayTick(World world, int x, int y, int z, Random r); /** * Called when placed in the world by a player, this happens before addWorld. - * - * @param player - * @param held - * @param side + * + * @param player placing player + * @param held held item + * @param side placing side */ void onPlacement(EntityPlayer player, ItemStack held, ForgeDirection side); /** * Used to determine which parts can be placed on what cables. - * - * @param what + * + * @param what placed part + * * @return true if the part can be placed on this support. */ boolean canBePlacedOn(BusSupport what); diff --git a/src/api/java/appeng/api/parts/IPartCollsionHelper.java b/src/api/java/appeng/api/parts/IPartCollisionHelper.java similarity index 71% rename from src/api/java/appeng/api/parts/IPartCollsionHelper.java rename to src/api/java/appeng/api/parts/IPartCollisionHelper.java index 7aa4346b..c7fcb9a6 100644 --- a/src/api/java/appeng/api/parts/IPartCollsionHelper.java +++ b/src/api/java/appeng/api/parts/IPartCollisionHelper.java @@ -2,7 +2,7 @@ package appeng.api.parts; import net.minecraftforge.common.util.ForgeDirection; -public interface IPartCollsionHelper +public interface IPartCollisionHelper { /** @@ -10,12 +10,12 @@ public interface IPartCollsionHelper * * No complaints about the size, I like using pixels :P * - * @param minX - * @param minY - * @param minZ - * @param maxX - * @param maxY - * @param maxZ + * @param minX minimal x collision + * @param minY minimal y collision + * @param minZ minimal z collision + * @param maxX maximal x collision + * @param maxY maximal y collision + * @param maxZ maximal z collision */ void addBox(double minX, double minY, double minZ, double maxX, double maxY, double maxZ); diff --git a/src/api/java/appeng/api/parts/IPartHelper.java b/src/api/java/appeng/api/parts/IPartHelper.java index d13acf39..7cf451ed 100644 --- a/src/api/java/appeng/api/parts/IPartHelper.java +++ b/src/api/java/appeng/api/parts/IPartHelper.java @@ -43,15 +43,14 @@ public interface IPartHelper /** * use in use item, to try and place a IBusItem * - * @param is - * ItemStack of an item which implements {@link IPartItem} - * @param x - * @param y - * @param z - * @param side - * @param player - * @param world - * @return + * @param is ItemStack of an item which implements {@link IPartItem} + * @param x x pos of part + * @param y y pos of part + * @param z z pos of part + * @param side side which the part should be on + * @param player player placing part + * @param world part in world + * @return true if placing was successful */ boolean placeBus(ItemStack is, int x, int y, int z, int side, EntityPlayer player, World world); diff --git a/src/api/java/appeng/api/parts/IPartHost.java b/src/api/java/appeng/api/parts/IPartHost.java index 697dcbb7..8b757b6d 100644 --- a/src/api/java/appeng/api/parts/IPartHost.java +++ b/src/api/java/appeng/api/parts/IPartHost.java @@ -1,152 +1,152 @@ -package appeng.api.parts; - -import java.util.Set; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Vec3; -import net.minecraftforge.common.util.ForgeDirection; -import appeng.api.util.AEColor; -import appeng.api.util.DimensionalCoord; - -/** - * Implemented on AE's TileEntity or AE's FMP Part. - * - * Do Not Implement - */ -public interface IPartHost -{ - - /** - * @return the facade container - */ - IFacadeContainer getFacadeContainer(); - - /** - * Test if you can add a part to the specified side of the Part Host, {@link ForgeDirection}.UNKNOWN is used to - * represent the cable in the middle. - * - * @param is - * @param side - * @return returns false if the part cannot be added. - */ - boolean canAddPart(ItemStack part, ForgeDirection side); - - /** - * try to add a new part to the specified side, returns false if it failed to be added. - * - * @param is - * @param side - * @param owner - * @return null if the item failed to add, the side it was placed on other wise ( may different for cables, - * {@link ForgeDirection}.UNKNOWN ) - */ - ForgeDirection addPart(ItemStack is, ForgeDirection side, EntityPlayer owner); - - /** - * Get part by side ( center is {@link ForgeDirection}.UNKNOWN ) - * - * @param side - * @return the part located on the specified side, or null if there is no part. - */ - IPart getPart(ForgeDirection side); - - /** - * removes the part on the side, this doesn't drop it or anything, if you don't do something with it, its just - * "gone" and its never coming back; think about it. - * - * if you want to drop the part you must request it prior to removing it. - * - * @param side - * @param suppressUpdate - * - used if you need to replace a part's instance, without really removing it first. - */ - void removePart(ForgeDirection side, boolean suppressUpdate); - - /** - * something changed, might want to send a packet to clients to update state. - */ - void markForUpdate(); - - /** - * @return the physical location of the part host in the universe. - */ - DimensionalCoord getLocation(); - - /** - * @return the tile entity for the host, this can either be an FMP tile, or a AE tile - */ - TileEntity getTile(); - - /** - * @return the color of the host type ( this is determined by the middle cable. ) if no cable is present, it returns - * {@link AEColor} .Transparent other wise it returns the color of the cable in the center. - */ - AEColor getColor(); - - /** - * destroys the part container, for internal use. - */ - void clearContainer(); - - /** - * Used to test for FMP microblock blocking internally. - * - * @return returns if microblocks are blocking this cable path. - */ - boolean isBlocked(ForgeDirection side); - - /** - * finds the part located at the position ( pos must be relative, not global ) - * - * @param pos - * @return a new SelectedPart, this is never null. - */ - SelectedPart selectPart(Vec3 pos); - - /** - * can be used by parts to trigger the tile or part to save. - */ - void markForSave(); - - /** - * part of the {@link LayerBase} - */ - void partChanged(); - - /** - * get the redstone state of host on this side, this value is cached internally. - * - * @param side - * @return true of the part host is receieveing redstone from an external source. - */ - boolean hasRedstone(ForgeDirection side); - - /** - * returns false if this block contains any parts or facades, true other wise. - */ - boolean isEmpty(); - - /** - * @return a mutable list of flags you can adjust to track state. - */ - Set getLayerFlags(); - - /** - * remove host from world... - */ - void cleanup(); - - /** - * notify neightbors uf updated status. - */ - void notifyNeighbors(); - - /** - * true if the tile is in the world, other wise false. - * - * @return - */ - boolean isInWorld(); +package appeng.api.parts; + +import appeng.api.util.AEColor; +import appeng.api.util.DimensionalCoord; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.Vec3; +import net.minecraftforge.common.util.ForgeDirection; + +import java.util.Set; + +/** + * Implemented on AE's TileEntity or AE's FMP Part. + * + * Do Not Implement + */ +public interface IPartHost +{ + + /** + * @return the facade container + */ + IFacadeContainer getFacadeContainer(); + + /** + * Test if you can add a part to the specified side of the Part Host, {@link ForgeDirection}.UNKNOWN is used to + * represent the cable in the middle. + * + * @param part to be added part + * @param side part placed onto side + * @return returns false if the part cannot be added. + */ + boolean canAddPart(ItemStack part, ForgeDirection side); + + /** + * try to add a new part to the specified side, returns false if it failed to be added. + * + * @param is new part + * @param side onto side + * @param owner with owning player + * @return null if the item failed to add, the side it was placed on other wise ( may different for cables, + * {@link ForgeDirection}.UNKNOWN ) + */ + ForgeDirection addPart(ItemStack is, ForgeDirection side, EntityPlayer owner); + + /** + * Get part by side ( center is {@link ForgeDirection}.UNKNOWN ) + * + * @param side side of part + * @return the part located on the specified side, or null if there is no part. + */ + IPart getPart(ForgeDirection side); + + /** + * removes the part on the side, this doesn't drop it or anything, if you don't do something with it, its just + * "gone" and its never coming back; think about it. + * + * if you want to drop the part you must request it prior to removing it. + * + * @param side side of part + * @param suppressUpdate + * - used if you need to replace a part's instance, without really removing it first. + */ + void removePart(ForgeDirection side, boolean suppressUpdate); + + /** + * something changed, might want to send a packet to clients to update state. + */ + void markForUpdate(); + + /** + * @return the physical location of the part host in the universe. + */ + DimensionalCoord getLocation(); + + /** + * @return the tile entity for the host, this can either be an FMP tile, or a AE tile + */ + TileEntity getTile(); + + /** + * @return the color of the host type ( this is determined by the middle cable. ) if no cable is present, it returns + * {@link AEColor} .Transparent other wise it returns the color of the cable in the center. + */ + AEColor getColor(); + + /** + * destroys the part container, for internal use. + */ + void clearContainer(); + + /** + * Used to test for FMP microblock blocking internally. + * + * @return returns if microblocks are blocking this cable path. + */ + boolean isBlocked(ForgeDirection side); + + /** + * finds the part located at the position ( pos must be relative, not global ) + * + * @param pos part position + * @return a new SelectedPart, this is never null. + */ + SelectedPart selectPart(Vec3 pos); + + /** + * can be used by parts to trigger the tile or part to save. + */ + void markForSave(); + + /** + * part of the {@link LayerBase} + */ + void partChanged(); + + /** + * get the redstone state of host on this side, this value is cached internally. + * + * @param side side of part + * @return true of the part host is receiving redstone from an external source. + */ + boolean hasRedstone(ForgeDirection side); + + /** + * returns false if this block contains any parts or facades, true other wise. + */ + boolean isEmpty(); + + /** + * @return a mutable list of flags you can adjust to track state. + */ + Set getLayerFlags(); + + /** + * remove host from world... + */ + void cleanup(); + + /** + * notify neighbors uf updated status. + */ + void notifyNeighbors(); + + /** + * true if the tile is in the world, other wise false. + * + * @return true if tile is in world + */ + boolean isInWorld(); } \ No newline at end of file diff --git a/src/api/java/appeng/api/parts/IPartItem.java b/src/api/java/appeng/api/parts/IPartItem.java index 584e8c8e..ca7a4b4f 100644 --- a/src/api/java/appeng/api/parts/IPartItem.java +++ b/src/api/java/appeng/api/parts/IPartItem.java @@ -9,19 +9,24 @@ import net.minecraft.item.ItemStack; * you must register your bus with the Bus renderer, using AEApi.instance().partHelper().setItemBusRenderer( this ); * * then simply add these two methods, which tell MC to use the Block Textures, and call AE's Bus Placement Code. - * - * @Override - * @SideOnly(Side.CLIENT) - * public int getSpriteNumber() - * { - * return 0; - * } - * - * @Override - * public boolean onItemUse(ItemStack is, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) - * { - * return AEApi.instance().partHelper().placeBus( is, x, y, z, side, player, world ); - * } + * + *
+ * 
+ * {@literal @}Override
+ * {@literal @}SideOnly(Side.CLIENT)
+ * public int getSpriteNumber()
+ * {
+ *     return 0;
+ * }
+ *
+ * {@literal @}Override
+ * public boolean onItemUse(ItemStack is, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
+ * {
+ *     return AEApi.instance().partHelper().placeBus( is, x, y, z, side, player, world );
+ * }
+ * 
+ * 
+ * */ public interface IPartItem { @@ -29,8 +34,8 @@ public interface IPartItem /** * create a new part instance, from the item stack. * - * @param is - * @return + * @param is item + * @return part from item */ IPart createPartFromItemStack(ItemStack is); diff --git a/src/api/java/appeng/api/parts/IPartRenderHelper.java b/src/api/java/appeng/api/parts/IPartRenderHelper.java index 8946b6fe..b00a7ca6 100644 --- a/src/api/java/appeng/api/parts/IPartRenderHelper.java +++ b/src/api/java/appeng/api/parts/IPartRenderHelper.java @@ -1,13 +1,13 @@ package appeng.api.parts; -import java.util.EnumSet; - +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.util.IIcon; import net.minecraftforge.common.util.ForgeDirection; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.EnumSet; public interface IPartRenderHelper { @@ -17,12 +17,12 @@ public interface IPartRenderHelper * * No complaints about the size, I like using pixels :P * - * @param minX - * @param minY - * @param minZ - * @param maxX - * @param maxY - * @param maxZ + * @param minX minimal x bound + * @param minY minimal y bound + * @param minZ minimal z bound + * @param maxX maximal x bound + * @param maxY maximal y bound + * @param maxZ maximal z bound */ void setBounds(float minX, float minY, float minZ, float maxX, float maxY, float maxZ); @@ -31,12 +31,12 @@ public interface IPartRenderHelper * * render a single face. * - * @param x - * @param y - * @param z - * @param ico - * @param face - * @param renderer + * @param x x coord of part + * @param y y coord of part + * @param z z coord of part + * @param ico icon of part + * @param face direction its facing + * @param renderer renderer of part */ @SideOnly(Side.CLIENT) void renderFace(int x, int y, int z, IIcon ico, ForgeDirection face, RenderBlocks renderer); @@ -46,13 +46,13 @@ public interface IPartRenderHelper * * render a box with a cut out box in the center. * - * @param x - * @param y - * @param z - * @param ico - * @param face - * @param edgeThickness - * @param renderer + * @param x x pos of part + * @param y y pos of part + * @param z z pos of part + * @param ico icon of part + * @param face face of part + * @param edgeThickness thickness of the edge + * @param renderer renderer */ @SideOnly(Side.CLIENT) void renderFaceCutout(int x, int y, int z, IIcon ico, ForgeDirection face, float edgeThickness, RenderBlocks renderer); @@ -62,10 +62,10 @@ public interface IPartRenderHelper * * render a block of specified bounds. * - * @param x - * @param y - * @param z - * @param renderer + * @param x x pos of block + * @param y y pos of block + * @param z z pos of block + * @param renderer renderer */ @SideOnly(Side.CLIENT) void renderBlock(int x, int y, int z, RenderBlocks renderer); @@ -73,17 +73,17 @@ public interface IPartRenderHelper /** * render a single face in inventory renderer. * - * @param IIcon - * @param south - * @param renderer + * @param IIcon icon of part + * @param direction face of part + * @param renderer renderer */ @SideOnly(Side.CLIENT) - void renderInventoryFace(IIcon IIcon, ForgeDirection south, RenderBlocks renderer); + void renderInventoryFace(IIcon IIcon, ForgeDirection direction, RenderBlocks renderer); /** * render a box in inventory renderer. * - * @param renderer + * @param renderer renderer */ @SideOnly(Side.CLIENT) void renderInventoryBox(RenderBlocks renderer); @@ -93,28 +93,28 @@ public interface IPartRenderHelper * * set unique icons for each side of the block. * - * @param Down - * @param Up - * @param North - * @param South - * @param West - * @param East + * @param down down face + * @param up up face + * @param north north face + * @param south south face + * @param west west face + * @param east east face */ - void setTexture(IIcon Down, IIcon Up, IIcon North, IIcon South, IIcon West, IIcon East); + void setTexture(IIcon down, IIcon up, IIcon north, IIcon south, IIcon west, IIcon east); /** * inventory, and static renderer. * * set all sides to a single IIcon. * - * @param ico + * @param ico to be set icon */ void setTexture(IIcon ico); /** * configure the color multiplier for the inventory renderer. * - * @param whiteVariant + * @param whiteVariant color multiplier */ void setInvColor(int whiteVariant); @@ -144,34 +144,34 @@ public interface IPartRenderHelper * * Only worth it if you render more then 1 block. */ - ISimplifiedBundle useSimpliedRendering(int x, int y, int z, IBoxProvider p, ISimplifiedBundle sim); + ISimplifiedBundle useSimplifiedRendering(int x, int y, int z, IBoxProvider p, ISimplifiedBundle sim); /** - * disables, useSimpliedRendering. + * disables, useSimplifiedRendering. */ void normalRendering(); /** * render a block using the current renderer state. * - * @param x - * @param y - * @param z - * @param renderer + * @param x x pos of part + * @param y y pos of part + * @param z z pos of part + * @param renderer renderer of part */ void renderBlockCurrentBounds(int x, int y, int z, RenderBlocks renderer); /** * allow you to enable your part to render during the alpha pass or the standard pass. * - * @param pass + * @param pass render pass */ void renderForPass(int pass); /** * Set which faces to render, remember to set back to ALL when you are done. * - * @param complementOf + * @param complementOf sides to render */ void setFacesToRender(EnumSet complementOf); diff --git a/src/api/java/appeng/api/parts/LayerBase.java b/src/api/java/appeng/api/parts/LayerBase.java index 2aa74fbb..e976654b 100644 --- a/src/api/java/appeng/api/parts/LayerBase.java +++ b/src/api/java/appeng/api/parts/LayerBase.java @@ -1,23 +1,23 @@ package appeng.api.parts; -import java.util.Set; - import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; +import java.util.Set; + /** * All Layers must extends this, this get part implementation is provided to interface with the parts, however a real * implementation will be used at runtime. */ -public class LayerBase extends TileEntity // implements IPartHost +public abstract class LayerBase extends TileEntity // implements IPartHost { /** * Grants access for the layer to the parts of the host. * - * This Method looks silly, thats because its not used at runtime, a real implementation will be used instead. + * This Method looks silly, that is because its not used at runtime, a real implementation will be used instead. * - * @param side + * @param side side of part * @return the part for the requested side. */ public IPart getPart(ForgeDirection side) diff --git a/src/api/java/appeng/api/parts/PartItemStack.java b/src/api/java/appeng/api/parts/PartItemStack.java index 4c8c72dc..95a7474d 100644 --- a/src/api/java/appeng/api/parts/PartItemStack.java +++ b/src/api/java/appeng/api/parts/PartItemStack.java @@ -1,14 +1,14 @@ -package appeng.api.parts; - -public enum PartItemStack -{ - Pick, - - Break, - - Wrench, - - Network, - - World -} +package appeng.api.parts; + +public enum PartItemStack +{ + Pick, + + Break, + + Wrench, + + Network, + + World +} diff --git a/src/api/java/appeng/api/recipes/ICraftHandler.java b/src/api/java/appeng/api/recipes/ICraftHandler.java index 076768cc..df574c7f 100644 --- a/src/api/java/appeng/api/recipes/ICraftHandler.java +++ b/src/api/java/appeng/api/recipes/ICraftHandler.java @@ -1,19 +1,19 @@ package appeng.api.recipes; -import java.util.List; - import appeng.api.exceptions.MissingIngredientError; import appeng.api.exceptions.RecipeError; import appeng.api.exceptions.RegistrationError; +import java.util.List; + public interface ICraftHandler { /** * Called when your recipe handler receives a newly parsed list of inputs/outputs. * - * @param input - * @param output + * @param input parsed inputs + * @param output parsed outputs * @throws RecipeError */ public void setup(List> input, List> output) throws RecipeError; diff --git a/src/api/java/appeng/api/recipes/IIngredient.java b/src/api/java/appeng/api/recipes/IIngredient.java index 0785fd89..f17a219d 100644 --- a/src/api/java/appeng/api/recipes/IIngredient.java +++ b/src/api/java/appeng/api/recipes/IIngredient.java @@ -1,64 +1,64 @@ -package appeng.api.recipes; - -import net.minecraft.item.ItemStack; -import appeng.api.exceptions.MissingIngredientError; -import appeng.api.exceptions.RegistrationError; - -public interface IIngredient { - - /** - * Acquire a single input stack for the current recipe, if more then one ItemStack is possible a - * RegistrationError exception will be thrown, ignore these and let the system handle the error. - * - * @return a single ItemStack for the recipe handler. - * - * @throws RegistrationError - * @throws MissingIngredientError - */ - ItemStack getItemStack() throws RegistrationError, MissingIngredientError; - - /** - * Acquire a list of all the input stacks for the current recipe, this is for handlers that support - * multiple inputs per slot. - * - * @return an array of ItemStacks for the recipe handler. - * @throws RegistrationError - * @throws MissingIngredientError - */ - ItemStack[] getItemStackSet() throws RegistrationError, MissingIngredientError; - - /** - * If you wish to support air, you must test before geting the ItemStack, or ItemStackSet - * - * @return true if this slot contains no ItemStack, this is passed as "_" - */ - public boolean isAir(); - - /** - * @return The Name Space of the item. Prefer getItemStack or getItemStackSet - */ - public String getNameSpace(); - - /** - * @return The Name of the item. Prefer getItemStack or getItemStackSet - */ - public String getItemName(); - - /** - * @return The Damage Value of the item. Prefer getItemStack or getItemStackSet - */ - public int getDamageValue(); - - /** - * @return The Damage Value of the item. Prefer getItemStack or getItemStackSet - */ - public int getQty(); - - /** - * Bakes the lists in for faster runtime lookups. - * @throws MissingIngredientError - * @throws RegistrationError - */ - void bake() throws RegistrationError, MissingIngredientError; - -} +package appeng.api.recipes; + +import net.minecraft.item.ItemStack; +import appeng.api.exceptions.MissingIngredientError; +import appeng.api.exceptions.RegistrationError; + +public interface IIngredient { + + /** + * Acquire a single input stack for the current recipe, if more then one ItemStack is possible a + * RegistrationError exception will be thrown, ignore these and let the system handle the error. + * + * @return a single ItemStack for the recipe handler. + * + * @throws RegistrationError + * @throws MissingIngredientError + */ + ItemStack getItemStack() throws RegistrationError, MissingIngredientError; + + /** + * Acquire a list of all the input stacks for the current recipe, this is for handlers that support + * multiple inputs per slot. + * + * @return an array of ItemStacks for the recipe handler. + * @throws RegistrationError + * @throws MissingIngredientError + */ + ItemStack[] getItemStackSet() throws RegistrationError, MissingIngredientError; + + /** + * If you wish to support air, you must test before getting the ItemStack, or ItemStackSet + * + * @return true if this slot contains no ItemStack, this is passed as "_" + */ + public boolean isAir(); + + /** + * @return The Name Space of the item. Prefer getItemStack or getItemStackSet + */ + public String getNameSpace(); + + /** + * @return The Name of the item. Prefer getItemStack or getItemStackSet + */ + public String getItemName(); + + /** + * @return The Damage Value of the item. Prefer getItemStack or getItemStackSet + */ + public int getDamageValue(); + + /** + * @return The Damage Value of the item. Prefer getItemStack or getItemStackSet + */ + public int getQty(); + + /** + * Bakes the lists in for faster runtime lookups. + * @throws MissingIngredientError + * @throws RegistrationError + */ + void bake() throws RegistrationError, MissingIngredientError; + +} diff --git a/src/api/java/appeng/api/recipes/IRecipeHandler.java b/src/api/java/appeng/api/recipes/IRecipeHandler.java index d52a8157..153d1623 100644 --- a/src/api/java/appeng/api/recipes/IRecipeHandler.java +++ b/src/api/java/appeng/api/recipes/IRecipeHandler.java @@ -9,8 +9,8 @@ public interface IRecipeHandler /** * Call when you want to read recipes in from a file based on a loader * - * @param loader - * @param path + * @param loader recipe loader + * @param path path of file */ void parseRecipes(IRecipeLoader loader, String path); diff --git a/src/api/java/appeng/api/recipes/ISubItemResolver.java b/src/api/java/appeng/api/recipes/ISubItemResolver.java index a6a481b7..49a0bf31 100644 --- a/src/api/java/appeng/api/recipes/ISubItemResolver.java +++ b/src/api/java/appeng/api/recipes/ISubItemResolver.java @@ -4,9 +4,9 @@ public interface ISubItemResolver { /** - * @param namespace - * @param fullName - * @return either a ResolveReslult, or a ResolverResultSet + * @param namespace namespace of sub item + * @param fullName name of sub item + * @return either a ResolveResult, or a ResolverResultSet */ public Object resolveItemByName(String namespace, String fullName); diff --git a/src/api/java/appeng/api/storage/ICellContainer.java b/src/api/java/appeng/api/storage/ICellContainer.java index 44553ed5..8b1f7c21 100644 --- a/src/api/java/appeng/api/storage/ICellContainer.java +++ b/src/api/java/appeng/api/storage/ICellContainer.java @@ -11,7 +11,7 @@ public interface ICellContainer extends IActionHost, ICellProvider, ISaveProvide /** * tell the Cell container that this slot should blink, the slot number is relative to the * - * @param slot + * @param slot slot index */ void blinkCell(int slot); diff --git a/src/api/java/appeng/api/storage/ICellHandler.java b/src/api/java/appeng/api/storage/ICellHandler.java index 17ab7fac..1ddc839a 100644 --- a/src/api/java/appeng/api/storage/ICellHandler.java +++ b/src/api/java/appeng/api/storage/ICellHandler.java @@ -17,7 +17,7 @@ public interface ICellHandler * return true if the provided item is handled by your cell handler. ( AE May choose to skip this method, and just * request a handler ) * - * @param is + * @param is to be checked item * @return return true, if getCellHandler will not return null. */ boolean isCell(ItemStack is); @@ -27,11 +27,11 @@ public interface ICellHandler * * @param is * a storage cell item. - * @param save - * host, anytime the contents of your storage cell changes it should use this to request a save, please + * @param host + * anytime the contents of your storage cell changes it should use this to request a save, please * note, this value can be null. - * @param the - * storage channel requested. + * @param channel + * the storage channel requested. * * @return a new IMEHandler for the provided item */ @@ -67,12 +67,12 @@ public interface ICellHandler * is not available via ME Chests simply tell the user they can't use it, or something, other wise you should open * your gui and display the cell to the user. * - * @param player - * @param chest - * @param cellHandler - * @param inv - * @param is - * @param chan + * @param player player opening chest gui + * @param chest to be opened chest + * @param cellHandler cell handler + * @param inv inventory handler + * @param is item + * @param chan storage channel */ void openChestGui(EntityPlayer player, IChestOrDrive chest, ICellHandler cellHandler, IMEInventoryHandler inv, ItemStack is, StorageChannel chan); @@ -85,10 +85,8 @@ public interface ICellHandler * * 3 - red, ( usually means the cell is 100% full ) * - * @param is - * the cell item. ( use the handler for any details you can ) - * @param the - * handler for the cell is provides for reference, you can cast this to your handler. + * @param is the cell item. ( use the handler for any details you can ) + * @param handler the handler for the cell is provides for reference, you can cast this to your handler. * * @return get the status of the cell based on its contents. */ diff --git a/src/api/java/appeng/api/storage/ICellRegistry.java b/src/api/java/appeng/api/storage/ICellRegistry.java index 40c138c3..4e983102 100644 --- a/src/api/java/appeng/api/storage/ICellRegistry.java +++ b/src/api/java/appeng/api/storage/ICellRegistry.java @@ -15,14 +15,14 @@ public interface ICellRegistry /** * Register a new handler. * - * @param handler + * @param handler cell handler */ void addCellHandler(ICellHandler handler); /** * return true, if you can get a InventoryHandler for the item passed. * - * @param is + * @param is to be checked item * @return true if the provided item, can be handled by a handler in AE, ( AE May choose to skip this and just get * the handler instead. ) */ @@ -31,7 +31,7 @@ public interface ICellRegistry /** * get the handler, for the requested type. * - * @param is + * @param is to be checked item * @return the handler registered for this item type. */ ICellHandler getHandler(ItemStack is); @@ -39,9 +39,9 @@ public interface ICellRegistry /** * returns an IMEInventoryHandler for the provided item. * - * @param is + * @param is item with inventory handler * @param host can be null, or the hosting tile / part. - * @param the storage channel to request the handler for. + * @param chan the storage channel to request the handler for. * * @return new IMEInventoryHandler, or null if there isn't one. */ diff --git a/src/api/java/appeng/api/storage/ICellWorkbenchItem.java b/src/api/java/appeng/api/storage/ICellWorkbenchItem.java index 06824619..e4fab828 100644 --- a/src/api/java/appeng/api/storage/ICellWorkbenchItem.java +++ b/src/api/java/appeng/api/storage/ICellWorkbenchItem.java @@ -10,7 +10,7 @@ public interface ICellWorkbenchItem /** * if this return false, the item will not be treated as a cell, and cannot be inserted into the work bench. * - * @param is + * @param is item * @return true if the item should be editable in the cell workbench. */ boolean isEditable(ItemStack is); diff --git a/src/api/java/appeng/api/storage/IExternalStorageHandler.java b/src/api/java/appeng/api/storage/IExternalStorageHandler.java index 7021261b..a17cdd6f 100644 --- a/src/api/java/appeng/api/storage/IExternalStorageHandler.java +++ b/src/api/java/appeng/api/storage/IExternalStorageHandler.java @@ -14,8 +14,8 @@ public interface IExternalStorageHandler * if this can handle the provided inventory, return true. ( Generally skipped by AE, and it just calls getInventory * ) * - * @param te - * @param mySrc + * @param te to be handled tile entity + * @param mySrc source * @return true, if it can get a handler via getInventory */ boolean canHandle(TileEntity te, ForgeDirection d, StorageChannel channel, BaseActionSource mySrc); @@ -26,10 +26,10 @@ public interface IExternalStorageHandler * please note that if your inventory changes and requires polling, you must use an {@link IMEMonitor} instead of an * {@link IMEInventory} failure to do so will result in invalid item counts and reporting of the inventory. * - * @param te - * @param d - * @param channel - * @param src + * @param te to be handled tile entity + * @param d direction + * @param channel channel + * @param src source * @return The Handler for the inventory */ IMEInventory getInventory(TileEntity te, ForgeDirection d, StorageChannel channel, BaseActionSource src); diff --git a/src/api/java/appeng/api/storage/IExternalStorageRegistry.java b/src/api/java/appeng/api/storage/IExternalStorageRegistry.java index ac23808b..7edbc8b9 100644 --- a/src/api/java/appeng/api/storage/IExternalStorageRegistry.java +++ b/src/api/java/appeng/api/storage/IExternalStorageRegistry.java @@ -16,15 +16,15 @@ public interface IExternalStorageRegistry /** * A registry for StorageBus interactions * - * @param esh + * @param esh storage handler */ void addExternalStorageInterface(IExternalStorageHandler esh); /** - * @param te - * @param opposite - * @param channel - * @param mySrc + * @param te tile entity + * @param opposite direction + * @param channel channel + * @param mySrc source * @return the handler for a given tile / forge direction */ IExternalStorageHandler getHandler(TileEntity te, ForgeDirection opposite, StorageChannel channel, BaseActionSource mySrc); diff --git a/src/api/java/appeng/api/storage/IMEInventory.java b/src/api/java/appeng/api/storage/IMEInventory.java index 5dd9b586..d51be9fa 100644 --- a/src/api/java/appeng/api/storage/IMEInventory.java +++ b/src/api/java/appeng/api/storage/IMEInventory.java @@ -21,9 +21,9 @@ public interface IMEInventory /** * Store new items, or simulate the addition of new items into the ME Inventory. * - * @param input - * item to add. - * @param mode + * @param input item to add. + * @param type action type + * @param src action source * @return returns the number of items not added. */ public StackType injectItems(StackType input, Actionable type, BaseActionSource src); diff --git a/src/api/java/appeng/api/storage/IMEInventoryHandler.java b/src/api/java/appeng/api/storage/IMEInventoryHandler.java index 0815fc64..a93d8b86 100644 --- a/src/api/java/appeng/api/storage/IMEInventoryHandler.java +++ b/src/api/java/appeng/api/storage/IMEInventoryHandler.java @@ -49,8 +49,8 @@ public interface IMEInventoryHandler extends IMEInve * pass back value for blinkCell. * * @return the slot index for the cell that this represents in the storage unit, the method on the - * {@link ICellContainer} will be called with this value, only trust the return value of this mehod if you - * are the implementor of the {@link IMEInventoryHandler}. + * {@link ICellContainer} will be called with this value, only trust the return value of this method if you + * are the implementer of the {@link IMEInventoryHandler}. */ public int getSlot(); diff --git a/src/api/java/appeng/api/storage/IMEMonitor.java b/src/api/java/appeng/api/storage/IMEMonitor.java index de3f9991..439bb00e 100644 --- a/src/api/java/appeng/api/storage/IMEMonitor.java +++ b/src/api/java/appeng/api/storage/IMEMonitor.java @@ -15,7 +15,7 @@ public interface IMEMonitor extends IMEInventoryHandler, public IItemList getAvailableItems(IItemList out); /** - * Get access to the full item list of the network, preferred over {@link IMEInventory} .getAvaialbleItems(...) + * Get access to the full item list of the network, preferred over {@link IMEInventory} .getAvailableItems(...) * * @return full storage list. */ diff --git a/src/api/java/appeng/api/storage/IMEMonitorHandlerReceiver.java b/src/api/java/appeng/api/storage/IMEMonitorHandlerReceiver.java index 328acf1d..f0f50d97 100644 --- a/src/api/java/appeng/api/storage/IMEMonitorHandlerReceiver.java +++ b/src/api/java/appeng/api/storage/IMEMonitorHandlerReceiver.java @@ -10,15 +10,15 @@ public interface IMEMonitorHandlerReceiver /** * return true if this object should remain as a listener. * - * @param verificationToken - * @return + * @param verificationToken to be checked object + * @return true if object should remain as a listener */ boolean isValid(Object verificationToken); /** * called when changes are made to the Monitor, but only if listener is still valid. * - * @param change + * @param change done change */ void postChange(IBaseMonitor monitor, Iterable change, BaseActionSource actionSource); diff --git a/src/api/java/appeng/api/storage/IStorageHelper.java b/src/api/java/appeng/api/storage/IStorageHelper.java index 6a52c905..3f3ceb7e 100644 --- a/src/api/java/appeng/api/storage/IStorageHelper.java +++ b/src/api/java/appeng/api/storage/IStorageHelper.java @@ -1,12 +1,5 @@ package appeng.api.storage; -import io.netty.buffer.ByteBuf; - -import java.io.IOException; - -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fluids.FluidStack; import appeng.api.networking.crafting.ICraftingLink; import appeng.api.networking.crafting.ICraftingRequester; import appeng.api.networking.energy.IEnergySource; @@ -14,6 +7,12 @@ import appeng.api.networking.security.BaseActionSource; import appeng.api.storage.data.IAEFluidStack; import appeng.api.storage.data.IAEItemStack; import appeng.api.storage.data.IItemList; +import io.netty.buffer.ByteBuf; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.fluids.FluidStack; + +import java.io.IOException; public interface IStorageHelper { @@ -21,8 +20,8 @@ public interface IStorageHelper /** * load a crafting link from nbt data. * - * @param data - * @return + * @param data to be loaded data + * @return crafting link */ ICraftingLink loadCraftingLink(NBTTagCompound data, ICraftingRequester req); @@ -55,28 +54,28 @@ public interface IStorageHelper /** * Read a AE Item Stack from a byte stream, returns a AE item stack or null. * - * @param input - * @return - * @throws IOException + * @param input to be loaded data + * @return item based of data + * @throws IOException if file could not be read */ IAEItemStack readItemFromPacket(ByteBuf input) throws IOException; /** * Read a AE Fluid Stack from a byte stream, returns a AE fluid stack or null. * - * @param input - * @return - * @throws IOException + * @param input to be loaded data + * @return fluid based on data + * @throws IOException if file could not be written */ IAEFluidStack readFluidFromPacket(ByteBuf input) throws IOException; /** * use energy from energy, to remove request items from cell, at the request of src. * - * @param energy - * @param cell - * @param request - * @param src + * @param energy to be drained energy source + * @param cell cell of requested items + * @param request requested items + * @param src action source * @return items that successfully extracted. */ IAEItemStack poweredExtraction(IEnergySource energy, IMEInventory cell, IAEItemStack request, BaseActionSource src); @@ -84,10 +83,10 @@ public interface IStorageHelper /** * use energy from energy, to inject input items into cell, at the request of src * - * @param energy - * @param cell - * @param input - * @param src + * @param energy to be added energy source + * @param cell injected cell + * @param input to be injected items + * @param src action source * @return items that failed to insert. */ IAEItemStack poweredInsert(IEnergySource energy, IMEInventory cell, IAEItemStack input, BaseActionSource src); diff --git a/src/api/java/appeng/api/storage/ITerminalHost.java b/src/api/java/appeng/api/storage/ITerminalHost.java index fbb7084e..70f76bd0 100644 --- a/src/api/java/appeng/api/storage/ITerminalHost.java +++ b/src/api/java/appeng/api/storage/ITerminalHost.java @@ -1,8 +1,8 @@ package appeng.api.storage; -import appeng.api.util.IConfigureableObject; +import appeng.api.util.IConfigurableObject; -public interface ITerminalHost extends IStorageMonitorable, IConfigureableObject +public interface ITerminalHost extends IStorageMonitorable, IConfigurableObject { } diff --git a/src/api/java/appeng/api/storage/MEMonitorHandler.java b/src/api/java/appeng/api/storage/MEMonitorHandler.java index 25ffdbc5..0af84ecc 100644 --- a/src/api/java/appeng/api/storage/MEMonitorHandler.java +++ b/src/api/java/appeng/api/storage/MEMonitorHandler.java @@ -1,17 +1,16 @@ package appeng.api.storage; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map.Entry; - import appeng.api.config.AccessRestriction; import appeng.api.config.Actionable; import appeng.api.networking.security.BaseActionSource; import appeng.api.storage.data.IAEStack; import appeng.api.storage.data.IItemList; - import com.google.common.collect.ImmutableList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map.Entry; + /** * Common implementation of a simple class that monitors injection/extraction of a inventory to send events to a list of * listeners. @@ -49,15 +48,15 @@ public class MEMonitorHandler implements IMEMonitor< while (i.hasNext()) { Entry, Object> o = i.next(); - IMEMonitorHandlerReceiver recv = o.getKey(); - if ( recv.isValid( o.getValue() ) ) - recv.postChange( this, diff, src ); + IMEMonitorHandlerReceiver receiver = o.getKey(); + if ( receiver.isValid( o.getValue() ) ) + receiver.postChange( this, diff, src ); else i.remove(); } } - private StackType monitorDiffrence(IAEStack original, StackType leftOvers, boolean extraction, BaseActionSource src) + private StackType monitorDifference(IAEStack original, StackType leftOvers, boolean extraction, BaseActionSource src) { StackType diff = (StackType) original.copy(); @@ -99,7 +98,7 @@ public class MEMonitorHandler implements IMEMonitor< { if ( mode == Actionable.SIMULATE ) return getHandler().injectItems( input, mode, src ); - return monitorDiffrence( (StackType) input.copy(), getHandler().injectItems( input, mode, src ), false, src ); + return monitorDifference(input.copy(), getHandler().injectItems(input, mode, src), false, src); } @Override @@ -107,7 +106,7 @@ public class MEMonitorHandler implements IMEMonitor< { if ( mode == Actionable.SIMULATE ) return getHandler().extractItems( request, mode, src ); - return monitorDiffrence( (StackType) request.copy(), getHandler().extractItems( request, mode, src ), true, src ); + return monitorDifference(request.copy(), getHandler().extractItems(request, mode, src), true, src); } @Override diff --git a/src/api/java/appeng/api/storage/StorageChannel.java b/src/api/java/appeng/api/storage/StorageChannel.java index 1ada1509..6bf69619 100644 --- a/src/api/java/appeng/api/storage/StorageChannel.java +++ b/src/api/java/appeng/api/storage/StorageChannel.java @@ -1,33 +1,33 @@ -package appeng.api.storage; - -import appeng.api.AEApi; -import appeng.api.storage.data.IAEFluidStack; -import appeng.api.storage.data.IAEItemStack; -import appeng.api.storage.data.IAEStack; -import appeng.api.storage.data.IItemList; - -public enum StorageChannel -{ - /** - * AE2's Default Storage. - */ - ITEMS( IAEItemStack.class ), - - /** - * AE2's Fluid Based Storage ( mainly added to better support ExtraCells ) - */ - FLUIDS( IAEFluidStack.class ); - - public final Class type; - - private StorageChannel( Class t ) { - type = t; - } - - public IItemList createList() { - if ( this == ITEMS ) - return AEApi.instance().storage().createItemList(); - else - return AEApi.instance().storage().createFluidList(); - } -} +package appeng.api.storage; + +import appeng.api.AEApi; +import appeng.api.storage.data.IAEFluidStack; +import appeng.api.storage.data.IAEItemStack; +import appeng.api.storage.data.IAEStack; +import appeng.api.storage.data.IItemList; + +public enum StorageChannel +{ + /** + * AE2's Default Storage. + */ + ITEMS( IAEItemStack.class ), + + /** + * AE2's Fluid Based Storage ( mainly added to better support ExtraCells ) + */ + FLUIDS( IAEFluidStack.class ); + + public final Class type; + + private StorageChannel( Class t ) { + type = t; + } + + public IItemList createList() { + if ( this == ITEMS ) + return AEApi.instance().storage().createItemList(); + else + return AEApi.instance().storage().createFluidList(); + } +} diff --git a/src/api/java/appeng/api/storage/data/IAEFluidStack.java b/src/api/java/appeng/api/storage/data/IAEFluidStack.java index 5d134c05..9a1ad283 100644 --- a/src/api/java/appeng/api/storage/data/IAEFluidStack.java +++ b/src/api/java/appeng/api/storage/data/IAEFluidStack.java @@ -45,7 +45,7 @@ public interface IAEFluidStack extends IAEStack /** * quick way to get access to the Forge Fluid Definition. * - * @return + * @return fluid definition */ Fluid getFluid(); diff --git a/src/api/java/appeng/api/storage/data/IAEItemStack.java b/src/api/java/appeng/api/storage/data/IAEItemStack.java index 5ccc0314..26cbbb58 100644 --- a/src/api/java/appeng/api/storage/data/IAEItemStack.java +++ b/src/api/java/appeng/api/storage/data/IAEItemStack.java @@ -50,7 +50,7 @@ public interface IAEItemStack extends IAEStack /** * quick way to get access to the MC Item Definition. * - * @return + * @return item definition */ Item getItem(); @@ -67,16 +67,16 @@ public interface IAEItemStack extends IAEStack /** * compare the item/damage/nbt of the stack. * - * @param otherStack - * @return + * @param otherStack to be compared item + * @return true if it is the same type (same item, damage, nbt) */ boolean isSameType(IAEItemStack otherStack); /** * compare the item/damage/nbt of the stack. * - * @param otherStack - * @return + * @param stored to be compared item + * @return true if it is the same type (same item, damage, nbt) */ boolean isSameType(ItemStack stored); } \ No newline at end of file diff --git a/src/api/java/appeng/api/storage/data/IAEStack.java b/src/api/java/appeng/api/storage/data/IAEStack.java index 86f72f52..2261f998 100644 --- a/src/api/java/appeng/api/storage/data/IAEStack.java +++ b/src/api/java/appeng/api/storage/data/IAEStack.java @@ -1,179 +1,178 @@ -package appeng.api.storage.data; - -import io.netty.buffer.ByteBuf; - -import java.io.IOException; - -import net.minecraft.nbt.NBTTagCompound; -import appeng.api.config.FuzzyMode; -import appeng.api.storage.StorageChannel; - -public interface IAEStack -{ - - /** - * add two stacks together - * - * @param is - */ - void add(StackType is); - - /** - * number of items in the stack. - * - * @return basically ItemStack.stackSize - */ - long getStackSize(); - - /** - * changes the number of items in the stack. - * - * @param basically - * , ItemStack.stackSize = N - */ - StackType setStackSize(long stackSize); - - /** - * Same as getStackSize, but for requestable items. ( LP ) - * - * @return basically itemStack.stackSize but for requestable items. - */ - long getCountRequestable(); - - /** - * Same as setStackSize, but for requestable items. ( LP ) - * - * @return basically itemStack.stackSize = N but for setStackSize items. - */ - StackType setCountRequestable(long countRequestable); - - /** - * true, if the item can be crafted. - * - * @return true, if it can be crafted. - */ - boolean isCraftable(); - - /** - * change weather the item can be crafted. - * - * @param isCraftable - */ - StackType setCraftable(boolean isCraftable); - - /** - * clears, requsetable, craftable, and stack sizes. - */ - StackType reset(); - - /** - * returns true, if the item can be crafted, requested, or extracted. - * - * @return isThisRecordMeaningful - */ - boolean isMeaninful(); - - /** - * Adds more to the stack size... - * - * @param i - */ - void incStackSize(long i); - - /** - * removes some from the stack size. - */ - void decStackSize(long i); - - /** - * adds items to the requestable - * - * @param i - */ - void incCountRequestable(long i); - - /** - * removes items from the requsetable - * - * @param i - */ - void decCountRequestable(long i); - - /** - * write to a NBTTagCompound. - * - * @param i - */ - void writeToNBT(NBTTagCompound i); - - /** - * Compare stacks using precise logic. - * - * a IAEItemStack to another AEItemStack or a ItemStack. - * - * or - * - * IAEFluidStack, FluidStack - * - * @param obj - * @return true if they are the same. - */ - @Override - boolean equals(Object obj); - - /** - * compare stacks using fuzzy logic - * - * a IAEItemStack to another AEItemStack or a ItemStack. - * - * @param st - * @param mode - * @return true if two stacks are equal based on AE Fuzzy Comparison. - */ - boolean fuzzyComparison(Object st, FuzzyMode mode); - - /** - * Slower for disk saving, but smaller/more efficient for packets. - * - * @param data - * @throws IOException - */ - void writeToPacket(ByteBuf data) throws IOException; - - /** - * Clone the Item / Fluid Stack - * - * @return a new Stack, which is copied from the original. - */ - StackType copy(); - - /** - * create an empty stack. - * - * @return a new stack, which represents an empty copy of the original. - */ - StackType empty(); - - /** - * obtain the NBT Data for the item. - * - * @return - */ - IAETagCompound getTagCompound(); - - /** - * @return true if the stack is a {@link IAEItemStack} - */ - boolean isItem(); - - /** - * @return true if the stack is a {@link IAEFluidStack} - */ - boolean isFluid(); - - /** - * @return ITEM or FLUID - */ - StorageChannel getChannel(); - -} +package appeng.api.storage.data; + +import appeng.api.config.FuzzyMode; +import appeng.api.storage.StorageChannel; +import io.netty.buffer.ByteBuf; +import net.minecraft.nbt.NBTTagCompound; + +import java.io.IOException; + +public interface IAEStack +{ + + /** + * add two stacks together + * + * @param is added item + */ + void add(StackType is); + + /** + * number of items in the stack. + * + * @return basically ItemStack.stackSize + */ + long getStackSize(); + + /** + * changes the number of items in the stack. + * + * @param stackSize + * , ItemStack.stackSize = N + */ + StackType setStackSize(long stackSize); + + /** + * Same as getStackSize, but for requestable items. ( LP ) + * + * @return basically itemStack.stackSize but for requestable items. + */ + long getCountRequestable(); + + /** + * Same as setStackSize, but for requestable items. ( LP ) + * + * @return basically itemStack.stackSize = N but for setStackSize items. + */ + StackType setCountRequestable(long countRequestable); + + /** + * true, if the item can be crafted. + * + * @return true, if it can be crafted. + */ + boolean isCraftable(); + + /** + * change weather the item can be crafted. + * + * @param isCraftable can item be crafted + */ + StackType setCraftable(boolean isCraftable); + + /** + * clears, requestable, craftable, and stack sizes. + */ + StackType reset(); + + /** + * returns true, if the item can be crafted, requested, or extracted. + * + * @return isThisRecordMeaningful + */ + boolean isMeaningful(); + + /** + * Adds more to the stack size... + * + * @param i additional stack size + */ + void incStackSize(long i); + + /** + * removes some from the stack size. + */ + void decStackSize(long i); + + /** + * adds items to the requestable + * + * @param i increased amount of requested items + */ + void incCountRequestable(long i); + + /** + * removes items from the requestable + * + * @param i decreased amount of requested items + */ + void decCountRequestable(long i); + + /** + * write to a NBTTagCompound. + * + * @param i to be written data + */ + void writeToNBT(NBTTagCompound i); + + /** + * Compare stacks using precise logic. + * + * a IAEItemStack to another AEItemStack or a ItemStack. + * + * or + * + * IAEFluidStack, FluidStack + * + * @param obj compared object + * @return true if they are the same. + */ + @Override + boolean equals(Object obj); + + /** + * compare stacks using fuzzy logic + * + * a IAEItemStack to another AEItemStack or a ItemStack. + * + * @param st stacks + * @param mode used fuzzy mode + * @return true if two stacks are equal based on AE Fuzzy Comparison. + */ + boolean fuzzyComparison(Object st, FuzzyMode mode); + + /** + * Slower for disk saving, but smaller/more efficient for packets. + * + * @param data to be written data + * @throws IOException + */ + void writeToPacket(ByteBuf data) throws IOException; + + /** + * Clone the Item / Fluid Stack + * + * @return a new Stack, which is copied from the original. + */ + StackType copy(); + + /** + * create an empty stack. + * + * @return a new stack, which represents an empty copy of the original. + */ + StackType empty(); + + /** + * obtain the NBT Data for the item. + * + * @return nbt data + */ + IAETagCompound getTagCompound(); + + /** + * @return true if the stack is a {@link IAEItemStack} + */ + boolean isItem(); + + /** + * @return true if the stack is a {@link IAEFluidStack} + */ + boolean isFluid(); + + /** + * @return ITEM or FLUID + */ + StorageChannel getChannel(); + +} diff --git a/src/api/java/appeng/api/storage/data/IAETagCompound.java b/src/api/java/appeng/api/storage/data/IAETagCompound.java index 8fe65e85..ef283978 100644 --- a/src/api/java/appeng/api/storage/data/IAETagCompound.java +++ b/src/api/java/appeng/api/storage/data/IAETagCompound.java @@ -12,14 +12,14 @@ public interface IAETagCompound { /** - * @return a copy ( the copy will not be a IAETagCompount, it will be a NBTTagCompound ) + * @return a copy ( the copy will not be a IAETagCompound, it will be a NBTTagCompound ) */ public NBTTagCompound getNBTTagCompoundCopy(); /** * compare to other NBTTagCompounds or IAETagCompounds * - * @param a + * @param a compared object * @return true, if they are the same. */ @Override diff --git a/src/api/java/appeng/api/storage/data/IItemContainer.java b/src/api/java/appeng/api/storage/data/IItemContainer.java index d8fd7640..fb12493d 100644 --- a/src/api/java/appeng/api/storage/data/IItemContainer.java +++ b/src/api/java/appeng/api/storage/data/IItemContainer.java @@ -1,9 +1,9 @@ package appeng.api.storage.data; -import java.util.Collection; - import appeng.api.config.FuzzyMode; +import java.util.Collection; + /** * Represents a list of items in AE. * @@ -17,19 +17,19 @@ public interface IItemContainer /** * add a stack to the list, this will merge the stack with an item already in the list if found. * - * @param option + * @param option added stack */ public void add(StackType option); // adds stack as is /** - * @param i + * @param i compared item * @return a stack equivalent to the stack passed in, but with the correct stack size information, or null if its * not present */ StackType findPrecise(StackType i); /** - * @param input + * @param input compared item * @return a list of relevant fuzzy matched stacks */ public Collection findFuzzy(StackType input, FuzzyMode fuzzy); diff --git a/src/api/java/appeng/api/storage/data/IItemList.java b/src/api/java/appeng/api/storage/data/IItemList.java index 6968d23d..d8f06d11 100644 --- a/src/api/java/appeng/api/storage/data/IItemList.java +++ b/src/api/java/appeng/api/storage/data/IItemList.java @@ -16,22 +16,22 @@ public interface IItemList extends IItemContainer entity(AEColor color); - - /** - * @return an {@link ItemStack} with specified quantity of this item. - */ - ItemStack stack(AEColor color, int stackSize); - - /** - * @param stackSize - * - stack size of the result. - * @return an array of all colors. - */ - ItemStack[] allStacks(int stackSize); - - /** - * Compare {@link ItemStack} with this {@link AEItemDefinition} - * - * @param comparableItem - * @return true if the item stack is a matching item. - */ - boolean sameAs(AEColor color, ItemStack comparableItem); - -} +package appeng.api.util; + +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; + +public interface AEColoredItemDefinition +{ + + /** + * @return the {@link Block} Implementation if applicable + */ + Block block(AEColor color); + + /** + * @return the {@link Item} Implementation if applicable + */ + Item item(AEColor color); + + /** + * @return the {@link TileEntity} Class if applicable. + */ + Class entity(AEColor color); + + /** + * @return an {@link ItemStack} with specified quantity of this item. + */ + ItemStack stack(AEColor color, int stackSize); + + /** + * @param stackSize + * - stack size of the result. + * @return an array of all colors. + */ + ItemStack[] allStacks(int stackSize); + + /** + * Compare {@link ItemStack} with this {@link AEItemDefinition} + * + * @param color compared color of item + * @param comparableItem compared item + * @return true if the item stack is a matching item. + */ + boolean sameAs(AEColor color, ItemStack comparableItem); + +} diff --git a/src/api/java/appeng/api/util/AEItemDefinition.java b/src/api/java/appeng/api/util/AEItemDefinition.java index 2a423473..88002180 100644 --- a/src/api/java/appeng/api/util/AEItemDefinition.java +++ b/src/api/java/appeng/api/util/AEItemDefinition.java @@ -1,54 +1,54 @@ -package appeng.api.util; - -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.IBlockAccess; - -/** - * Gives easy access to different part of the various, items/blocks/materials in AE. - */ -public interface AEItemDefinition -{ - - /** - * @return the {@link Block} Implementation if applicable - */ - Block block(); - - /** - * @return the {@link Item} Implementation if applicable - */ - Item item(); - - /** - * @return the {@link TileEntity} Class if applicable. - */ - Class entity(); - - /** - * @return an {@link ItemStack} with specified quantity of this item. - */ - ItemStack stack(int stackSize); - - /** - * Compare {@link ItemStack} with this {@link AEItemDefinition} - * - * @param comparableItem - * @return true if the item stack is a matching item. - */ - boolean sameAsStack(ItemStack comparableItem); - - /** - * Compare Block with world. - * - * @param world - * @param x - * @param y - * @param z - * - * @return if the block is placed in the world at the specific location. - */ - boolean sameAsBlock(IBlockAccess world, int x, int y, int z); -} +package appeng.api.util; + +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockAccess; + +/** + * Gives easy access to different part of the various, items/blocks/materials in AE. + */ +public interface AEItemDefinition +{ + + /** + * @return the {@link Block} Implementation if applicable + */ + Block block(); + + /** + * @return the {@link Item} Implementation if applicable + */ + Item item(); + + /** + * @return the {@link TileEntity} Class if applicable. + */ + Class entity(); + + /** + * @return an {@link ItemStack} with specified quantity of this item. + */ + ItemStack stack(int stackSize); + + /** + * Compare {@link ItemStack} with this {@link AEItemDefinition} + * + * @param comparableItem compared item + * @return true if the item stack is a matching item. + */ + boolean sameAsStack(ItemStack comparableItem); + + /** + * Compare Block with world. + * + * @param world world of block + * @param x x pos of block + * @param y y pos of block + * @param z z pos of block + * + * @return if the block is placed in the world at the specific location. + */ + boolean sameAsBlock(IBlockAccess world, int x, int y, int z); +} diff --git a/src/api/java/appeng/api/util/DimensionalCoord.java b/src/api/java/appeng/api/util/DimensionalCoord.java index c6025395..2f528a0a 100644 --- a/src/api/java/appeng/api/util/DimensionalCoord.java +++ b/src/api/java/appeng/api/util/DimensionalCoord.java @@ -9,8 +9,8 @@ import net.minecraft.world.World; public class DimensionalCoord extends WorldCoord { - private World w; - private int dimId; + private final World w; + private final int dimId; public DimensionalCoord(DimensionalCoord s) { super( s.x, s.y, s.z ); @@ -44,9 +44,7 @@ public class DimensionalCoord extends WorldCoord @Override public boolean equals(Object obj) { - if ( obj instanceof DimensionalCoord ) - return isEqual( (DimensionalCoord) obj ); - return false; + return obj instanceof DimensionalCoord && isEqual((DimensionalCoord) obj); } @Override diff --git a/src/api/java/appeng/api/util/ICommonTile.java b/src/api/java/appeng/api/util/ICommonTile.java index 82a52509..0b34cc2b 100644 --- a/src/api/java/appeng/api/util/ICommonTile.java +++ b/src/api/java/appeng/api/util/ICommonTile.java @@ -1,23 +1,23 @@ -package appeng.api.util; - -import java.util.ArrayList; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -public interface ICommonTile -{ - - /** - * implemented on AE's Tile Entities, Gets a list of drops that the entity will normally drop, this doesn't include - * the block itself. - * - * @param world - * @param x - * @param y - * @param z - * @param drops - */ - void getDrops(World world, int x, int y, int z, ArrayList drops); - +package appeng.api.util; + +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +import java.util.ArrayList; + +public interface ICommonTile +{ + + /** + * implemented on AE's Tile Entities, Gets a list of drops that the entity will normally drop, this doesn't include + * the block itself. + * + * @param world world of tile entity + * @param x x pos of tile entity + * @param y y pos of tile entity + * @param z z pos of tile entity + * @param drops drops of tile entity + */ + void getDrops(World world, int x, int y, int z, ArrayList drops); + } \ No newline at end of file diff --git a/src/api/java/appeng/api/util/IConfigManager.java b/src/api/java/appeng/api/util/IConfigManager.java index f8cddb84..d383f981 100644 --- a/src/api/java/appeng/api/util/IConfigManager.java +++ b/src/api/java/appeng/api/util/IConfigManager.java @@ -1,13 +1,13 @@ package appeng.api.util; -import java.util.Set; - import net.minecraft.nbt.NBTTagCompound; +import java.util.Set; + /** * Used to adjust settings on an object, * - * Obtained via {@link IConfigureableObject} + * Obtained via {@link IConfigurableObject} */ public interface IConfigManager { @@ -15,47 +15,46 @@ public interface IConfigManager /** * get a list of different settings * - * @return + * @return enum set of settings */ Set getSettings(); /** * used to initialize the configuration manager, should be called for all settings. * - * @param settingName - * @param defaultValue - * @return + * @param settingName name of setting + * @param defaultValue default value of setting */ void registerSetting(Enum settingName, Enum defaultValue); /** - * Get Value of a particlar setting + * Get Value of a particular setting * - * @param settingName - * @return + * @param settingName name of setting + * @return value of setting */ Enum getSetting(Enum settingName); /** * Change setting * - * @param settingName - * @param newValue - * @return + * @param settingName to be changed setting + * @param newValue new value for setting + * @return changed setting */ Enum putSetting(Enum settingName, Enum newValue); /** * write all settings to the NBT Tag so they can be read later. * - * @param dest + * @param dest to be written nbt tag */ void writeToNBT(NBTTagCompound dest); /** * Only works after settings have been registered * - * @param src + * @param src to be read nbt tag */ void readFromNBT(NBTTagCompound src); diff --git a/src/api/java/appeng/api/util/IConfigureableObject.java b/src/api/java/appeng/api/util/IConfigurableObject.java similarity index 82% rename from src/api/java/appeng/api/util/IConfigureableObject.java rename to src/api/java/appeng/api/util/IConfigurableObject.java index 4e36b3f2..6a3ef669 100644 --- a/src/api/java/appeng/api/util/IConfigureableObject.java +++ b/src/api/java/appeng/api/util/IConfigurableObject.java @@ -3,7 +3,7 @@ package appeng.api.util; /** * Implemented by various Tiles or Parts in AE */ -public interface IConfigureableObject +public interface IConfigurableObject { /** diff --git a/src/api/java/appeng/api/util/IOrientable.java b/src/api/java/appeng/api/util/IOrientable.java index e130ccb1..8574a43a 100644 --- a/src/api/java/appeng/api/util/IOrientable.java +++ b/src/api/java/appeng/api/util/IOrientable.java @@ -7,7 +7,7 @@ import net.minecraftforge.common.util.ForgeDirection; * * and it can be used to manipulate the direction of some machines, most of these orientations are purely visual. * - * AE also responds to {@link Block}.rotateBlock + * AE also responds to Block.rotateBlock */ public interface IOrientable { @@ -29,8 +29,8 @@ public interface IOrientable /** * Update the orientation - * @param Forward - * @param Up + * @param Forward new forward direction + * @param Up new upwards direction */ void setOrientation(ForgeDirection Forward, ForgeDirection Up); diff --git a/src/api/java/appeng/api/util/IOrientableBlock.java b/src/api/java/appeng/api/util/IOrientableBlock.java index 95bf11e3..d4484924 100644 --- a/src/api/java/appeng/api/util/IOrientableBlock.java +++ b/src/api/java/appeng/api/util/IOrientableBlock.java @@ -1,25 +1,25 @@ -package appeng.api.util; - -import net.minecraft.world.IBlockAccess; - -/** - * Implemented on many of AE's non Tile Entity Blocks as a way to get a IOrientable. - */ -public interface IOrientableBlock -{ - - /** - * @return if this block uses metadata to store its rotation. - */ - boolean usesMetadata(); - - /** - * @param world - * @param x - * @param y - * @param z - * @return a IOrientable if applicable - */ - IOrientable getOrientable(IBlockAccess world, int x, int y, int z); - +package appeng.api.util; + +import net.minecraft.world.IBlockAccess; + +/** + * Implemented on many of AE's non Tile Entity Blocks as a way to get a IOrientable. + */ +public interface IOrientableBlock +{ + + /** + * @return if this block uses metadata to store its rotation. + */ + boolean usesMetadata(); + + /** + * @param world world of block + * @param x x pos of block + * @param y y pos of block + * @param z z pos of block + * @return a IOrientable if applicable + */ + IOrientable getOrientable(IBlockAccess world, int x, int y, int z); + } \ No newline at end of file diff --git a/src/api/java/appeng/api/util/WorldCoord.java b/src/api/java/appeng/api/util/WorldCoord.java index beb43b3c..e09f01ce 100644 --- a/src/api/java/appeng/api/util/WorldCoord.java +++ b/src/api/java/appeng/api/util/WorldCoord.java @@ -119,9 +119,7 @@ public class WorldCoord @Override public boolean equals(Object obj) { - if ( obj instanceof WorldCoord ) - return isEqual( (WorldCoord) obj ); - return false; + return obj instanceof WorldCoord && isEqual((WorldCoord) obj); } @Override diff --git a/src/main/java/crazypants/enderio/conduit/ConduitRecipes.java b/src/main/java/crazypants/enderio/conduit/ConduitRecipes.java index f92151c7..b37d6b1f 100644 --- a/src/main/java/crazypants/enderio/conduit/ConduitRecipes.java +++ b/src/main/java/crazypants/enderio/conduit/ConduitRecipes.java @@ -94,14 +94,8 @@ public class ConduitRecipes { @Method(modid = "appliedenergistics2") private static void addAeRecipes() { String fluix = "crystalFluix"; - Object pureFluix = null; - - try { - pureFluix = AEApi.instance().materials().materialPureifiedFluixCrystal.stack(1).copy(); // rv1 - } catch (NoSuchFieldError e) { - pureFluix = "crystalPureFluix"; // rv2 - } - + String pureFluix = "crystalPureFluix"; + ItemStack quartzFiber = AEApi.instance().parts().partQuartzFiber.stack(1).copy(); ItemStack conduitBinder = new ItemStack(EnderIO.itemMaterial, 1, Material.CONDUIT_BINDER.ordinal()); ItemStack res = new ItemStack(EnderIO.itemMEConduit, Config.numConduitsPerRecipe / 2); diff --git a/src/main/java/crazypants/enderio/conduit/me/MEConduitGrid.java b/src/main/java/crazypants/enderio/conduit/me/MEConduitGrid.java index 8373f0cc..e9430ff7 100644 --- a/src/main/java/crazypants/enderio/conduit/me/MEConduitGrid.java +++ b/src/main/java/crazypants/enderio/conduit/me/MEConduitGrid.java @@ -44,13 +44,8 @@ public class MEConduitGrid implements IGridBlock { public EnumSet getFlags() { return conduit.isDense() ? EnumSet.of(GridFlags.DENSE_CAPACITY) : EnumSet.noneOf(GridFlags.class); } - - @Override - public boolean isWorldAccessable() { - return true; - } - //@Override // dummy method for rv2 + @Override public boolean isWorldAccessible() { return true; }