diff --git a/src/api/java/appeng/api/AEApi.java b/src/api/java/appeng/api/AEApi.java index dd5005f4..83026cb1 100644 --- a/src/api/java/appeng/api/AEApi.java +++ b/src/api/java/appeng/api/AEApi.java @@ -23,56 +23,52 @@ package appeng.api; - -import appeng.api.exceptions.CoreInaccessibleException; - import java.lang.reflect.Field; +import appeng.api.exceptions.CoreInaccessibleException; /** * Entry point for api. *
* Available IMCs: */ -public enum AEApi -{ - ; +public enum AEApi { + ; - private static final String CORE_API_FQN = "appeng.core.Api"; - private static final String CORE_API_FIELD = "INSTANCE"; - private static final IAppEngApi HELD_API; + private static final String CORE_API_FQN = "appeng.core.Api"; + private static final String CORE_API_FIELD = "INSTANCE"; + private static final IAppEngApi HELD_API; - static - { - try - { - final Class> apiClass = Class.forName( CORE_API_FQN ); - final Field apiField = apiClass.getField( CORE_API_FIELD ); + static { + try { + final Class> apiClass = Class.forName(CORE_API_FQN); + final Field apiField = apiClass.getField(CORE_API_FIELD); - HELD_API = (IAppEngApi) apiField.get( apiClass ); - } - catch( final ClassNotFoundException e ) - { - throw new CoreInaccessibleException( "AE2 API tried to access the " + CORE_API_FQN + " class, without it being declared." ); - } - catch( final NoSuchFieldException e ) - { - throw new CoreInaccessibleException( "AE2 API tried to access the " + CORE_API_FIELD + " field in " + CORE_API_FQN + " without it being declared." ); - } - catch( final IllegalAccessException e ) - { - throw new CoreInaccessibleException( "AE2 API tried to access the " + CORE_API_FIELD + " field in " + CORE_API_FQN + " without enough access permissions." ); - } - } - - /** - * API Entry Point. - * - * @return the {@link IAppEngApi} - */ - public static IAppEngApi instance() - { - return HELD_API; - } + HELD_API = (IAppEngApi) apiField.get(apiClass); + } catch (final ClassNotFoundException e) { + throw new CoreInaccessibleException( + "AE2 API tried to access the " + CORE_API_FQN + + " class, without it being declared." + ); + } catch (final NoSuchFieldException e) { + throw new CoreInaccessibleException( + "AE2 API tried to access the " + CORE_API_FIELD + " field in " + + CORE_API_FQN + " without it being declared." + ); + } catch (final IllegalAccessException e) { + throw new CoreInaccessibleException( + "AE2 API tried to access the " + CORE_API_FIELD + " field in " + + CORE_API_FQN + " without enough access permissions." + ); + } + } + /** + * API Entry Point. + * + * @return the {@link IAppEngApi} + */ + public static IAppEngApi instance() { + return HELD_API; + } } diff --git a/src/api/java/appeng/api/IAppEngApi.java b/src/api/java/appeng/api/IAppEngApi.java index 453ec979..06827bea 100644 --- a/src/api/java/appeng/api/IAppEngApi.java +++ b/src/api/java/appeng/api/IAppEngApi.java @@ -23,7 +23,6 @@ package appeng.api; - import appeng.api.definitions.*; import appeng.api.exceptions.FailedConnection; import appeng.api.features.IRegistryContainer; @@ -33,72 +32,70 @@ import appeng.api.networking.IGridNode; import appeng.api.parts.IPartHelper; import appeng.api.storage.IStorageHelper; +public interface IAppEngApi { + /** + * @return Registry Container for the numerous registries in AE2. + */ + IRegistryContainer registries(); -public interface IAppEngApi -{ + /** + * @return helper for working with storage data types. + */ + IStorageHelper storage(); - /** - * @return Registry Container for the numerous registries in AE2. - */ - IRegistryContainer registries(); + /** + * @return helper for working with grids, and buses. + */ + IPartHelper partHelper(); - /** - * @return helper for working with storage data types. - */ - IStorageHelper storage(); + /** + * @return an accessible list of all of AE's Items + * @deprecated use {@link appeng.api.definitions.IDefinitions#items()} + */ + @Deprecated + Items items(); - /** - * @return helper for working with grids, and buses. - */ - IPartHelper partHelper(); + /** + * @return an accessible list of all of AE's materials; materials are items + * @deprecated use {@link appeng.api.definitions.IDefinitions#materials()} + */ + @Deprecated + Materials materials(); - /** - * @return an accessible list of all of AE's Items - * @deprecated use {@link appeng.api.definitions.IDefinitions#items()} - */ - @Deprecated - Items items(); + /** + * @return an accessible list of all of AE's blocks + * @deprecated use {@link appeng.api.definitions.IDefinitions#blocks()} + */ + @Deprecated + Blocks blocks(); - /** - * @return an accessible list of all of AE's materials; materials are items - * @deprecated use {@link appeng.api.definitions.IDefinitions#materials()} - */ - @Deprecated - Materials materials(); + /** + * @return an accessible list of all of AE's parts, parts are items + * @deprecated use {@link appeng.api.definitions.IDefinitions#parts()} + */ + @Deprecated + Parts parts(); - /** - * @return an accessible list of all of AE's blocks - * @deprecated use {@link appeng.api.definitions.IDefinitions#blocks()} - */ - @Deprecated - Blocks blocks(); + /** + * @return an accessible list of all AE definitions + */ + IDefinitions definitions(); - /** - * @return an accessible list of all of AE's parts, parts are items - * @deprecated use {@link appeng.api.definitions.IDefinitions#parts()} - */ - @Deprecated - Parts parts(); + /** + * create a grid node for your {@link appeng.api.networking.IGridHost} + * + * @param block grid block + * @return grid node of block + */ + IGridNode createGridNode(IGridBlock block); - /** - * @return an accessible list of all AE definitions - */ - IDefinitions definitions(); - - /** - * create a grid node for your {@link appeng.api.networking.IGridHost} - * - * @param block grid block - * @return grid node of block - */ - IGridNode createGridNode( IGridBlock block ); - - /** - * create a connection between two {@link appeng.api.networking.IGridNode} - * - * @param a to be connected gridnode - * @param b to be connected gridnode - * @throws appeng.api.exceptions.FailedConnection - */ - IGridConnection createGridConnection( IGridNode a, IGridNode b ) throws FailedConnection; + /** + * create a connection between two {@link appeng.api.networking.IGridNode} + * + * @param a to be connected gridnode + * @param b to be connected gridnode + * @throws appeng.api.exceptions.FailedConnection + */ + IGridConnection createGridConnection(IGridNode a, IGridNode b) + throws FailedConnection; } \ No newline at end of file diff --git a/src/api/java/appeng/api/config/AccessRestriction.java b/src/api/java/appeng/api/config/AccessRestriction.java index 6788d744..ffb6c6ca 100644 --- a/src/api/java/appeng/api/config/AccessRestriction.java +++ b/src/api/java/appeng/api/config/AccessRestriction.java @@ -23,51 +23,45 @@ package appeng.api.config; +public enum AccessRestriction { + NO_ACCESS(0), + READ(1), + WRITE(2), + READ_WRITE(3); -public enum AccessRestriction -{ - NO_ACCESS( 0 ), READ( 1 ), WRITE( 2 ), READ_WRITE( 3 ); + private final int permissionBit; - private final int permissionBit; + AccessRestriction(final int v) { + this.permissionBit = v; + } - AccessRestriction( final int v ) - { - this.permissionBit = v; - } + public boolean hasPermission(final AccessRestriction ar) { + return (this.permissionBit & ar.permissionBit) == ar.permissionBit; + } - public boolean hasPermission( final AccessRestriction ar ) - { - return ( this.permissionBit & ar.permissionBit ) == ar.permissionBit; - } + public AccessRestriction restrictPermissions(final AccessRestriction ar) { + return this.getPermByBit(this.permissionBit & ar.permissionBit); + } - public AccessRestriction restrictPermissions( final AccessRestriction ar ) - { - return this.getPermByBit( this.permissionBit & ar.permissionBit ); - } + private AccessRestriction getPermByBit(final int bit) { + switch (bit) { + default: + case 0: + return NO_ACCESS; + case 1: + return READ; + case 2: + return WRITE; + case 3: + return READ_WRITE; + } + } - private AccessRestriction getPermByBit( final int bit ) - { - switch( bit ) - { - default: - case 0: - return NO_ACCESS; - case 1: - return READ; - case 2: - return WRITE; - case 3: - return READ_WRITE; - } - } + public AccessRestriction addPermissions(final AccessRestriction ar) { + return this.getPermByBit(this.permissionBit | ar.permissionBit); + } - public AccessRestriction addPermissions( final AccessRestriction ar ) - { - return this.getPermByBit( this.permissionBit | ar.permissionBit ); - } - - public AccessRestriction removePermissions( final AccessRestriction ar ) - { - return this.getPermByBit( this.permissionBit & ( ~ar.permissionBit ) ); - } + public AccessRestriction removePermissions(final AccessRestriction ar) { + return this.getPermByBit(this.permissionBit & (~ar.permissionBit)); + } } \ No newline at end of file diff --git a/src/api/java/appeng/api/config/ActionItems.java b/src/api/java/appeng/api/config/ActionItems.java index 9cb6fbf2..4c4a84f6 100644 --- a/src/api/java/appeng/api/config/ActionItems.java +++ b/src/api/java/appeng/api/config/ActionItems.java @@ -23,8 +23,4 @@ package appeng.api.config; - -public enum ActionItems -{ - WRENCH, CLOSE, STASH, ENCODE, SUBSTITUTION -} \ No newline at end of file +public enum ActionItems { WRENCH, CLOSE, STASH, ENCODE, SUBSTITUTION } \ No newline at end of file diff --git a/src/api/java/appeng/api/config/Actionable.java b/src/api/java/appeng/api/config/Actionable.java index 8e5f1f54..93835e62 100644 --- a/src/api/java/appeng/api/config/Actionable.java +++ b/src/api/java/appeng/api/config/Actionable.java @@ -23,16 +23,14 @@ package appeng.api.config; +public enum Actionable { + /** + * Perform the intended action. + */ + MODULATE, -public enum Actionable -{ - /** - * Perform the intended action. - */ - MODULATE, - - /** - * Pretend to perform the action. - */ - SIMULATE + /** + * Pretend to perform the action. + */ + SIMULATE } diff --git a/src/api/java/appeng/api/config/CondenserOutput.java b/src/api/java/appeng/api/config/CondenserOutput.java index cb9efae0..082dc33d 100644 --- a/src/api/java/appeng/api/config/CondenserOutput.java +++ b/src/api/java/appeng/api/config/CondenserOutput.java @@ -23,16 +23,12 @@ package appeng.api.config; +public enum CondenserOutput { + TRASH, // 0 -public enum CondenserOutput -{ + MATTER_BALLS, // 256 - TRASH, // 0 - - MATTER_BALLS, // 256 - - SINGULARITY; // 250,000 - - public int requiredPower = 0; + SINGULARITY; // 250,000 + public int requiredPower = 0; } \ No newline at end of file diff --git a/src/api/java/appeng/api/config/CopyMode.java b/src/api/java/appeng/api/config/CopyMode.java index 7f2f3996..aad2ab7e 100644 --- a/src/api/java/appeng/api/config/CopyMode.java +++ b/src/api/java/appeng/api/config/CopyMode.java @@ -23,8 +23,4 @@ package appeng.api.config; - -public enum CopyMode -{ - CLEAR_ON_REMOVE, KEEP_ON_REMOVE -} +public enum CopyMode { CLEAR_ON_REMOVE, KEEP_ON_REMOVE } diff --git a/src/api/java/appeng/api/config/FullnessMode.java b/src/api/java/appeng/api/config/FullnessMode.java index c52d4228..19ea31c4 100644 --- a/src/api/java/appeng/api/config/FullnessMode.java +++ b/src/api/java/appeng/api/config/FullnessMode.java @@ -23,8 +23,4 @@ package appeng.api.config; - -public enum FullnessMode -{ - EMPTY, HALF, FULL -} \ No newline at end of file +public enum FullnessMode { EMPTY, HALF, FULL } \ No newline at end of file diff --git a/src/api/java/appeng/api/config/FuzzyMode.java b/src/api/java/appeng/api/config/FuzzyMode.java index 665dd551..4f438adb 100644 --- a/src/api/java/appeng/api/config/FuzzyMode.java +++ b/src/api/java/appeng/api/config/FuzzyMode.java @@ -23,24 +23,23 @@ package appeng.api.config; +public enum FuzzyMode { + // Note that percentage damaged, is the inverse of percentage durability. + IGNORE_ALL(-1), + PERCENT_99(0), + PERCENT_75(25), + PERCENT_50(50), + PERCENT_25(75); -public enum FuzzyMode -{ - // Note that percentage damaged, is the inverse of percentage durability. - IGNORE_ALL( -1 ), PERCENT_99( 0 ), PERCENT_75( 25 ), PERCENT_50( 50 ), PERCENT_25( 75 ); + public final float breakPoint; + public final float percentage; - public final float breakPoint; - public final float percentage; - - FuzzyMode( final float p ) - { - this.percentage = p; - this.breakPoint = p / 100.0f; - } - - public int calculateBreakPoint( final int maxDamage ) - { - return (int) ( ( this.percentage * maxDamage ) / 100.0f ); - } + FuzzyMode(final float p) { + this.percentage = p; + this.breakPoint = p / 100.0f; + } + public int calculateBreakPoint(final int maxDamage) { + return (int) ((this.percentage * maxDamage) / 100.0f); + } } \ No newline at end of file diff --git a/src/api/java/appeng/api/config/IncludeExclude.java b/src/api/java/appeng/api/config/IncludeExclude.java index 53f0bbeb..bf76f60c 100644 --- a/src/api/java/appeng/api/config/IncludeExclude.java +++ b/src/api/java/appeng/api/config/IncludeExclude.java @@ -23,8 +23,4 @@ package appeng.api.config; - -public enum IncludeExclude -{ - WHITELIST, BLACKLIST -} \ No newline at end of file +public enum IncludeExclude { WHITELIST, BLACKLIST } \ No newline at end of file diff --git a/src/api/java/appeng/api/config/ItemSubstitution.java b/src/api/java/appeng/api/config/ItemSubstitution.java index 9c4b4706..7e84caa9 100644 --- a/src/api/java/appeng/api/config/ItemSubstitution.java +++ b/src/api/java/appeng/api/config/ItemSubstitution.java @@ -23,8 +23,4 @@ package appeng.api.config; - -public enum ItemSubstitution -{ - ENABLED, DISABLED -} +public enum ItemSubstitution { ENABLED, DISABLED } diff --git a/src/api/java/appeng/api/config/LevelEmitterMode.java b/src/api/java/appeng/api/config/LevelEmitterMode.java index dcdd0ef8..352c966f 100644 --- a/src/api/java/appeng/api/config/LevelEmitterMode.java +++ b/src/api/java/appeng/api/config/LevelEmitterMode.java @@ -23,12 +23,10 @@ package appeng.api.config; +public enum LevelEmitterMode { -public enum LevelEmitterMode -{ + STORED_AMOUNT, - STORED_AMOUNT, - - STORABLE_AMOUNT + STORABLE_AMOUNT } \ No newline at end of file diff --git a/src/api/java/appeng/api/config/LevelType.java b/src/api/java/appeng/api/config/LevelType.java index 0787abb7..86acc0e8 100644 --- a/src/api/java/appeng/api/config/LevelType.java +++ b/src/api/java/appeng/api/config/LevelType.java @@ -23,12 +23,10 @@ package appeng.api.config; +public enum LevelType { -public enum LevelType -{ + ITEM_LEVEL, - ITEM_LEVEL, - - ENERGY_LEVEL + ENERGY_LEVEL } \ 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 b1225844..8805bcc7 100644 --- a/src/api/java/appeng/api/config/ModSettings.java +++ b/src/api/java/appeng/api/config/ModSettings.java @@ -23,8 +23,6 @@ package appeng.api.config; - -public enum ModSettings -{ +public enum ModSettings { } diff --git a/src/api/java/appeng/api/config/NetworkEmitterMode.java b/src/api/java/appeng/api/config/NetworkEmitterMode.java index 03efd7c9..022cb033 100644 --- a/src/api/java/appeng/api/config/NetworkEmitterMode.java +++ b/src/api/java/appeng/api/config/NetworkEmitterMode.java @@ -23,14 +23,12 @@ package appeng.api.config; +public enum NetworkEmitterMode { -public enum NetworkEmitterMode -{ + POWER_LEVEL, - POWER_LEVEL, + BOOTING, - BOOTING, - - CHANNEL_ERROR + CHANNEL_ERROR } \ No newline at end of file diff --git a/src/api/java/appeng/api/config/OperationMode.java b/src/api/java/appeng/api/config/OperationMode.java index f2c8ff30..93681783 100644 --- a/src/api/java/appeng/api/config/OperationMode.java +++ b/src/api/java/appeng/api/config/OperationMode.java @@ -23,8 +23,4 @@ package appeng.api.config; - -public enum OperationMode -{ - FILL, EMPTY -} \ No newline at end of file +public enum OperationMode { FILL, EMPTY } \ No newline at end of file diff --git a/src/api/java/appeng/api/config/OutputMode.java b/src/api/java/appeng/api/config/OutputMode.java index f9bcffa5..6975a646 100644 --- a/src/api/java/appeng/api/config/OutputMode.java +++ b/src/api/java/appeng/api/config/OutputMode.java @@ -23,8 +23,4 @@ package appeng.api.config; - -public enum OutputMode -{ - EXPORT_ONLY, EXPORT_OR_CRAFT, CRAFT_ONLY -} +public enum OutputMode { EXPORT_ONLY, EXPORT_OR_CRAFT, CRAFT_ONLY } diff --git a/src/api/java/appeng/api/config/PowerMultiplier.java b/src/api/java/appeng/api/config/PowerMultiplier.java index dd50e79e..3f2bc472 100644 --- a/src/api/java/appeng/api/config/PowerMultiplier.java +++ b/src/api/java/appeng/api/config/PowerMultiplier.java @@ -23,23 +23,20 @@ package appeng.api.config; +public enum PowerMultiplier { + ONE, + CONFIG; -public enum PowerMultiplier -{ - ONE, CONFIG; + /** + * please do not edit this value, it is set when AE loads its config files. + */ + public double multiplier = 1.0; - /** - * please do not edit this value, it is set when AE loads its config files. - */ - public double multiplier = 1.0; + public double multiply(final double in) { + return in * this.multiplier; + } - public double multiply( final double in ) - { - return in * this.multiplier; - } - - public double divide( final double in ) - { - return in / this.multiplier; - } + public double divide(final double in) { + return in / this.multiplier; + } } diff --git a/src/api/java/appeng/api/config/PowerUnits.java b/src/api/java/appeng/api/config/PowerUnits.java index b6389413..71dd7a6e 100644 --- a/src/api/java/appeng/api/config/PowerUnits.java +++ b/src/api/java/appeng/api/config/PowerUnits.java @@ -23,43 +23,40 @@ package appeng.api.config; +public enum PowerUnits { + AE("gui.appliedenergistics2.units.appliedenergstics"), // Native Units - AE Energy + EU("gui.appliedenergistics2.units.ic2"), // IndustrialCraft 2 - Energy Units + WA("gui.appliedenergistics2.units.rotarycraft"), // RotaryCraft - Watts + RF("gui.appliedenergistics2.units.thermalexpansion" + ), // ThermalExpansion - Redstone Flux + MK("gui.appliedenergistics2.units.mekanism"); // Mekanism - Joules -public enum PowerUnits -{ - AE( "gui.appliedenergistics2.units.appliedenergstics" ), // Native Units - AE Energy - EU( "gui.appliedenergistics2.units.ic2" ), // IndustrialCraft 2 - Energy Units - WA( "gui.appliedenergistics2.units.rotarycraft" ), // RotaryCraft - Watts - RF( "gui.appliedenergistics2.units.thermalexpansion" ), // ThermalExpansion - Redstone Flux - MK( "gui.appliedenergistics2.units.mekanism" ); // Mekanism - Joules + /** + * unlocalized name for the power unit. + */ + public final String unlocalizedName; + /** + * please do not edit this value, it is set when AE loads its config files. + */ + public double conversionRatio = 1.0; - /** - * unlocalized name for the power unit. - */ - public final String unlocalizedName; - /** - * please do not edit this value, it is set when AE loads its config files. - */ - public double conversionRatio = 1.0; - - PowerUnits( final String un ) - { - this.unlocalizedName = un; - } - - /** - * do power conversion using AE's conversion rates. - *
- * Example: PowerUnits.EU.convertTo( PowerUnits.AE, 32 ); - *
- * will normally returns 64, as it will convert the EU, to AE with AE's power settings. - * - * @param target target power unit - * @param value value - * @return value converted to target units, from this units. - */ - public double convertTo( final PowerUnits target, final double value ) - { - return ( value * this.conversionRatio ) / target.conversionRatio; - } + PowerUnits(final String un) { + this.unlocalizedName = un; + } + /** + * do power conversion using AE's conversion rates. + *
+ * Example: PowerUnits.EU.convertTo( PowerUnits.AE, 32 ); + *
+ * will normally returns 64, as it will convert the EU, to AE with AE's power
+ * settings.
+ *
+ * @param target target power unit
+ * @param value value
+ * @return value converted to target units, from this units.
+ */
+ public double convertTo(final PowerUnits target, final double value) {
+ return (value * this.conversionRatio) / target.conversionRatio;
+ }
}
\ No newline at end of file
diff --git a/src/api/java/appeng/api/config/RedstoneMode.java b/src/api/java/appeng/api/config/RedstoneMode.java
index 0bb5a54d..f69d4751 100644
--- a/src/api/java/appeng/api/config/RedstoneMode.java
+++ b/src/api/java/appeng/api/config/RedstoneMode.java
@@ -23,8 +23,4 @@
package appeng.api.config;
-
-public enum RedstoneMode
-{
- IGNORE, LOW_SIGNAL, HIGH_SIGNAL, SIGNAL_PULSE
-}
\ No newline at end of file
+public enum RedstoneMode { IGNORE, LOW_SIGNAL, HIGH_SIGNAL, SIGNAL_PULSE }
\ No newline at end of file
diff --git a/src/api/java/appeng/api/config/RelativeDirection.java b/src/api/java/appeng/api/config/RelativeDirection.java
index a81d2047..850e09f7 100644
--- a/src/api/java/appeng/api/config/RelativeDirection.java
+++ b/src/api/java/appeng/api/config/RelativeDirection.java
@@ -23,8 +23,4 @@
package appeng.api.config;
-
-public enum RelativeDirection
-{
- LEFT, RIGHT, UP, DOW
-}
\ No newline at end of file
+public enum RelativeDirection { LEFT, RIGHT, UP, DOW }
\ No newline at end of file
diff --git a/src/api/java/appeng/api/config/SchedulingMode.java b/src/api/java/appeng/api/config/SchedulingMode.java
index 395bf1ec..21a3d71d 100644
--- a/src/api/java/appeng/api/config/SchedulingMode.java
+++ b/src/api/java/appeng/api/config/SchedulingMode.java
@@ -23,8 +23,4 @@
package appeng.api.config;
-
-public enum SchedulingMode
-{
- DEFAULT, ROUNDROBIN, RANDOM
-}
+public enum SchedulingMode { DEFAULT, ROUNDROBIN, RANDOM }
diff --git a/src/api/java/appeng/api/config/SearchBoxMode.java b/src/api/java/appeng/api/config/SearchBoxMode.java
index f2f2408e..552fd125 100644
--- a/src/api/java/appeng/api/config/SearchBoxMode.java
+++ b/src/api/java/appeng/api/config/SearchBoxMode.java
@@ -23,8 +23,4 @@
package appeng.api.config;
-
-public enum SearchBoxMode
-{
- AUTOSEARCH, MANUAL_SEARCH, NEI_AUTOSEARCH, NEI_MANUAL_SEARCH
-}
+public enum SearchBoxMode { AUTOSEARCH, MANUAL_SEARCH, NEI_AUTOSEARCH, NEI_MANUAL_SEARCH }
diff --git a/src/api/java/appeng/api/config/SecurityPermissions.java b/src/api/java/appeng/api/config/SecurityPermissions.java
index c3e69062..5caae68f 100644
--- a/src/api/java/appeng/api/config/SecurityPermissions.java
+++ b/src/api/java/appeng/api/config/SecurityPermissions.java
@@ -23,49 +23,47 @@
package appeng.api.config;
-
/**
- * Represent the security systems basic permissions, these are not for anti-griefing, they are part of the mod as a
- * gameplay feature.
+ * Represent the security systems basic permissions, these are not for anti-griefing, they
+ * are part of the mod as a gameplay feature.
*/
-public enum SecurityPermissions
-{
- /**
- * required to insert items into the network via terminal ( also used for machines based on the owner of the
- * network, which is determined by its Security Block. )
- */
- INJECT,
+public enum SecurityPermissions {
+ /**
+ * required to insert items into the network via terminal ( also used for machines
+ * based on the owner of the network, which is determined by its Security Block. )
+ */
+ INJECT,
- /**
- * required to extract items from the network via terminal ( also used for machines based on the owner of the
- * network, which is determined by its Security Block. )
- */
- EXTRACT,
+ /**
+ * required to extract items from the network via terminal ( also used for machines
+ * based on the owner of the network, which is determined by its Security Block. )
+ */
+ EXTRACT,
- /**
- * required to request crafting from the network via terminal.
- */
- CRAFT,
+ /**
+ * required to request crafting from the network via terminal.
+ */
+ CRAFT,
- /**
- * required to modify automation, and make modifications to the networks physical layout.
- */
- BUILD,
+ /**
+ * required to modify automation, and make modifications to the networks physical
+ * layout.
+ */
+ BUILD,
- /**
- * required to modify the security blocks settings.
- */
- SECURITY;
+ /**
+ * required to modify the security blocks settings.
+ */
+ SECURITY;
- private final String unlocalizedName = "gui.appliedenergistics2.security." + this.name().toLowerCase();
+ private final String unlocalizedName
+ = "gui.appliedenergistics2.security." + this.name().toLowerCase();
- public String getUnlocalizedName()
- {
- return this.unlocalizedName + ".name";
- }
+ public String getUnlocalizedName() {
+ return this.unlocalizedName + ".name";
+ }
- public String getUnlocalizedTip()
- {
- return this.unlocalizedName + ".tip";
- }
+ public String getUnlocalizedTip() {
+ return this.unlocalizedName + ".tip";
+ }
}
diff --git a/src/api/java/appeng/api/config/Settings.java b/src/api/java/appeng/api/config/Settings.java
index 672b0306..ed2b5834 100644
--- a/src/api/java/appeng/api/config/Settings.java
+++ b/src/api/java/appeng/api/config/Settings.java
@@ -23,56 +23,63 @@
package appeng.api.config;
-
-import javax.annotation.Nonnull;
import java.util.EnumSet;
+import javax.annotation.Nonnull;
+public enum Settings {
+ LEVEL_EMITTER_MODE(EnumSet.allOf(LevelEmitterMode.class)),
-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)),
- REDSTONE_EMITTER( EnumSet.of( RedstoneMode.HIGH_SIGNAL, RedstoneMode.LOW_SIGNAL ) ), REDSTONE_CONTROLLED( EnumSet.allOf( RedstoneMode.class ) ),
+ CONDENSER_OUTPUT(EnumSet.allOf(CondenserOutput.class)),
- CONDENSER_OUTPUT( EnumSet.allOf( CondenserOutput.class ) ),
+ POWER_UNITS(EnumSet.allOf(PowerUnits.class)),
+ ACCESS(EnumSet.of(
+ AccessRestriction.READ_WRITE, AccessRestriction.READ, AccessRestriction.WRITE
+ )),
- 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)),
- 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)),
- 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)),
- 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)),
- 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)),
- 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)),
- 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)),
- 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)),
- INTERFACE_TERMINAL( EnumSet.of( YesNo.YES, YesNo.NO ) ), CRAFT_VIA_REDSTONE( EnumSet.of( YesNo.YES, YesNo.NO ) ),
+ STORAGE_FILTER(EnumSet.allOf(StorageFilter.class)),
+ PLACE_BLOCK(EnumSet.of(YesNo.YES, YesNo.NO)),
- STORAGE_FILTER( EnumSet.allOf( StorageFilter.class ) ), PLACE_BLOCK( EnumSet.of( YesNo.YES, YesNo.NO ) ),
+ SCHEDULING_MODE(EnumSet.allOf(SchedulingMode.class));
- SCHEDULING_MODE( EnumSet.allOf( SchedulingMode.class ) );
+ private final EnumSet extends Enum>> values;
- private final EnumSet extends Enum>> values;
+ Settings(@Nonnull final EnumSet extends Enum>> possibleOptions) {
+ if (possibleOptions.isEmpty()) {
+ throw new IllegalArgumentException("Tried to instantiate an empty setting.");
+ }
- Settings( @Nonnull final EnumSet extends Enum>> possibleOptions )
- {
- if( possibleOptions.isEmpty() )
- {
- throw new IllegalArgumentException( "Tried to instantiate an empty setting." );
- }
-
- this.values = possibleOptions;
- }
-
- public EnumSet extends Enum>> getPossibleValues()
- {
- return this.values;
- }
+ this.values = possibleOptions;
+ }
+ public EnumSet extends Enum>> getPossibleValues() {
+ return this.values;
+ }
}
diff --git a/src/api/java/appeng/api/config/SortDir.java b/src/api/java/appeng/api/config/SortDir.java
index 654fda0d..a39e4997 100644
--- a/src/api/java/appeng/api/config/SortDir.java
+++ b/src/api/java/appeng/api/config/SortDir.java
@@ -23,8 +23,4 @@
package appeng.api.config;
-
-public enum SortDir
-{
- ASCENDING, DESCENDING
-}
\ No newline at end of file
+public enum SortDir { ASCENDING, DESCENDING }
\ No newline at end of file
diff --git a/src/api/java/appeng/api/config/SortOrder.java b/src/api/java/appeng/api/config/SortOrder.java
index 51cde4e6..b76f0e8f 100644
--- a/src/api/java/appeng/api/config/SortOrder.java
+++ b/src/api/java/appeng/api/config/SortOrder.java
@@ -23,8 +23,4 @@
package appeng.api.config;
-
-public enum SortOrder
-{
- NAME, AMOUNT, MOD, INVTWEAKS
-}
\ No newline at end of file
+public enum SortOrder { NAME, AMOUNT, MOD, INVTWEAKS }
\ 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 64f63f70..83a08d7b 100644
--- a/src/api/java/appeng/api/config/StorageFilter.java
+++ b/src/api/java/appeng/api/config/StorageFilter.java
@@ -23,12 +23,10 @@
package appeng.api.config;
+public enum StorageFilter {
-public enum StorageFilter
-{
+ NONE,
- NONE,
-
- EXTRACTABLE_ONLY
+ EXTRACTABLE_ONLY
}
diff --git a/src/api/java/appeng/api/config/TerminalStyle.java b/src/api/java/appeng/api/config/TerminalStyle.java
index d8687e1a..6197b382 100644
--- a/src/api/java/appeng/api/config/TerminalStyle.java
+++ b/src/api/java/appeng/api/config/TerminalStyle.java
@@ -23,14 +23,12 @@
package appeng.api.config;
+public enum TerminalStyle {
-public enum TerminalStyle
-{
+ TALL,
- TALL,
+ FULL,
- FULL,
-
- SMALL
+ SMALL
}
\ No newline at end of file
diff --git a/src/api/java/appeng/api/config/TunnelType.java b/src/api/java/appeng/api/config/TunnelType.java
index 77f2a616..2df83bea 100644
--- a/src/api/java/appeng/api/config/TunnelType.java
+++ b/src/api/java/appeng/api/config/TunnelType.java
@@ -23,17 +23,15 @@
package appeng.api.config;
-
-public enum TunnelType
-{
- ME, // Network 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
- PRESSURE // PneumaticCraft Tunnel
+public enum TunnelType {
+ ME, // Network 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
+ PRESSURE // PneumaticCraft Tunnel
}
diff --git a/src/api/java/appeng/api/config/Upgrades.java b/src/api/java/appeng/api/config/Upgrades.java
index 6667d117..8a5790cf 100644
--- a/src/api/java/appeng/api/config/Upgrades.java
+++ b/src/api/java/appeng/api/config/Upgrades.java
@@ -23,105 +23,97 @@
package appeng.api.config;
+import java.util.HashMap;
+import java.util.Map;
import appeng.api.definitions.IItemDefinition;
import appeng.api.util.AEItemDefinition;
import com.google.common.base.Optional;
import net.minecraft.item.ItemStack;
-import java.util.HashMap;
-import java.util.Map;
+public enum Upgrades {
+ /**
+ * Gold Tier Upgrades.
+ */
+ CAPACITY(0),
+ REDSTONE(0),
+ CRAFTING(0),
+ /**
+ * Diamond Tier Upgrades.
+ */
+ FUZZY(1),
+ SPEED(1),
+ INVERTER(1);
-public enum Upgrades
-{
- /**
- * Gold Tier Upgrades.
- */
- CAPACITY( 0 ), REDSTONE( 0 ), CRAFTING( 0 ),
+ /**
+ * @deprecated use {@link Upgrades#getTier()}
+ */
+ @Deprecated
+ public final int tier;
- /**
- * Diamond Tier Upgrades.
- */
- FUZZY( 1 ), SPEED( 1 ), INVERTER( 1 );
+ /**
+ * @deprecated use {@link Upgrades#getSupported()}
+ */
+ @Deprecated
+ private final Map
* Used to Notify the Location Registry of objects, and their availability.
*/
-public class LocatableEventAnnounce extends Event
-{
+public class LocatableEventAnnounce extends Event {
+ public final ILocatable target;
+ public final LocatableEvent change;
- public final ILocatable target;
- public final LocatableEvent change;
+ public LocatableEventAnnounce(final ILocatable o, final LocatableEvent ev) {
+ this.target = o;
+ this.change = ev;
+ }
- public LocatableEventAnnounce( final ILocatable o, final LocatableEvent ev )
- {
- this.target = o;
- this.change = ev;
- }
-
- public enum LocatableEvent
- {
- Register, // Adds the locatable to the registry
- Unregister // Removes the locatable from the registry
- }
+ public enum LocatableEvent {
+ Register, // Adds the locatable to the registry
+ Unregister // Removes the locatable from the registry
+ }
}
diff --git a/src/api/java/appeng/api/exceptions/AppEngException.java b/src/api/java/appeng/api/exceptions/AppEngException.java
index 478cfd77..d68c24fe 100644
--- a/src/api/java/appeng/api/exceptions/AppEngException.java
+++ b/src/api/java/appeng/api/exceptions/AppEngException.java
@@ -23,14 +23,10 @@
package appeng.api.exceptions;
+public class AppEngException extends Exception {
+ private static final long serialVersionUID = -9051434206368465494L;
-public class AppEngException extends Exception
-{
-
- private static final long serialVersionUID = -9051434206368465494L;
-
- public AppEngException( final String t )
- {
- super( t );
- }
+ public AppEngException(final String t) {
+ super(t);
+ }
}
diff --git a/src/api/java/appeng/api/exceptions/CoreInaccessibleException.java b/src/api/java/appeng/api/exceptions/CoreInaccessibleException.java
index 88a5725f..ed8480e4 100644
--- a/src/api/java/appeng/api/exceptions/CoreInaccessibleException.java
+++ b/src/api/java/appeng/api/exceptions/CoreInaccessibleException.java
@@ -1,10 +1,7 @@
package appeng.api.exceptions;
-
-public class CoreInaccessibleException extends RuntimeException
-{
- public CoreInaccessibleException( final String message )
- {
- super( message );
- }
+public class CoreInaccessibleException extends RuntimeException {
+ public CoreInaccessibleException(final String message) {
+ super(message);
+ }
}
diff --git a/src/api/java/appeng/api/exceptions/ExistingConnectionException.java b/src/api/java/appeng/api/exceptions/ExistingConnectionException.java
index 4d2cb082..7112fa1e 100644
--- a/src/api/java/appeng/api/exceptions/ExistingConnectionException.java
+++ b/src/api/java/appeng/api/exceptions/ExistingConnectionException.java
@@ -23,34 +23,27 @@
package appeng.api.exceptions;
-
import appeng.api.networking.IGridNode;
-
/**
- * Exception occurred because of an already existing connection between the two {@link IGridNode}s
- *
- * Intended to signal an internal exception and not intended to be thrown by
- * any 3rd party module.
+ * Exception occurred because of an already existing connection between the two {@link
+ * IGridNode}s Intended to signal an internal exception and not intended to be thrown
+ * by any 3rd party module.
*
* @author yueh
* @version rv3
* @since rv3
*/
-public class ExistingConnectionException extends FailedConnection
-{
+public class ExistingConnectionException extends FailedConnection {
+ private static final long serialVersionUID = 2975450379720353182L;
+ private static final String DEFAULT_MESSAGE
+ = "Connection between both nodes already exists.";
- private static final long serialVersionUID = 2975450379720353182L;
- private static final String DEFAULT_MESSAGE = "Connection between both nodes already exists.";
-
- public ExistingConnectionException()
- {
- super( DEFAULT_MESSAGE );
- }
-
- public ExistingConnectionException( String message )
- {
- super( message );
- }
+ public ExistingConnectionException() {
+ super(DEFAULT_MESSAGE);
+ }
+ public ExistingConnectionException(String message) {
+ super(message);
+ }
}
diff --git a/src/api/java/appeng/api/exceptions/FailedConnection.java b/src/api/java/appeng/api/exceptions/FailedConnection.java
index 65072eea..516410df 100644
--- a/src/api/java/appeng/api/exceptions/FailedConnection.java
+++ b/src/api/java/appeng/api/exceptions/FailedConnection.java
@@ -23,10 +23,8 @@
package appeng.api.exceptions;
-
import appeng.api.networking.IGridNode;
-
/**
* Exception indicating a failed connection between two {@link IGridNode}s.
*
@@ -40,17 +38,12 @@ import appeng.api.networking.IGridNode;
* @version rv3
* @since rv0
*/
-public class FailedConnection extends Exception
-{
+public class FailedConnection extends Exception {
+ private static final long serialVersionUID = -2544208090248293753L;
- private static final long serialVersionUID = -2544208090248293753L;
+ public FailedConnection() {}
- public FailedConnection()
- {
- }
-
- public FailedConnection( String message )
- {
- super( message );
- }
+ public FailedConnection(String message) {
+ super(message);
+ }
}
diff --git a/src/api/java/appeng/api/exceptions/MissingDefinition.java b/src/api/java/appeng/api/exceptions/MissingDefinition.java
index f920a9e9..c7bcba3c 100644
--- a/src/api/java/appeng/api/exceptions/MissingDefinition.java
+++ b/src/api/java/appeng/api/exceptions/MissingDefinition.java
@@ -1,10 +1,7 @@
package appeng.api.exceptions;
-
-public class MissingDefinition extends RuntimeException
-{
- public MissingDefinition( final String message )
- {
- super( message );
- }
+public class MissingDefinition extends RuntimeException {
+ public MissingDefinition(final String message) {
+ super(message);
+ }
}
diff --git a/src/api/java/appeng/api/exceptions/MissingIngredientError.java b/src/api/java/appeng/api/exceptions/MissingIngredientError.java
index 81fe40d3..88b60dd9 100644
--- a/src/api/java/appeng/api/exceptions/MissingIngredientError.java
+++ b/src/api/java/appeng/api/exceptions/MissingIngredientError.java
@@ -23,14 +23,10 @@
package appeng.api.exceptions;
+public class MissingIngredientError extends Exception {
+ private static final long serialVersionUID = -998858343831371697L;
-public class MissingIngredientError extends Exception
-{
-
- private static final long serialVersionUID = -998858343831371697L;
-
- public MissingIngredientError( final String n )
- {
- super( n );
- }
+ public MissingIngredientError(final 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 a3c5eb05..fa2383ec 100644
--- a/src/api/java/appeng/api/exceptions/ModNotInstalled.java
+++ b/src/api/java/appeng/api/exceptions/ModNotInstalled.java
@@ -23,14 +23,10 @@
package appeng.api.exceptions;
+public class ModNotInstalled extends Exception {
+ private static final long serialVersionUID = -9052435206368425494L;
-public class ModNotInstalled extends Exception
-{
-
- private static final long serialVersionUID = -9052435206368425494L;
-
- public ModNotInstalled( final String t )
- {
- super( t );
- }
+ public ModNotInstalled(final String t) {
+ super(t);
+ }
}
diff --git a/src/api/java/appeng/api/exceptions/NullNodeConnectionException.java b/src/api/java/appeng/api/exceptions/NullNodeConnectionException.java
index 30f3fe0c..493909f1 100644
--- a/src/api/java/appeng/api/exceptions/NullNodeConnectionException.java
+++ b/src/api/java/appeng/api/exceptions/NullNodeConnectionException.java
@@ -23,7 +23,6 @@
package appeng.api.exceptions;
-
/**
* Exception due to trying to connect one or more null values.
*
@@ -34,20 +33,16 @@ package appeng.api.exceptions;
* @version rv3
* @since rv3
*/
-public class NullNodeConnectionException extends FailedConnection
-{
+public class NullNodeConnectionException extends FailedConnection {
+ private static final long serialVersionUID = -2143719383495321764L;
+ private static final String DEFAULT_MESSAGE
+ = "Connection forged between null entities.";
- private static final long serialVersionUID = -2143719383495321764L;
- private static final String DEFAULT_MESSAGE = "Connection forged between null entities.";
-
- public NullNodeConnectionException()
- {
- super( DEFAULT_MESSAGE );
- }
-
- public NullNodeConnectionException( String message )
- {
- super( message );
- }
+ public NullNodeConnectionException() {
+ super(DEFAULT_MESSAGE);
+ }
+ public NullNodeConnectionException(String message) {
+ super(message);
+ }
}
diff --git a/src/api/java/appeng/api/exceptions/RecipeError.java b/src/api/java/appeng/api/exceptions/RecipeError.java
index d4d6f90a..160b892a 100644
--- a/src/api/java/appeng/api/exceptions/RecipeError.java
+++ b/src/api/java/appeng/api/exceptions/RecipeError.java
@@ -23,14 +23,10 @@
package appeng.api.exceptions;
+public class RecipeError extends Exception {
+ private static final long serialVersionUID = -6602870588617670262L;
-public class RecipeError extends Exception
-{
-
- private static final long serialVersionUID = -6602870588617670262L;
-
- public RecipeError( final String n )
- {
- super( n );
- }
+ public RecipeError(final String n) {
+ super(n);
+ }
}
diff --git a/src/api/java/appeng/api/exceptions/RegistrationError.java b/src/api/java/appeng/api/exceptions/RegistrationError.java
index 205df3e9..65414a04 100644
--- a/src/api/java/appeng/api/exceptions/RegistrationError.java
+++ b/src/api/java/appeng/api/exceptions/RegistrationError.java
@@ -23,14 +23,10 @@
package appeng.api.exceptions;
+public class RegistrationError extends Exception {
+ private static final long serialVersionUID = -6602870588617670263L;
-public class RegistrationError extends Exception
-{
-
- private static final long serialVersionUID = -6602870588617670263L;
-
- public RegistrationError( final String n )
- {
- super( n );
- }
+ public RegistrationError(final String n) {
+ super(n);
+ }
}
diff --git a/src/api/java/appeng/api/exceptions/SecurityConnectionException.java b/src/api/java/appeng/api/exceptions/SecurityConnectionException.java
index 267377da..492c2707 100644
--- a/src/api/java/appeng/api/exceptions/SecurityConnectionException.java
+++ b/src/api/java/appeng/api/exceptions/SecurityConnectionException.java
@@ -23,7 +23,6 @@
package appeng.api.exceptions;
-
/**
* Exception due to trying to connect different security realms.
*
@@ -34,19 +33,16 @@ package appeng.api.exceptions;
* @version rv3
* @since rv3
*/
-public class SecurityConnectionException extends FailedConnection
-{
- private static final long serialVersionUID = 5048714900434215426L;
- private static final String DEFAULT_MESSAGE = "Connection failed due to different security realms.";
+public class SecurityConnectionException extends FailedConnection {
+ private static final long serialVersionUID = 5048714900434215426L;
+ private static final String DEFAULT_MESSAGE
+ = "Connection failed due to different security realms.";
- public SecurityConnectionException()
- {
- super( DEFAULT_MESSAGE );
- }
-
- public SecurityConnectionException( String message )
- {
- super( message );
- }
+ public SecurityConnectionException() {
+ super(DEFAULT_MESSAGE);
+ }
+ public SecurityConnectionException(String message) {
+ super(message);
+ }
}
diff --git a/src/api/java/appeng/api/features/IGrinderEntry.java b/src/api/java/appeng/api/features/IGrinderEntry.java
index 1667f12c..4cec6d96 100644
--- a/src/api/java/appeng/api/features/IGrinderEntry.java
+++ b/src/api/java/appeng/api/features/IGrinderEntry.java
@@ -23,99 +23,95 @@
package appeng.api.features;
-
import net.minecraft.item.ItemStack;
-
/**
* Registration Records for {@link IGrinderRegistry}
*/
-public interface IGrinderEntry
-{
+public interface IGrinderEntry {
+ /**
+ * the current input
+ *
+ * @return input that the grinder will accept.
+ */
+ ItemStack getInput();
- /**
- * the current input
- *
- * @return input that the grinder will accept.
- */
- ItemStack getInput();
+ /**
+ * lets you change the grinder recipe by changing its input.
+ *
+ * @param input input item
+ */
+ void setInput(ItemStack input);
- /**
- * lets you change the grinder recipe by changing its input.
- *
- * @param input input item
- */
- void setInput( ItemStack input );
+ /**
+ * gets the current output
+ *
+ * @return output that the grinder will produce
+ */
+ ItemStack getOutput();
- /**
- * gets the current output
- *
- * @return output that the grinder will produce
- */
- ItemStack getOutput();
+ /**
+ * allows you to change the output.
+ *
+ * @param output output item
+ */
+ void setOutput(ItemStack output);
- /**
- * allows you to change the output.
- *
- * @param output output item
- */
- void setOutput( ItemStack output );
+ /**
+ * gets the current output
+ *
+ * @return output that the grinder will produce
+ */
+ ItemStack getOptionalOutput();
- /**
- * gets the current output
- *
- * @return output that the grinder will produce
- */
- ItemStack getOptionalOutput();
+ /**
+ * gets the current output
+ *
+ * @return output that the grinder will produce
+ */
+ ItemStack getSecondOptionalOutput();
- /**
- * gets the current output
- *
- * @return output that the grinder will produce
- */
- ItemStack getSecondOptionalOutput();
+ /**
+ * stack, and 0.0-1.0 chance that it will be generated.
+ *
+ * @param output output item
+ * @param chance generation chance
+ */
+ void setOptionalOutput(ItemStack output, float chance);
- /**
- * stack, and 0.0-1.0 chance that it will be generated.
- *
- * @param output output item
- * @param chance generation chance
- */
- void setOptionalOutput( ItemStack output, float chance );
+ /**
+ * 0.0 - 1.0 the chance that the optional output will be generated.
+ *
+ * @return chance of optional output
+ */
+ float getOptionalChance();
- /**
- * 0.0 - 1.0 the chance that the optional output will be generated.
- *
- * @return chance of optional output
- */
- float getOptionalChance();
+ /**
+ * stack, and 0.0-1.0 chance that it will be generated.
+ *
+ * @param output second optional output item
+ * @param chance second optional output chance
+ */
+ void setSecondOptionalOutput(ItemStack output, float chance);
- /**
- * stack, and 0.0-1.0 chance that it will be generated.
- *
- * @param output second optional output item
- * @param chance second optional output chance
- */
- void setSecondOptionalOutput( ItemStack output, float chance );
+ /**
+ * 0.0 - 1.0 the chance that the optional output will be generated.
+ *
+ * @return second optional output chance
+ */
+ float getSecondOptionalChance();
- /**
- * 0.0 - 1.0 the chance that the optional output will be generated.
- *
- * @return second optional output chance
- */
- float getSecondOptionalChance();
+ /**
+ * Energy cost, in turns.
+ *
+ * @return number of turns it takes to produce the output from the input.
+ */
+ int getEnergyCost();
- /**
- * Energy cost, in turns.
- *
- * @return number of turns it takes to produce the output from the input.
- */
- int getEnergyCost();
-
- /**
- * Allows you to adjust the number of turns
- *
- * @param c number of turns to produce output.
- */
- void setEnergyCost( int c );
+ /**
+ * Allows you to adjust the number of turns
+ *
+ * @param c number of turns to produce output.
+ */
+ 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 9fc9f74d..88948aff 100644
--- a/src/api/java/appeng/api/features/IGrinderRegistry.java
+++ b/src/api/java/appeng/api/features/IGrinderRegistry.java
@@ -23,63 +23,69 @@
package appeng.api.features;
-
-import net.minecraft.item.ItemStack;
-
import java.util.List;
+import net.minecraft.item.ItemStack;
/**
* Lets you manipulate Grinder Recipes, by adding or editing existing ones.
*/
-public interface IGrinderRegistry
-{
+public interface IGrinderRegistry {
+ /**
+ * Current list of registered recipes, you can modify this if you want too.
+ *
+ * @return currentlyRegisteredRecipes
+ */
+ List
@@ -20,45 +18,44 @@ import java.util.List;
* @version rv2
* @since rv2
*/
-public interface IInscriberRecipe
-{
- /**
- * the current inputs
- *
- * @return inputs the inscriber will accept
- */
- @Nonnull
- List
- * Use the provided methods to actually modify the inscriber recipes.
- *
- * @return currentlyRegisteredRecipes
- * @see IInscriberRegistry#addRecipe(IInscriberRecipe)
- * @see IInscriberRegistry#removeRecipe(IInscriberRecipe)
- */
- @Nonnull
- Collection
+ * Use the provided methods to actually modify the inscriber recipes.
+ *
+ * @return currentlyRegisteredRecipes
+ * @see IInscriberRegistry#addRecipe(IInscriberRecipe)
+ * @see IInscriberRegistry#removeRecipe(IInscriberRecipe)
+ */
+ @Nonnull
+ Collection
+ * MUST BE CALLED IN PRE-INIT
+ *
+ * @param name name of crafthandler
+ * @param handler class of crafthandler
+ */
+ void addNewCraftHandler(String name, Class extends ICraftHandler> handler);
- /**
- * 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 extends ICraftHandler> handler );
+ /**
+ * Add a new resolver to the parser.
+ *
+ * MUST BE CALLED IN PRE-INIT
+ *
+ * @param sir sub item resolver
+ */
+ void addNewSubItemResolver(ISubItemResolver sir);
- /**
- * 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.
+ */
+ @Nullable
+ ICraftHandler getCraftHandlerFor(String name);
- /**
- * @param name name of crafting handler
- * @return A recipe handler by name, returns null on failure.
- */
- @Nullable
- ICraftHandler getCraftHandlerFor( String name );
+ /**
+ * @return a new recipe handler, which can be used to parse, and read recipe files.
+ */
+ IRecipeHandler createNewRecipehandler();
- /**
- * @return a new recipe handler, which can be used to parse, and read recipe files.
- */
- IRecipeHandler createNewRecipehandler();
-
- /**
- * resolve sub items by name.
- *
- * @param nameSpace namespace of item
- * @param itemName full name of item
- * @return ResolverResult or ResolverResultSet or null if could not resolve
- */
- @Nullable
- Object resolveItem( String nameSpace, String itemName );
+ /**
+ * resolve sub items by name.
+ *
+ * @param nameSpace namespace of item
+ * @param itemName full name of item
+ * @return ResolverResult or ResolverResultSet or null if could not resolve
+ */
+ @Nullable
+ 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 9b3a7e10..c92ab554 100644
--- a/src/api/java/appeng/api/features/IRegistryContainer.java
+++ b/src/api/java/appeng/api/features/IRegistryContainer.java
@@ -23,90 +23,87 @@
package appeng.api.features;
-
import appeng.api.movable.IMovableRegistry;
import appeng.api.networking.IGridCacheRegistry;
import appeng.api.storage.ICellRegistry;
import appeng.api.storage.IExternalStorageRegistry;
-
/**
* @author AlgorithmX2
* @author thatsIch
* @version rv2
* @since rv0
*/
-public interface IRegistryContainer
-{
+public interface IRegistryContainer {
+ /**
+ * Use the movable registry to white list your tiles.
+ */
+ IMovableRegistry movable();
- /**
- * Use the movable registry to white list your tiles.
- */
- IMovableRegistry movable();
+ /**
+ * Add new Grid Caches for use during run time, only use during loading phase.
+ */
+ IGridCacheRegistry gridCache();
- /**
- * Add new Grid Caches for use during run time, only use during loading phase.
- */
- IGridCacheRegistry gridCache();
+ /**
+ * 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.
+ */
+ IExternalStorageRegistry externalStorage();
- /**
- * 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.
- */
- IExternalStorageRegistry externalStorage();
+ /**
+ * Add additional special comparison functionality, AE Uses this internally for Bees.
+ */
+ ISpecialComparisonRegistry specialComparison();
- /**
- * Add additional special comparison functionality, AE Uses this internally for Bees.
- */
- ISpecialComparisonRegistry specialComparison();
+ /**
+ * Lets you register your items as wireless terminals
+ */
+ IWirelessTermRegistry wireless();
- /**
- * Lets you register your items as wireless terminals
- */
- IWirelessTermRegistry wireless();
+ /**
+ * Allows you to register new cell types, these will function in drives
+ */
+ ICellRegistry cell();
- /**
- * Allows you to register new cell types, these will function in drives
- */
- ICellRegistry cell();
+ /**
+ * Manage grinder recipes via API
+ */
+ IGrinderRegistry grinder();
- /**
- * Manage grinder recipes via API
- */
- IGrinderRegistry grinder();
+ /**
+ * Manage inscriber recipes via API
+ */
+ IInscriberRegistry inscriber();
- /**
- * Manage inscriber recipes via API
- */
- IInscriberRegistry inscriber();
+ /**
+ * get access to the locatable registry
+ */
+ ILocatableRegistry locatable();
- /**
- * get access to the locatable registry
- */
- ILocatableRegistry locatable();
+ /**
+ * get access to the p2p tunnel registry.
+ */
+ IP2PTunnelRegistry p2pTunnel();
- /**
- * get access to the p2p tunnel registry.
- */
- IP2PTunnelRegistry p2pTunnel();
+ /**
+ * get access to the ammo registry.
+ */
+ IMatterCannonAmmoRegistry matterCannon();
- /**
- * get access to the ammo registry.
- */
- IMatterCannonAmmoRegistry matterCannon();
+ /**
+ * get access to the player registry
+ */
+ IPlayerRegistry players();
- /**
- * get access to the player registry
- */
- IPlayerRegistry players();
+ /**
+ * get access to the ae2 recipe api
+ */
+ IRecipeHandlerRegistry recipes();
- /**
- * get access to the ae2 recipe api
- */
- IRecipeHandlerRegistry recipes();
-
- /**
- * get access to the world-gen api.
- */
- IWorldGen worldgen();
+ /**
+ * get access to the world-gen api.
+ */
+ IWorldGen worldgen();
}
diff --git a/src/api/java/appeng/api/features/ISpecialComparisonRegistry.java b/src/api/java/appeng/api/features/ISpecialComparisonRegistry.java
index 43fdf6eb..115ba06b 100644
--- a/src/api/java/appeng/api/features/ISpecialComparisonRegistry.java
+++ b/src/api/java/appeng/api/features/ISpecialComparisonRegistry.java
@@ -23,28 +23,24 @@
package appeng.api.features;
-
import net.minecraft.item.ItemStack;
-
/**
* A Registry of any special comparison handlers for AE To use.
*/
-public interface ISpecialComparisonRegistry
-{
+public interface ISpecialComparisonRegistry {
+ /**
+ * return TheHandler or null.
+ *
+ * @param stack item
+ * @return a handler it found for a specific item
+ */
+ IItemComparison getSpecialComparison(ItemStack stack);
- /**
- * return TheHandler or null.
- *
- * @param stack item
- * @return a handler it found for a specific item
- */
- IItemComparison getSpecialComparison( ItemStack stack );
-
- /**
- * Register a new special comparison function with AE.
- *
- * @param prov comparison provider
- */
- void addComparisonProvider( IItemComparisonProvider prov );
+ /**
+ * Register a new special comparison function with AE.
+ *
+ * @param prov comparison provider
+ */
+ 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 b1da6d72..fad796f4 100644
--- a/src/api/java/appeng/api/features/IWirelessTermHandler.java
+++ b/src/api/java/appeng/api/features/IWirelessTermHandler.java
@@ -23,47 +23,44 @@
package appeng.api.features;
-
import appeng.api.util.IConfigManager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
-
/**
* A handler for a wireless terminal.
*/
-public interface IWirelessTermHandler extends INetworkEncodable
-{
+public interface IWirelessTermHandler extends INetworkEncodable {
+ /**
+ * @param is wireless terminal
+ * @return true, if usePower, hasPower, etc... can be called for the provided item
+ */
+ boolean canHandle(ItemStack is);
- /**
- * @param is wireless terminal
- * @return true, if usePower, hasPower, etc... can be called for the provided item
- */
- boolean canHandle( ItemStack is );
+ /**
+ * use an amount of power, in AE units
+ *
+ * @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 wireless terminal
+ * @return true if wireless terminal uses power
+ */
+ boolean usePower(EntityPlayer player, double amount, ItemStack is);
- /**
- * use an amount of power, in AE units
- *
- * @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 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 wireless terminal
+ * @return returns true if there is any power left.
+ */
+ boolean hasPower(EntityPlayer player, double amount, ItemStack is);
- /**
- * gets the power status of the item.
- *
- * @param is wireless terminal
- * @return returns true if there is any power left.
- */
- boolean hasPower( EntityPlayer player, double amount, ItemStack is );
-
- /**
- * Return the config manager for the wireless terminal.
- *
- * @param is wireless terminal
- * @return config manager of wireless terminal
- */
- IConfigManager getConfigManager( ItemStack is );
+ /**
+ * Return the config manager for the wireless terminal.
+ *
+ * @param is wireless terminal
+ * @return config manager of wireless terminal
+ */
+ IConfigManager getConfigManager(ItemStack is);
}
\ No newline at end of file
diff --git a/src/api/java/appeng/api/features/IWirelessTermRegistry.java b/src/api/java/appeng/api/features/IWirelessTermRegistry.java
index aea2b71c..03667fbe 100644
--- a/src/api/java/appeng/api/features/IWirelessTermRegistry.java
+++ b/src/api/java/appeng/api/features/IWirelessTermRegistry.java
@@ -23,41 +23,37 @@
package appeng.api.features;
-
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
-
/**
* Registration record for a Custom Cell handler.
*/
-public interface IWirelessTermRegistry
-{
+public interface IWirelessTermRegistry {
+ /**
+ * add this handler to the list of other wireless handler.
+ *
+ * @param handler wireless handler
+ */
+ void registerWirelessHandler(IWirelessTermHandler handler);
- /**
- * add this handler to the list of other wireless handler.
- *
- * @param handler wireless handler
- */
- void registerWirelessHandler( IWirelessTermHandler handler );
+ /**
+ * @param is item which might have a handler
+ * @return true if there is a handler for this item
+ */
+ boolean isWirelessTerminal(ItemStack 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 item with handler
+ * @return a register handler for the item in question, or null if there
+ * isn't one
+ */
+ IWirelessTermHandler getWirelessTerminalHandler(ItemStack is);
- /**
- * @param is item with handler
- * @return a register handler for the item in question, or null if there
- * isn't one
- */
- IWirelessTermHandler getWirelessTerminalHandler( ItemStack is );
-
- /**
- * opens the wireless terminal gui, the wireless terminal item, must be in
- * the active slot on the tool bar.
- */
- void openWirelessTerminalGui( ItemStack item, World w, EntityPlayer player );
+ /**
+ * opens the wireless terminal gui, the wireless terminal item, must be in
+ * the active slot on the tool bar.
+ */
+ void openWirelessTerminalGui(ItemStack item, World w, EntityPlayer player);
}
diff --git a/src/api/java/appeng/api/features/IWorldGen.java b/src/api/java/appeng/api/features/IWorldGen.java
index 8e5a9c73..e1f86ff8 100644
--- a/src/api/java/appeng/api/features/IWorldGen.java
+++ b/src/api/java/appeng/api/features/IWorldGen.java
@@ -23,24 +23,19 @@
package appeng.api.features;
-
import net.minecraft.world.World;
import net.minecraft.world.WorldProvider;
+public interface IWorldGen {
+ void disableWorldGenForProviderID(
+ WorldGenType type, Class extends WorldProvider> provider
+ );
-public interface IWorldGen
-{
+ void enableWorldGenForDimension(WorldGenType type, int dimID);
- void disableWorldGenForProviderID( WorldGenType type, Class extends WorldProvider> provider );
+ void disableWorldGenForDimension(WorldGenType type, int dimID);
- void enableWorldGenForDimension( WorldGenType type, int dimID );
+ boolean isWorldGenEnabled(WorldGenType type, World w);
- void disableWorldGenForDimension( WorldGenType type, int dimID );
-
- boolean isWorldGenEnabled( WorldGenType type, World w );
-
- enum WorldGenType
- {
- CertusQuartz, ChargedCertusQuartz, Meteorites
- }
+ enum WorldGenType { CertusQuartz, ChargedCertusQuartz, Meteorites }
}
diff --git a/src/api/java/appeng/api/features/InscriberProcessType.java b/src/api/java/appeng/api/features/InscriberProcessType.java
index 70aaa9f7..bf505861 100644
--- a/src/api/java/appeng/api/features/InscriberProcessType.java
+++ b/src/api/java/appeng/api/features/InscriberProcessType.java
@@ -1,15 +1,13 @@
package appeng.api.features;
+public enum InscriberProcessType {
+ /**
+ * uses the optionals as catalyst
+ */
+ Inscribe,
-public enum InscriberProcessType
-{
- /**
- * uses the optionals as catalyst
- */
- Inscribe,
-
- /**
- * spends the optionals
- */
- Press
+ /**
+ * spends the optionals
+ */
+ Press
}
diff --git a/src/api/java/appeng/api/implementations/ICraftingPatternItem.java b/src/api/java/appeng/api/implementations/ICraftingPatternItem.java
index 132a5ef0..a0f0acd5 100644
--- a/src/api/java/appeng/api/implementations/ICraftingPatternItem.java
+++ b/src/api/java/appeng/api/implementations/ICraftingPatternItem.java
@@ -23,25 +23,21 @@
package appeng.api.implementations;
-
import appeng.api.networking.crafting.ICraftingPatternDetails;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
-
/**
* Implemented on {@link Item}
*/
-public interface ICraftingPatternItem
-{
-
- /**
- * Access Details about a pattern
- *
- * @param is pattern
- * @param w crafting world
- * @return details of pattern
- */
- ICraftingPatternDetails getPatternForItem( ItemStack is, World w );
+public interface ICraftingPatternItem {
+ /**
+ * Access Details about a pattern
+ *
+ * @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 ee558792..d718b8a1 100644
--- a/src/api/java/appeng/api/implementations/IPowerChannelState.java
+++ b/src/api/java/appeng/api/implementations/IPowerChannelState.java
@@ -23,20 +23,17 @@
package appeng.api.implementations;
-
/**
* This is intended for use on the client side to provide details to WAILA.
*/
-public interface IPowerChannelState
-{
+public interface IPowerChannelState {
+ /**
+ * @return true if the part/tile is powered.
+ */
+ boolean isPowered();
- /**
- * @return true if the part/tile is powered.
- */
- boolean isPowered();
-
- /**
- * @return true if the part/tile isActive
- */
- boolean isActive();
+ /**
+ * @return true if the part/tile isActive
+ */
+ boolean isActive();
}
diff --git a/src/api/java/appeng/api/implementations/IUpgradeableHost.java b/src/api/java/appeng/api/implementations/IUpgradeableHost.java
index 7abc93f9..b7f1d1c9 100644
--- a/src/api/java/appeng/api/implementations/IUpgradeableHost.java
+++ b/src/api/java/appeng/api/implementations/IUpgradeableHost.java
@@ -23,25 +23,21 @@
package appeng.api.implementations;
-
import appeng.api.config.Upgrades;
import appeng.api.implementations.tiles.ISegmentedInventory;
import appeng.api.util.IConfigurableObject;
import net.minecraft.tileentity.TileEntity;
+public interface IUpgradeableHost extends IConfigurableObject, ISegmentedInventory {
+ /**
+ * determine how many of an upgrade are installed.
+ */
+ int getInstalledUpgrades(Upgrades u);
-public interface IUpgradeableHost extends IConfigurableObject, ISegmentedInventory
-{
-
- /**
- * determine how many of an upgrade are installed.
- */
- int getInstalledUpgrades( Upgrades u );
-
- /**
- * the tile...
- *
- * @return tile entity
- */
- TileEntity getTile();
+ /**
+ * the tile...
+ *
+ * @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 9eec763e..b8335777 100644
--- a/src/api/java/appeng/api/implementations/TransitionResult.java
+++ b/src/api/java/appeng/api/implementations/TransitionResult.java
@@ -23,19 +23,16 @@
package appeng.api.implementations;
-
/**
* Defines the result of performing a transition from the world into a storage
* cell, if its possible, and what the energy usage is.
*/
-public class TransitionResult
-{
- public final boolean success;
- public final double energyUsage;
+public class TransitionResult {
+ public final boolean success;
+ public final double energyUsage;
- public TransitionResult( final boolean _success, final double power )
- {
- this.success = _success;
- this.energyUsage = power;
- }
+ public TransitionResult(final boolean _success, final double power) {
+ this.success = _success;
+ this.energyUsage = power;
+ }
}
diff --git a/src/api/java/appeng/api/implementations/guiobjects/IGuiItem.java b/src/api/java/appeng/api/implementations/guiobjects/IGuiItem.java
index 269eea2a..499df409 100644
--- a/src/api/java/appeng/api/implementations/guiobjects/IGuiItem.java
+++ b/src/api/java/appeng/api/implementations/guiobjects/IGuiItem.java
@@ -23,17 +23,13 @@
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 );
+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 34218739..7b43ce9f 100644
--- a/src/api/java/appeng/api/implementations/guiobjects/IGuiItemObject.java
+++ b/src/api/java/appeng/api/implementations/guiobjects/IGuiItemObject.java
@@ -23,12 +23,8 @@
package appeng.api.implementations.guiobjects;
-
import net.minecraft.item.ItemStack;
-
-public interface IGuiItemObject
-{
-
- ItemStack getItemStack();
+public interface IGuiItemObject {
+ 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 931b5234..a0ae2b3c 100644
--- a/src/api/java/appeng/api/implementations/guiobjects/INetworkTool.java
+++ b/src/api/java/appeng/api/implementations/guiobjects/INetworkTool.java
@@ -23,16 +23,12 @@
package appeng.api.implementations.guiobjects;
-
import appeng.api.networking.IGridHost;
import net.minecraft.inventory.IInventory;
-
/**
* Obtained via {@link IGuiItem} getGuiObject
*/
-public interface INetworkTool extends IInventory, IGuiItemObject
-{
-
- IGridHost getGridHost(); // null for most purposes.
+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 7a80a00b..b7c9d127 100644
--- a/src/api/java/appeng/api/implementations/guiobjects/IPortableCell.java
+++ b/src/api/java/appeng/api/implementations/guiobjects/IPortableCell.java
@@ -23,17 +23,13 @@
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
* AE's Memory Card Item Class implements this interface.
*/
-public interface IMemoryCard
-{
+public interface IMemoryCard {
+ /**
+ * Configures the data stored on the memory card, the SettingsName, will be
+ * localized when displayed.
+ *
+ * @param is item
+ * @param SettingsName unlocalized string that represents the tile entity.
+ * @param data may contain a String called "tooltip" which is is a
+ * unlocalized string displayed after the settings name, optional
+ * but can be used to add details to the card for later.
+ */
+ void setMemoryCardContents(ItemStack is, String SettingsName, NBTTagCompound data);
- /**
- * Configures the data stored on the memory card, the SettingsName, will be
- * localized when displayed.
- *
- * @param is item
- * @param SettingsName unlocalized string that represents the tile entity.
- * @param data may contain a String called "tooltip" which is is a
- * unlocalized string displayed after the settings name, optional
- * but can be used to add details to the card for later.
- */
- void setMemoryCardContents( ItemStack is, String SettingsName, NBTTagCompound data );
+ /**
+ * 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 item
+ * @return setting name
+ */
+ String getSettingsName(ItemStack is);
- /**
- * 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 item
- * @return setting name
- */
- String getSettingsName( ItemStack is );
+ /**
+ * @param is item
+ * @return the NBT Data previously saved by setMemoryCardContents, or an
+ * empty NBTCompound
+ */
+ NBTTagCompound getData(ItemStack is);
- /**
- * @param is item
- * @return the NBT Data previously saved by setMemoryCardContents, or an
- * empty NBTCompound
- */
- NBTTagCompound getData( ItemStack is );
-
- /**
- * notify the user of a outcome related to the memory card.
- *
- * @param player that used the card.
- * @param msg which message to send.
- */
- void notifyUser( EntityPlayer player, MemoryCardMessages msg );
+ /**
+ * notify the user of a outcome related to the memory card.
+ *
+ * @param player that used the card.
+ * @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 c84fc67a..f782f7fb 100644
--- a/src/api/java/appeng/api/implementations/items/ISpatialStorageCell.java
+++ b/src/api/java/appeng/api/implementations/items/ISpatialStorageCell.java
@@ -23,71 +23,69 @@
package appeng.api.implementations.items;
-
import appeng.api.implementations.TransitionResult;
import appeng.api.util.WorldCoord;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
-
/**
* Implemented on a {@link Item}
*/
-public interface ISpatialStorageCell
-{
+public interface ISpatialStorageCell {
+ /**
+ * @param is spatial storage cell
+ * @return true if this item is a spatial storage cell
+ */
+ boolean isSpatialStorage(ItemStack is);
- /**
- * @param is spatial storage cell
- * @return true if this item is a spatial storage cell
- */
- boolean isSpatialStorage( ItemStack 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 spatial storage cell
- * @return the maximum size of the spatial storage cell along any given axis
- */
- int getMaxStoredDim( ItemStack is );
+ /**
+ * @param is spatial storage cell
+ * @return the world for this cell
+ */
+ World getWorld(ItemStack is);
- /**
- * @param is spatial storage cell
- * @return the world for this cell
- */
- World getWorld( ItemStack is );
+ /**
+ * get the currently stored size.
+ *
+ * @param is spatial storage cell
+ * @return size of spatial
+ */
+ WorldCoord getStoredSize(ItemStack is);
- /**
- * get the currently stored size.
- *
- * @param is spatial storage cell
- * @return size of spatial
- */
- WorldCoord getStoredSize( ItemStack is );
+ /**
+ * Minimum coordinates in its world for the storage cell.
+ *
+ * @param is spatial storage cell
+ * @return minimum coordinate of dimension
+ */
+ WorldCoord getMin(ItemStack is);
- /**
- * Minimum coordinates in its world for the storage cell.
- *
- * @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 spatial storage cell
+ * @return maximum coordinate of dimension
+ */
+ WorldCoord getMax(ItemStack is);
- /**
- * Maximum coordinates in its world for the storage cell.
- *
- * @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 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 );
+ /**
+ * Perform a spatial swap with the contents of the cell, and the world.
+ *
+ * @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
+ );
}
\ No newline at end of file
diff --git a/src/api/java/appeng/api/implementations/items/IStorageCell.java b/src/api/java/appeng/api/implementations/items/IStorageCell.java
index 4dd8ceb2..62ef8a2e 100644
--- a/src/api/java/appeng/api/implementations/items/IStorageCell.java
+++ b/src/api/java/appeng/api/implementations/items/IStorageCell.java
@@ -23,12 +23,10 @@
package appeng.api.implementations.items;
-
import appeng.api.storage.ICellWorkbenchItem;
import appeng.api.storage.data.IAEItemStack;
import net.minecraft.item.ItemStack;
-
/**
* Any item which implements this can be treated as an IMEInventory via
* Util.getCell / Util.isCell It automatically handles the internals and NBT
@@ -39,78 +37,76 @@ import net.minecraft.item.ItemStack;
*
* The standard AE implementation only provides 1-63 Types
*/
-public interface IStorageCell extends ICellWorkbenchItem
-{
+public interface IStorageCell extends ICellWorkbenchItem {
+ /**
+ * It wont work if the return is not a multiple of 8.
+ * The limit is ({@link Integer#MAX_VALUE} + 1) / 8.
+ *
+ * @param cellItem item
+ * @return number of bytes
+ */
+ int getBytes(ItemStack cellItem);
- /**
- * It wont work if the return is not a multiple of 8.
- * The limit is ({@link Integer#MAX_VALUE} + 1) / 8.
- *
- * @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 item
+ * @return number of bytes
+ * @deprecated use {@link IStorageCell#getBytesPerType(ItemStack)}
+ */
+ @Deprecated
+ int BytePerType(ItemStack cellItem);
- /**
- * Determines the number of bytes used for any type included on the cell.
- *
- * @param cellItem item
- * @return number of bytes
- * @deprecated use {@link IStorageCell#getBytesPerType(ItemStack)}
- */
- @Deprecated
- int BytePerType( ItemStack cellItem );
+ /**
+ * Determines the number of bytes used for any type included on the cell.
+ *
+ * @param cellItem item
+ * @return number of bytes
+ */
+ int getBytesPerType(ItemStack cellItem);
- /**
- * Determines the number of bytes used for any type included on the cell.
- *
- * @param cellItem item
- * @return number of bytes
- */
- int getBytesPerType( ItemStack cellItem );
+ /**
+ * Must be between 1 and 63, indicates how many types you want to store on
+ * the item.
+ *
+ * @param cellItem item
+ * @return number of types
+ */
+ int getTotalTypes(ItemStack cellItem);
- /**
- * Must be between 1 and 63, indicates how many types you want to store on
- * the item.
- *
- * @param cellItem item
- * @return number of types
- */
- int getTotalTypes( ItemStack cellItem );
+ /**
+ * Allows you to fine tune which items are allowed on a given cell, if you
+ * 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 item
+ * @param requestedAddition requested addition
+ * @return true to preventAdditionOfItem
+ */
+ boolean isBlackListed(ItemStack cellItem, IAEItemStack requestedAddition);
- /**
- * Allows you to fine tune which items are allowed on a given cell, if you
- * 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 item
- * @param requestedAddition requested addition
- * @return true to preventAdditionOfItem
- */
- boolean isBlackListed( ItemStack cellItem, IAEItemStack requestedAddition );
+ /**
+ * Allows you to specify if this storage cell can be stored inside other
+ * storage cells, only set this for special items like the matter cannon
+ * that are not general purpose storage.
+ *
+ * @return true if the storage cell can be stored inside other storage
+ * cells, this is generally false, except for certain situations
+ * such as the matter cannon.
+ */
+ boolean storableInStorageCell();
- /**
- * Allows you to specify if this storage cell can be stored inside other
- * storage cells, only set this for special items like the matter cannon
- * that are not general purpose storage.
- *
- * @return true if the storage cell can be stored inside other storage
- * cells, this is generally false, except for certain situations
- * such as the matter cannon.
- */
- boolean storableInStorageCell();
+ /**
+ * Allows an item to selectively enable or disable its status as a storage
+ * cell.
+ *
+ * @param i item
+ * @return if the ItemStack should behavior as a storage cell.
+ */
+ boolean isStorageCell(ItemStack i);
- /**
- * Allows an item to selectively enable or disable its status as a storage
- * cell.
- *
- * @param i item
- * @return if the ItemStack should behavior as a storage cell.
- */
- boolean isStorageCell( ItemStack i );
-
- /**
- * @return drain in ae/t this storage cell will use.
- */
- double getIdleDrain();
+ /**
+ * @return drain in ae/t this storage cell will use.
+ */
+ double getIdleDrain();
}
diff --git a/src/api/java/appeng/api/implementations/items/IStorageComponent.java b/src/api/java/appeng/api/implementations/items/IStorageComponent.java
index 8a1f1f58..99e13e60 100644
--- a/src/api/java/appeng/api/implementations/items/IStorageComponent.java
+++ b/src/api/java/appeng/api/implementations/items/IStorageComponent.java
@@ -23,32 +23,28 @@
package appeng.api.implementations.items;
-
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
-
/**
* Implemented on a {@link Item}
*/
-public interface IStorageComponent
-{
+public interface IStorageComponent {
+ /**
+ * This isn't necessarily the same as if you make a storage cell out of it,
+ * but all of AE's default cells do it that way, its currently only used for
+ * the condenser.
+ *
+ * @param is item
+ * @return number of bytes
+ */
+ int getBytes(ItemStack is);
- /**
- * This isn't necessarily the same as if you make a storage cell out of it,
- * but all of AE's default cells do it that way, its currently only used for
- * the condenser.
- *
- * @param is item
- * @return number of bytes
- */
- int getBytes( ItemStack is );
-
- /**
- * Just true or false for the item stack.
- *
- * @param is item
- * @return true if item is a storage component
- */
- boolean isStorageComponent( ItemStack is );
+ /**
+ * Just true or false for the item stack.
+ *
+ * @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 1ee3c32b..911d0f95 100644
--- a/src/api/java/appeng/api/implementations/items/IUpgradeModule.java
+++ b/src/api/java/appeng/api/implementations/items/IUpgradeModule.java
@@ -23,17 +23,13 @@
package appeng.api.implementations.items;
-
import appeng.api.config.Upgrades;
import net.minecraft.item.ItemStack;
-
-public interface IUpgradeModule
-{
-
- /**
- * @param itemstack item with potential upgrades
- * @return null, or a valid upgrade type.
- */
- Upgrades getType( ItemStack itemstack );
+public interface IUpgradeModule {
+ /**
+ * @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/items/MemoryCardMessages.java b/src/api/java/appeng/api/implementations/items/MemoryCardMessages.java
index 01621314..cca2b33e 100644
--- a/src/api/java/appeng/api/implementations/items/MemoryCardMessages.java
+++ b/src/api/java/appeng/api/implementations/items/MemoryCardMessages.java
@@ -23,11 +23,12 @@
package appeng.api.implementations.items;
-
/**
* Status Results for use with {@link IMemoryCard}
*/
-public enum MemoryCardMessages
-{
- INVALID_MACHINE, SETTINGS_LOADED, SETTINGS_SAVED, SETTINGS_CLEARED
+public enum MemoryCardMessages {
+ INVALID_MACHINE,
+ SETTINGS_LOADED,
+ SETTINGS_SAVED,
+ SETTINGS_CLEARED
}
diff --git a/src/api/java/appeng/api/implementations/parts/IPartCable.java b/src/api/java/appeng/api/implementations/parts/IPartCable.java
index 0ffceb44..75555c54 100644
--- a/src/api/java/appeng/api/implementations/parts/IPartCable.java
+++ b/src/api/java/appeng/api/implementations/parts/IPartCable.java
@@ -23,6 +23,7 @@
package appeng.api.implementations.parts;
+import java.util.EnumSet;
import appeng.api.networking.IGridHost;
import appeng.api.parts.BusSupport;
@@ -33,53 +34,50 @@ 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}.UNKNOWN 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
-{
+public interface IPartCable extends IPart, IGridHost {
+ /**
+ * does this cable support buses?
+ */
+ BusSupport supportsBuses();
- /**
- * does this cable support buses?
- */
- BusSupport supportsBuses();
+ /**
+ * @return the current color of the cable.
+ */
+ AEColor getCableColor();
- /**
- * @return the current color of the cable.
- */
- AEColor getCableColor();
+ /**
+ * @return the Cable type.
+ */
+ AECableType getCableConnectionType();
- /**
- * @return the Cable type.
- */
- AECableType getCableConnectionType();
+ /**
+ * Change the color of the cable, this should cost a small amount of dye, or
+ * something.
+ *
+ * @param newColor new color
+ * @return if the color change was successful.
+ */
+ boolean changeColor(AEColor newColor, EntityPlayer who);
- /**
- * Change the color of the cable, this should cost a small amount of dye, or something.
- *
- * @param newColor new color
- * @return if the color change was successful.
- */
- boolean changeColor( AEColor newColor, EntityPlayer who );
+ /**
+ * Change sides on the cables node.
+ *
+ * Called by AE, do not invoke.
+ *
+ * @param sides sides of cable
+ */
+ void setValidSides(EnumSet
- * Called by AE, do not invoke.
- *
- * @param sides sides of cable
- */
- void setValidSides( EnumSet
+ * 1 - green,
+ *
+ * 2 - orange,
+ *
+ * 3 - red
+ *
+ * @param slot slot index
+ * @return status of the slot, one of the above indices.
+ */
+ int getCellStatus(int slot);
- /**
- * @return how many slots are available. Chest has 1, Drive has 10.
- */
- int getCellCount();
+ /**
+ * @return if the device is online you should check this before providing any other
+ * information.
+ */
+ boolean isPowered();
- /**
- * 0 - cell is missing.
- *
- * 1 - green,
- *
- * 2 - orange,
- *
- * 3 - red
- *
- * @param slot slot index
- * @return status of the slot, one of the above indices.
- */
- int getCellStatus( int slot );
-
- /**
- * @return if the device is online you should check this before providing any other information.
- */
- boolean isPowered();
-
- /**
- * @param slot slot index
- * @return is the cell currently blinking to show activity.
- */
- boolean isCellBlinking( int 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/IColorableTile.java b/src/api/java/appeng/api/implementations/tiles/IColorableTile.java
index 469c00d2..bec59b02 100644
--- a/src/api/java/appeng/api/implementations/tiles/IColorableTile.java
+++ b/src/api/java/appeng/api/implementations/tiles/IColorableTile.java
@@ -23,16 +23,12 @@
package appeng.api.implementations.tiles;
-
import appeng.api.util.AEColor;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.common.util.ForgeDirection;
+public interface IColorableTile {
+ AEColor getColor();
-public interface IColorableTile
-{
-
- AEColor getColor();
-
- boolean recolourBlock( ForgeDirection side, AEColor colour, EntityPlayer who );
+ boolean recolourBlock(ForgeDirection side, AEColor colour, EntityPlayer who);
}
diff --git a/src/api/java/appeng/api/implementations/tiles/ICraftingMachine.java b/src/api/java/appeng/api/implementations/tiles/ICraftingMachine.java
index 0a4c9b99..d533d895 100644
--- a/src/api/java/appeng/api/implementations/tiles/ICraftingMachine.java
+++ b/src/api/java/appeng/api/implementations/tiles/ICraftingMachine.java
@@ -23,30 +23,31 @@
package appeng.api.implementations.tiles;
-
import appeng.api.networking.crafting.ICraftingPatternDetails;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraftforge.common.util.ForgeDirection;
+public interface ICraftingMachine {
+ /**
+ * inserts a crafting plan, and the necessary items into the crafting machine.
+ *
+ * @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
+ );
-public interface ICraftingMachine
-{
-
- /**
- * inserts a crafting plan, and the necessary items into the crafting machine.
- *
- * @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 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.
- */
- boolean acceptsPlans();
+ /**
+ * 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.
+ */
+ boolean acceptsPlans();
}
diff --git a/src/api/java/appeng/api/implementations/tiles/ICrankable.java b/src/api/java/appeng/api/implementations/tiles/ICrankable.java
index 37bb2e95..7ec6e05e 100644
--- a/src/api/java/appeng/api/implementations/tiles/ICrankable.java
+++ b/src/api/java/appeng/api/implementations/tiles/ICrankable.java
@@ -23,10 +23,8 @@
package appeng.api.implementations.tiles;
-
import net.minecraftforge.common.util.ForgeDirection;
-
/**
* Crank/Crankable API,
*
@@ -37,23 +35,21 @@ import net.minecraftforge.common.util.ForgeDirection;
*
* This interface must be implemented by a tile entity.
*/
-public interface ICrankable
-{
+public interface ICrankable {
+ /**
+ * Test if the crank can turn, return false if there is no work to be done.
+ *
+ * @return if crank should be allowed to turn.
+ */
+ boolean canTurn();
- /**
- * Test if the crank can turn, return false if there is no work to be done.
- *
- * @return if crank should be allowed to turn.
- */
- boolean canTurn();
+ /**
+ * The crank has completed one turn.
+ */
+ void applyTurn();
- /**
- * The crank has completed one turn.
- */
- void applyTurn();
-
- /**
- * @return true if the crank can attach on the given side.
- */
- boolean canCrankAttach( ForgeDirection directionToCrank );
+ /**
+ * @return true if the crank can attach on the given side.
+ */
+ boolean canCrankAttach(ForgeDirection directionToCrank);
}
diff --git a/src/api/java/appeng/api/implementations/tiles/ICrystalGrowthAccelerator.java b/src/api/java/appeng/api/implementations/tiles/ICrystalGrowthAccelerator.java
index 9d8a9c29..6b3af644 100644
--- a/src/api/java/appeng/api/implementations/tiles/ICrystalGrowthAccelerator.java
+++ b/src/api/java/appeng/api/implementations/tiles/ICrystalGrowthAccelerator.java
@@ -23,9 +23,6 @@
package appeng.api.implementations.tiles;
-
-public interface ICrystalGrowthAccelerator
-{
-
- boolean isPowered();
+public interface ICrystalGrowthAccelerator {
+ boolean isPowered();
}
diff --git a/src/api/java/appeng/api/implementations/tiles/IMEChest.java b/src/api/java/appeng/api/implementations/tiles/IMEChest.java
index bbe957a9..a5f74bf7 100644
--- a/src/api/java/appeng/api/implementations/tiles/IMEChest.java
+++ b/src/api/java/appeng/api/implementations/tiles/IMEChest.java
@@ -23,11 +23,6 @@
package appeng.api.implementations.tiles;
-
import appeng.api.networking.energy.IEnergySource;
-
-public interface IMEChest extends IChestOrDrive, ITileStorageMonitorable, IEnergySource
-{
-
-}
+public interface IMEChest extends IChestOrDrive, ITileStorageMonitorable, IEnergySource {}
diff --git a/src/api/java/appeng/api/implementations/tiles/ISegmentedInventory.java b/src/api/java/appeng/api/implementations/tiles/ISegmentedInventory.java
index 401516c2..2aec19d3 100644
--- a/src/api/java/appeng/api/implementations/tiles/ISegmentedInventory.java
+++ b/src/api/java/appeng/api/implementations/tiles/ISegmentedInventory.java
@@ -23,19 +23,16 @@
package appeng.api.implementations.tiles;
-
import net.minecraft.inventory.IInventory;
-
-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 inventory name
- * @return inventory with inventory name
- */
- IInventory getInventoryByName( String name );
+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 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 b84135a4..44c1683d 100644
--- a/src/api/java/appeng/api/implementations/tiles/ITileStorageMonitorable.java
+++ b/src/api/java/appeng/api/implementations/tiles/ITileStorageMonitorable.java
@@ -23,17 +23,14 @@
package appeng.api.implementations.tiles;
-
import appeng.api.networking.security.BaseActionSource;
import appeng.api.storage.IStorageMonitorable;
import net.minecraftforge.common.util.ForgeDirection;
-
/**
- * Implemented on inventories that can share their inventories with other networks, best example, ME Interface.
+ * Implemented on inventories that can share their inventories with other networks, best
+ * example, ME Interface.
*/
-public interface ITileStorageMonitorable
-{
-
- IStorageMonitorable getMonitorable( ForgeDirection side, BaseActionSource src );
+public interface ITileStorageMonitorable {
+ IStorageMonitorable getMonitorable(ForgeDirection side, BaseActionSource src);
}
diff --git a/src/api/java/appeng/api/implementations/tiles/IViewCellStorage.java b/src/api/java/appeng/api/implementations/tiles/IViewCellStorage.java
index 4a81ae12..39332e16 100644
--- a/src/api/java/appeng/api/implementations/tiles/IViewCellStorage.java
+++ b/src/api/java/appeng/api/implementations/tiles/IViewCellStorage.java
@@ -23,17 +23,13 @@
package appeng.api.implementations.tiles;
-
import net.minecraft.inventory.IInventory;
-
-public interface IViewCellStorage
-{
-
- /**
- * should contains at least 5 slot, the first 5
- *
- * @return inventory with at least 5 slot
- */
- IInventory getViewCellStorage();
+public interface IViewCellStorage {
+ /**
+ * should contains at least 5 slot, the first 5
+ *
+ * @return inventory with at least 5 slot
+ */
+ IInventory getViewCellStorage();
}
diff --git a/src/api/java/appeng/api/implementations/tiles/IWirelessAccessPoint.java b/src/api/java/appeng/api/implementations/tiles/IWirelessAccessPoint.java
index 038bc52d..cfd2c880 100644
--- a/src/api/java/appeng/api/implementations/tiles/IWirelessAccessPoint.java
+++ b/src/api/java/appeng/api/implementations/tiles/IWirelessAccessPoint.java
@@ -23,32 +23,28 @@
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();
-public interface IWirelessAccessPoint extends IActionHost
-{
+ /**
+ * @return max range for this WAP
+ */
+ double getRange();
- /**
- * @return location of WAP
- */
- DimensionalCoord getLocation();
+ /**
+ * @return can you use this WAP?
+ */
+ boolean isActive();
- /**
- * @return max range for this WAP
- */
- double getRange();
-
- /**
- * @return can you use this WAP?
- */
- boolean isActive();
-
- /**
- * @return grid of linked WAP
- */
- IGrid getGrid();
+ /**
+ * @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 73bffa23..f0138153 100644
--- a/src/api/java/appeng/api/integration/IBeeComparison.java
+++ b/src/api/java/appeng/api/integration/IBeeComparison.java
@@ -23,7 +23,6 @@
package appeng.api.integration;
-
/**
* An interface to get access to the individual settings for AE's Internal Bee
* Comparison handler.
@@ -33,11 +32,10 @@ package appeng.api.integration;
*
* 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();
+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 ae9bbd6b..d67411c3 100644
--- a/src/api/java/appeng/api/movable/IMovableHandler.java
+++ b/src/api/java/appeng/api/movable/IMovableHandler.java
@@ -23,46 +23,42 @@
package appeng.api.movable;
-
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
+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 tile entity class
+ * @param tile tile entity
+ * @return true if it can handle moving
+ */
+ boolean canHandle(Class extends TileEntity> myClass, TileEntity tile);
-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 tile entity class
- * @param tile tile entity
- * @return true if it can handle moving
- */
- boolean canHandle( Class extends TileEntity> myClass, TileEntity tile );
-
- /**
- * request that the handler move the the tile from its current location to
- * the new one. the tile has already been invalidated, and the blocks have
- * already been fully moved.
- *
- * Potential Example:
- *
- *
+ * Potential Example:
+ *
+ *
+ * Used to determine if a tile is marked as movable, a block will be considered movable,
+ * if...
* 1. The Tile or its super classes have been white listed with whiteListTileEntity.
*
- * 2. The Tile has been register with the IMC ( which basically calls whiteListTileEntity. )
+ * 2. The Tile has been register with the IMC ( which basically calls whiteListTileEntity.
+ * )
+ * 3. The Tile implements IMovableTile 4. A IMovableHandler is register that returns
+ * canHandle = true for the Tile Entity Class IMC Example:
+ * FMLInterModComms.sendMessage( "appliedenergistics2", "movabletile",
+ * "appeng.common.AppEngTile" ); The movement process is as follows,
+ * 1. IMovableTile.prepareToMove() or TileEntity.invalidate() depending on your opt-in
+ * method. 2. The tile will be removed from the world. 3. Its world, coordinates will be
+ * changed. *** this can be overridden with a IMovableHandler
+ * *** 4. It will then be re-added to the world, or a new world. 5.
+ * TileEntity.validate() 6. IMovableTile.doneMoving ( if you implemented IMovableTile )
*
- * 3. The Tile implements IMovableTile 4. A IMovableHandler is register that returns canHandle = true for the Tile
- * Entity Class
- *
- * IMC Example: FMLInterModComms.sendMessage( "appliedenergistics2", "movabletile", "appeng.common.AppEngTile" );
- *
- * The movement process is as follows,
- *
- * 1. IMovableTile.prepareToMove() or TileEntity.invalidate() depending on your opt-in method. 2. The tile will be
- * removed from the world. 3. Its world, coordinates will be changed. *** this can be overridden with a IMovableHandler
- * *** 4. It will then be re-added to the world, or a new world. 5. TileEntity.validate() 6. IMovableTile.doneMoving (
- * if you implemented IMovableTile )
- *
- * Please note, this is a 100% white list only feature, I will never opt in any non-vanilla, non-AE blocks. If you do
- * not want to support your tiles being moved, you don't have to do anything.
- *
- * I appreciate anyone that takes the effort to get their tiles to work with this system to create a better use
- * experience.
- *
- * If you need a build of deobf build of AE for testing, do not hesitate to ask.
+ * Please note, this is a 100% white list only feature, I will never opt in any
+ * non-vanilla, non-AE blocks. If you do not want to support your tiles being moved, you
+ * don't have to do anything. I appreciate anyone that takes the effort to get their
+ * tiles to work with this system to create a better use experience. If you need a
+ * build of deobf build of AE for testing, do not hesitate to ask.
*/
-public interface IMovableRegistry
-{
+public interface IMovableRegistry {
+ /**
+ * Black list a block from movement, please only use this to prevent exploits.
+ *
+ * You can also use the IMC, FMLInterModComms.sendMessage( "appliedenergistics2",
+ * "whitelist-spatial", "appeng.common.AppEngTile" );
+ *
+ * @param blk block
+ */
+ void blacklistBlock(Block blk);
- /**
- * Black list a block from movement, please only use this to prevent exploits.
- *
- * You can also use the IMC, FMLInterModComms.sendMessage( "appliedenergistics2", "whitelist-spatial",
- * "appeng.common.AppEngTile" );
- *
- * @param blk block
- */
- void blacklistBlock( Block blk );
+ /**
+ * White list your tile entity with the registry.
+ *
+ * You can also use the IMC, FMLInterModComms.sendMessage( "appliedenergistics2",
+ * "blacklist-block-spatial", new ItemStack(...) ); If you tile is handled with
+ * IMovableHandler or IMovableTile you do not need to white list it.
+ */
+ void whiteListTileEntity(Class extends TileEntity> c);
- /**
- * White list your tile entity with the registry.
- *
- * You can also use the IMC, FMLInterModComms.sendMessage( "appliedenergistics2", "blacklist-block-spatial", new
- * ItemStack(...) );
- *
- * If you tile is handled with IMovableHandler or IMovableTile you do not need to white list it.
- */
- void whiteListTileEntity( Class extends TileEntity> c );
+ /**
+ * @param te to be moved tile entity
+ * @return true if the tile has accepted your request to move it
+ */
+ boolean askToMove(TileEntity te);
- /**
- * @param te to be moved tile entity
- * @return true if the tile has accepted your request to move it
- */
- boolean askToMove( TileEntity te );
+ /**
+ * tells the tile you are done moving it.
+ *
+ * @param te moved tile entity
+ */
+ void doneMoving(TileEntity te);
- /**
- * tells the tile you are done moving it.
- *
- * @param te moved tile entity
- */
- void doneMoving( TileEntity te );
+ /**
+ * add a new handler movable handler.
+ *
+ * @param handler moving handler
+ */
+ void addHandler(IMovableHandler handler);
- /**
- * add a new handler movable handler.
- *
- * @param handler moving handler
- */
- void addHandler( IMovableHandler handler );
+ /**
+ * handlers are used to perform movement, this allows you to override AE's internal
+ * version. only valid after askToMove(...) = true
+ *
+ * @param te tile entity
+ * @return moving handler of tile entity
+ */
+ IMovableHandler getHandler(TileEntity te);
- /**
- * handlers are used to perform movement, this allows you to override AE's internal version.
- *
- * only valid after askToMove(...) = true
- *
- * @param te tile entity
- * @return moving handler of tile entity
- */
- IMovableHandler getHandler( TileEntity te );
+ /**
+ * @return a copy of the default handler
+ */
+ IMovableHandler getDefaultHandler();
- /**
- * @return a copy of the default handler
- */
- IMovableHandler getDefaultHandler();
-
- /**
- * @param blk block
- * @return true if this block is blacklisted
- */
- boolean isBlacklisted( Block blk );
+ /**
+ * @param blk block
+ * @return true if this block is blacklisted
+ */
+ boolean isBlacklisted(Block blk);
}
\ No newline at end of file
diff --git a/src/api/java/appeng/api/movable/IMovableTile.java b/src/api/java/appeng/api/movable/IMovableTile.java
index feaaff28..efbee9cf 100644
--- a/src/api/java/appeng/api/movable/IMovableTile.java
+++ b/src/api/java/appeng/api/movable/IMovableTile.java
@@ -23,24 +23,21 @@
package appeng.api.movable;
-
/**
* You can implement this, or use the IMovableRegistry to white list your tile,
* please see the registry for more information.
*/
-public interface IMovableTile
-{
+public interface IMovableTile {
+ /**
+ * notification that your block will be moved, called instead of invalidate,
+ * return false to prevent movement.
+ *
+ * @return false to prevent movement
+ */
+ boolean prepareToMove();
- /**
- * notification that your block will be moved, called instead of invalidate,
- * return false to prevent movement.
- *
- * @return false to prevent movement
- */
- boolean prepareToMove();
-
- /**
- * notification that your block was moved, called after validate.
- */
- void doneMoving();
+ /**
+ * notification that your block was moved, called after validate.
+ */
+ void doneMoving();
}
diff --git a/src/api/java/appeng/api/networking/GridFlags.java b/src/api/java/appeng/api/networking/GridFlags.java
index b698fb93..f7e0d9cd 100644
--- a/src/api/java/appeng/api/networking/GridFlags.java
+++ b/src/api/java/appeng/api/networking/GridFlags.java
@@ -23,47 +23,46 @@
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,
+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,
+ /**
+ * P2P ME tunnels use this setting.
+ */
+ COMPRESSED_CHANNEL,
- /**
- * cannot carry channels over this node.
- */
- CANNOT_CARRY,
+ /**
+ * cannot carry channels over this node.
+ */
+ CANNOT_CARRY,
- /**
- * Used by P2P Tunnels to prevent tunnels from tunneling recursively.
- */
- CANNOT_CARRY_COMPRESSED,
+ /**
+ * 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 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,
+ /**
+ * 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
+ /**
+ * 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 b53188d7..99f0d42c 100644
--- a/src/api/java/appeng/api/networking/GridNotification.java
+++ b/src/api/java/appeng/api/networking/GridNotification.java
@@ -23,11 +23,9 @@
package appeng.api.networking;
-
-public enum GridNotification
-{
- /**
- * the visible connections for this node have changed, useful for cable.
- */
- ConnectionsChanged,
+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 8cd6ffaf..da3a96ec 100644
--- a/src/api/java/appeng/api/networking/IGrid.java
+++ b/src/api/java/appeng/api/networking/IGrid.java
@@ -23,71 +23,68 @@
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
-{
+public interface IGrid {
+ /**
+ * Get Access to various grid modules
+ *
+ * @param iface face
+ * @return the IGridCache you requested.
+ */
+
* Implement for use with IGridHost
*/
-public interface IGridBlock
-{
+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();
- /**
- * 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
+ * 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);
- /**
- * 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);
- /**
- * 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 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 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 );
+ /**
+ * 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 b5547632..aaf92e66 100644
--- a/src/api/java/appeng/api/networking/IGridCacheRegistry.java
+++ b/src/api/java/appeng/api/networking/IGridCacheRegistry.java
@@ -23,28 +23,28 @@
package appeng.api.networking;
-
import java.util.HashMap;
-
/**
* A registry of grid caches to extend grid functionality.
*/
-public interface IGridCacheRegistry
-{
+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 extends IGridCache> iface, Class extends IGridCache> implementation
+ );
- /**
- * Register a new grid cache for use during operation, must be called during the loading phase.
- *
- * @param iface grid cache class
- */
- void registerGridCache( Class extends IGridCache> iface, Class extends IGridCache> 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
- * 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.
+ * 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
-{
+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);
- /**
- * 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);
- /**
- * 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();
- /**
- * 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 A
- */
- IGridNode a();
+ /**
+ * @return node B
+ */
+ IGridNode b();
- /**
- * @return node B
- */
- IGridNode b();
+ /**
+ * @return if the connection is invisible this returns false
+ */
+ boolean hasDirection();
- /**
- * @return if the connection is invisible this returns false
- */
- boolean hasDirection();
-
- /**
- * @return how many channels pass over this connections.
- */
- int getUsedChannels();
+ /**
+ * @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/IGridConnectionVisitor.java b/src/api/java/appeng/api/networking/IGridConnectionVisitor.java
index 1842589e..5e562a5f 100644
--- a/src/api/java/appeng/api/networking/IGridConnectionVisitor.java
+++ b/src/api/java/appeng/api/networking/IGridConnectionVisitor.java
@@ -23,14 +23,11 @@
package appeng.api.networking;
-
-public interface IGridConnectionVisitor extends IGridVisitor
-{
-
- /**
- * Called for each connection on the network.
- *
- * @param n the connection.
- */
- void visitConnection( IGridConnection n );
+public interface IGridConnectionVisitor extends IGridVisitor {
+ /**
+ * Called for each connection on the network.
+ *
+ * @param n the connection.
+ */
+ void visitConnection(IGridConnection n);
}
diff --git a/src/api/java/appeng/api/networking/IGridHost.java b/src/api/java/appeng/api/networking/IGridHost.java
index dfe67a11..c8279e10 100644
--- a/src/api/java/appeng/api/networking/IGridHost.java
+++ b/src/api/java/appeng/api/networking/IGridHost.java
@@ -23,42 +23,38 @@
package appeng.api.networking;
-
import appeng.api.parts.IPart;
import appeng.api.util.AECableType;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
-
/**
* 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
-{
+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 )
+ */
+ IGridNode getGridNode(ForgeDirection dir);
- /**
- * 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 )
- */
- IGridNode getGridNode( ForgeDirection dir );
+ /**
+ * Determines how cables render when they connect to this block. Priority is
+ * Smart > Covered > Glass
+ *
+ * @param dir direction
+ */
+ AECableType getCableConnectionType(ForgeDirection dir);
- /**
- * Determines how cables render when they connect to this block. Priority is
- * Smart > Covered > Glass
- *
- * @param dir direction
- */
- AECableType getCableConnectionType( ForgeDirection dir );
-
- /**
- * break this host, its violating security rules, just break your block, or part.
- */
- void securityBreak();
+ /**
+ * break this host, its violating security rules, just break your block, or part.
+ */
+ void securityBreak();
}
diff --git a/src/api/java/appeng/api/networking/IGridMultiblock.java b/src/api/java/appeng/api/networking/IGridMultiblock.java
index 7c3844bb..753e2f1f 100644
--- a/src/api/java/appeng/api/networking/IGridMultiblock.java
+++ b/src/api/java/appeng/api/networking/IGridMultiblock.java
@@ -23,22 +23,21 @@
package appeng.api.networking;
-
import java.util.Iterator;
-
/**
- * An extension of IGridBlock, only means something when your getFlags() contains REQUIRE_CHANNEL, when done properly it
- * will call the method to get a list of all related nodes and give each of them a channel simultaneously for the entire
- * set. This means your entire Multiblock can work with a single channel, instead of one channel per block.
+ * An extension of IGridBlock, only means something when your getFlags() contains
+ * REQUIRE_CHANNEL, when done properly it will call the method to get a list of all
+ * related nodes and give each of them a channel simultaneously for the entire set. This
+ * means your entire Multiblock can work with a single channel, instead of one channel per
+ * block.
*/
-public interface IGridMultiblock extends IGridBlock
-{
-
- /**
- * Used to acquire a list of all nodes that are part of the multiblock.
- *
- * @return an iterator that will iterate all the nodes for the multiblock. ( read-only iterator expected. )
- */
- Iterator
@@ -40,122 +38,121 @@ import java.util.EnumSet;
*
* Don't Implement; Acquire from {@link IAppEngApi}.createGridNode
*/
-public interface IGridNode
-{
+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);
- /**
- * 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();
- /**
- * 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 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();
- /**
- * 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();
- /**
- * 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 the world the node is located in
- */
- World getWorld();
+ /**
+ * @return a set of the connected sides, UNKNOWN represents an invisible connection
+ */
+ EnumSet
+ * 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 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);
- /**
- * 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();
- /**
- * @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);
- /**
- * see if this node has a certain flag
- *
- * @param flag flags
- * @return true if has flag
- */
- boolean hasFlag( GridFlags flag );
+ /**
+ * @return the ownerID this represents the person who placed the node.
+ */
+ int getPlayerID();
- /**
- * @return the ownerID this represents the person who placed the node.
- */
- int getPlayerID();
-
- /**
- * 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 );
+ /**
+ * 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);
}
\ No newline at end of file
diff --git a/src/api/java/appeng/api/networking/IGridStorage.java b/src/api/java/appeng/api/networking/IGridStorage.java
index 0f9e9b7b..ed2b73bd 100644
--- a/src/api/java/appeng/api/networking/IGridStorage.java
+++ b/src/api/java/appeng/api/networking/IGridStorage.java
@@ -23,20 +23,16 @@
package appeng.api.networking;
-
import net.minecraft.nbt.NBTTagCompound;
+public interface IGridStorage {
+ /**
+ * @return an NBTTagCompound that can be read, and written too.
+ */
+ NBTTagCompound dataObject();
-public interface IGridStorage
-{
-
- /**
- * @return an NBTTagCompound that can be read, and written too.
- */
- NBTTagCompound dataObject();
-
- /**
- * @return the id for this grid storage object, used internally
- */
- long getID();
+ /**
+ * @return the id for this grid storage object, used internally
+ */
+ long getID();
}
diff --git a/src/api/java/appeng/api/networking/IGridVisitor.java b/src/api/java/appeng/api/networking/IGridVisitor.java
index ca693496..7e4eeddf 100644
--- a/src/api/java/appeng/api/networking/IGridVisitor.java
+++ b/src/api/java/appeng/api/networking/IGridVisitor.java
@@ -23,20 +23,18 @@
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.
- */
- boolean visitNode( IGridNode n );
+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.
+ */
+ boolean visitNode(IGridNode n);
}
diff --git a/src/api/java/appeng/api/networking/IMachineSet.java b/src/api/java/appeng/api/networking/IMachineSet.java
index 7d57b52c..6d83f0cf 100644
--- a/src/api/java/appeng/api/networking/IMachineSet.java
+++ b/src/api/java/appeng/api/networking/IMachineSet.java
@@ -23,15 +23,11 @@
package appeng.api.networking;
-
import appeng.api.util.IReadOnlyCollection;
-
-public interface IMachineSet extends IReadOnlyCollection
* caching this INSTANCE will increase performance of validation and checks.
*/
-public interface ICraftingPatternDetails
-{
+public interface ICraftingPatternDetails {
+ /**
+ * @return source item.
+ */
+ ItemStack getPattern();
- /**
- * @return source item.
- */
- ItemStack getPattern();
+ /**
+ * @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.
+ */
+ boolean isValidItemForSlot(int slotIndex, ItemStack itemStack, World 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.
- */
- boolean isValidItemForSlot( int slotIndex, ItemStack itemStack, World world );
+ /**
+ * @return if this pattern is a crafting pattern ( work bench )
+ */
+ boolean isCraftable();
- /**
- * @return if this pattern is a crafting pattern ( work bench )
- */
- boolean isCraftable();
+ /**
+ * @return a list of the inputs, will include nulls.
+ */
+ IAEItemStack[] getInputs();
- /**
- * @return a list of the inputs, will include nulls.
- */
- IAEItemStack[] getInputs();
+ /**
+ * @return a list of the inputs, will be clean
+ */
+ IAEItemStack[] getCondensedInputs();
- /**
- * @return a list of the inputs, will be clean
- */
- IAEItemStack[] getCondensedInputs();
+ /**
+ * @return a list of the outputs, will be clean
+ */
+ IAEItemStack[] getCondensedOutputs();
- /**
- * @return a list of the outputs, will be clean
- */
- IAEItemStack[] getCondensedOutputs();
+ /**
+ * @return a list of the outputs, will include nulls.
+ */
+ IAEItemStack[] getOutputs();
- /**
- * @return a list of the outputs, will include nulls.
- */
- IAEItemStack[] getOutputs();
+ /**
+ * @return if this pattern is enabled to support substitutions.
+ */
+ boolean canSubstitute();
- /**
- * @return if this pattern is enabled to support substitutions.
- */
- boolean canSubstitute();
+ /**
+ * Allow using this INSTANCE of the pattern details to preform the crafting action
+ * with performance enhancements.
+ *
+ * @param craftingInv inventory
+ * @param world crafting world
+ * @return the crafted ( work bench ) item.
+ */
+ ItemStack getOutput(InventoryCrafting craftingInv, World world);
- /**
- * Allow using this INSTANCE of the pattern details to preform the crafting action with performance enhancements.
- *
- * @param craftingInv inventory
- * @param world crafting world
- * @return the crafted ( work bench ) item.
- */
- ItemStack getOutput( InventoryCrafting craftingInv, World world );
+ /**
+ * Get the priority of this pattern
+ *
+ * @return the priority of this pattern
+ */
+ int getPriority();
- /**
- * Get the priority of this pattern
- *
- * @return the priority of this pattern
- */
- int getPriority();
-
- /**
- * Set the priority the of this pattern.
- *
- * @param priority priority of pattern
- */
- void setPriority( int priority );
+ /**
+ * Set the priority the of this pattern.
+ *
+ * @param priority priority of pattern
+ */
+ void setPriority(int priority);
}
diff --git a/src/api/java/appeng/api/networking/crafting/ICraftingProvider.java b/src/api/java/appeng/api/networking/crafting/ICraftingProvider.java
index 79f89d44..d7bf22f1 100644
--- a/src/api/java/appeng/api/networking/crafting/ICraftingProvider.java
+++ b/src/api/java/appeng/api/networking/crafting/ICraftingProvider.java
@@ -23,21 +23,17 @@
package appeng.api.networking.crafting;
-
import appeng.api.networking.events.MENetworkCraftingPatternChange;
-
/**
- * Allows a IGridHost to provide crafting patterns to the network, post a {@link MENetworkCraftingPatternChange} to tell
- * AE2 to update.
+ * Allows a IGridHost to provide crafting patterns to the network, post a {@link
+ * MENetworkCraftingPatternChange} to tell AE2 to update.
*/
-public interface ICraftingProvider extends ICraftingMedium
-{
-
- /**
- * called when the network is looking for possible crafting jobs.
- *
- * @param craftingTracker crafting helper
- */
- void provideCrafting( ICraftingProviderHelper craftingTracker );
+public interface ICraftingProvider extends ICraftingMedium {
+ /**
+ * called when the network is looking for possible crafting jobs.
+ *
+ * @param craftingTracker crafting helper
+ */
+ void provideCrafting(ICraftingProviderHelper craftingTracker);
}
diff --git a/src/api/java/appeng/api/networking/crafting/ICraftingProviderHelper.java b/src/api/java/appeng/api/networking/crafting/ICraftingProviderHelper.java
index ba666de9..096eb9bd 100644
--- a/src/api/java/appeng/api/networking/crafting/ICraftingProviderHelper.java
+++ b/src/api/java/appeng/api/networking/crafting/ICraftingProviderHelper.java
@@ -23,23 +23,19 @@
package appeng.api.networking.crafting;
-
import appeng.api.storage.data.IAEItemStack;
-
/**
* Passed to a ICraftingProvider as a interface to manipulate the available crafting jobs.
*/
-public interface ICraftingProviderHelper
-{
+public interface ICraftingProviderHelper {
+ /**
+ * Add new Pattern to AE's crafting cache.
+ */
+ void addCraftingOption(ICraftingMedium medium, ICraftingPatternDetails api);
- /**
- * Add new Pattern to AE's crafting cache.
- */
- void addCraftingOption( ICraftingMedium medium, ICraftingPatternDetails api );
-
- /**
- * Set an item can Emitable
- */
- void setEmitable( IAEItemStack what );
+ /**
+ * Set an item can Emitable
+ */
+ void setEmitable(IAEItemStack what);
}
diff --git a/src/api/java/appeng/api/networking/crafting/ICraftingRequester.java b/src/api/java/appeng/api/networking/crafting/ICraftingRequester.java
index 414d3eed..e4703558 100644
--- a/src/api/java/appeng/api/networking/crafting/ICraftingRequester.java
+++ b/src/api/java/appeng/api/networking/crafting/ICraftingRequester.java
@@ -23,38 +23,35 @@
package appeng.api.networking.crafting;
-
import appeng.api.config.Actionable;
import appeng.api.networking.security.IActionHost;
import appeng.api.storage.data.IAEItemStack;
import com.google.common.collect.ImmutableSet;
+public interface ICraftingRequester extends IActionHost {
+ /**
+ * called when the host is added to the grid, and should return all crafting links it
+ * poses so they can be connected with the cpu that hosts the job.
+ *
+ * @return set of jobs, or an empty list.
+ */
+ ImmutableSet
- * after this call the crafting link is "dead" and should be discarded.
- */
- void jobStateChange( ICraftingLink link );
+ /**
+ * called when the job changes from in progress, to either complete, or canceled.
+ *
+ * after this call the crafting link is "dead" and should be discarded.
+ */
+ void jobStateChange(ICraftingLink link);
}
diff --git a/src/api/java/appeng/api/networking/crafting/ICraftingWatcher.java b/src/api/java/appeng/api/networking/crafting/ICraftingWatcher.java
index 080d36d9..3f413253 100644
--- a/src/api/java/appeng/api/networking/crafting/ICraftingWatcher.java
+++ b/src/api/java/appeng/api/networking/crafting/ICraftingWatcher.java
@@ -23,13 +23,8 @@
package appeng.api.networking.crafting;
+import java.util.Collection;
import appeng.api.storage.data.IAEStack;
-import java.util.Collection;
-
-
-public interface ICraftingWatcher extends Collection
+ * {@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.
+ */
+ boolean isNetworkPowered();
- /**
- * 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.
- */
- 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.
+ */
+ double injectPower(double amt, Actionable mode);
- /**
- * 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.
- */
- double injectPower( double amt, Actionable mode );
+ /**
+ * this is should be considered an estimate, and not relied upon for real
+ * calculations.
+ *
+ * @return estimated available power.
+ */
+ double getStoredPower();
- /**
- * this is should be considered an estimate, and not relied upon for real calculations.
- *
- * @return estimated available power.
- */
- double getStoredPower();
+ /**
+ * this is should be considered an estimate, and not relied upon for real
+ * calculations.
+ *
+ * @return estimated available power.
+ */
+ double getMaxStoredPower();
- /**
- * 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.
- */
- double getEnergyDemand( double maxRequired );
+ /**
+ * 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.
+ */
+ 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 1714fa81..c6f9ed3b 100644
--- a/src/api/java/appeng/api/networking/energy/IEnergyGridProvider.java
+++ b/src/api/java/appeng/api/networking/energy/IEnergyGridProvider.java
@@ -23,29 +23,26 @@
package appeng.api.networking.energy;
-
-import appeng.api.config.Actionable;
-
import java.util.Set;
+import appeng.api.config.Actionable;
/**
* internal use only.
*/
-public interface IEnergyGridProvider
-{
- /**
- * internal use only
- */
- double extractAEPower( double amt, Actionable mode, Set
* Note: Most machines just need to check {@link IGridNode}.isActive()
*/
-public class MENetworkBootingStatusChange extends MENetworkEvent
-{
-
-}
+public class MENetworkBootingStatusChange extends MENetworkEvent {}
diff --git a/src/api/java/appeng/api/networking/events/MENetworkCellArrayUpdate.java b/src/api/java/appeng/api/networking/events/MENetworkCellArrayUpdate.java
index 7fce5b45..8c4372a2 100644
--- a/src/api/java/appeng/api/networking/events/MENetworkCellArrayUpdate.java
+++ b/src/api/java/appeng/api/networking/events/MENetworkCellArrayUpdate.java
@@ -23,7 +23,6 @@
package appeng.api.networking.events;
-
/**
* Posted by storage devices to inform AE to refresh its storage structure.
*
@@ -33,7 +32,4 @@ package appeng.api.networking.events;
* you do not need to send this event when your node is added / removed from the
* grid.
*/
-public class MENetworkCellArrayUpdate extends MENetworkEvent
-{
-
-}
+public class MENetworkCellArrayUpdate extends MENetworkEvent {}
diff --git a/src/api/java/appeng/api/networking/events/MENetworkChannelChanged.java b/src/api/java/appeng/api/networking/events/MENetworkChannelChanged.java
index b8663114..4423c144 100644
--- a/src/api/java/appeng/api/networking/events/MENetworkChannelChanged.java
+++ b/src/api/java/appeng/api/networking/events/MENetworkChannelChanged.java
@@ -23,21 +23,16 @@
package appeng.api.networking.events;
-
import appeng.api.networking.IGridNode;
-
/**
- * Posted by storage devices to inform AE the channel cache that the included node has changed its mind about its
- * channel requirements.
+ * 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
-{
+public class MENetworkChannelChanged extends MENetworkEvent {
+ public final IGridNode node;
- public final IGridNode node;
-
- public MENetworkChannelChanged( final IGridNode n )
- {
- this.node = n;
- }
+ public MENetworkChannelChanged(final IGridNode n) {
+ this.node = n;
+ }
}
diff --git a/src/api/java/appeng/api/networking/events/MENetworkChannelsChanged.java b/src/api/java/appeng/api/networking/events/MENetworkChannelsChanged.java
index 722b7902..966433ff 100644
--- a/src/api/java/appeng/api/networking/events/MENetworkChannelsChanged.java
+++ b/src/api/java/appeng/api/networking/events/MENetworkChannelsChanged.java
@@ -23,16 +23,11 @@
package appeng.api.networking.events;
-
import appeng.api.networking.IGridHost;
-
/**
* Posted to the {@link IGridHost} when the channels on the node connections are altered.
*
* Never posted IGridCaches.
*/
-public class MENetworkChannelsChanged extends MENetworkEvent
-{
-
-}
+public class MENetworkChannelsChanged extends MENetworkEvent {}
diff --git a/src/api/java/appeng/api/networking/events/MENetworkControllerChange.java b/src/api/java/appeng/api/networking/events/MENetworkControllerChange.java
index 040a3d4a..b2ec9a12 100644
--- a/src/api/java/appeng/api/networking/events/MENetworkControllerChange.java
+++ b/src/api/java/appeng/api/networking/events/MENetworkControllerChange.java
@@ -23,13 +23,9 @@
package appeng.api.networking.events;
-
/**
* Event posted when the networks controller state changes, this can be from no
* controller to 1 controller, or any time the network changes from conflicted
* to not conflicted.
*/
-public class MENetworkControllerChange extends MENetworkEvent
-{
-
-}
+public class MENetworkControllerChange extends MENetworkEvent {}
diff --git a/src/api/java/appeng/api/networking/events/MENetworkCraftingCpuChange.java b/src/api/java/appeng/api/networking/events/MENetworkCraftingCpuChange.java
index 4a92e28c..4a648f9d 100644
--- a/src/api/java/appeng/api/networking/events/MENetworkCraftingCpuChange.java
+++ b/src/api/java/appeng/api/networking/events/MENetworkCraftingCpuChange.java
@@ -23,17 +23,12 @@
package appeng.api.networking.events;
-
import appeng.api.networking.IGridNode;
+public class MENetworkCraftingCpuChange extends MENetworkEvent {
+ public final IGridNode node;
-public class MENetworkCraftingCpuChange extends MENetworkEvent
-{
-
- public final IGridNode node;
-
- public MENetworkCraftingCpuChange( final IGridNode n )
- {
- this.node = n;
- }
+ public MENetworkCraftingCpuChange(final IGridNode n) {
+ this.node = n;
+ }
}
diff --git a/src/api/java/appeng/api/networking/events/MENetworkCraftingPatternChange.java b/src/api/java/appeng/api/networking/events/MENetworkCraftingPatternChange.java
index 77b6a2e3..5f2ddcf6 100644
--- a/src/api/java/appeng/api/networking/events/MENetworkCraftingPatternChange.java
+++ b/src/api/java/appeng/api/networking/events/MENetworkCraftingPatternChange.java
@@ -23,20 +23,15 @@
package appeng.api.networking.events;
-
import appeng.api.networking.IGridNode;
import appeng.api.networking.crafting.ICraftingProvider;
+public class MENetworkCraftingPatternChange extends MENetworkEvent {
+ public final ICraftingProvider provider;
+ public final IGridNode node;
-public class MENetworkCraftingPatternChange extends MENetworkEvent
-{
-
- public final ICraftingProvider provider;
- public final IGridNode node;
-
- public MENetworkCraftingPatternChange( final ICraftingProvider p, final IGridNode n )
- {
- this.provider = p;
- this.node = n;
- }
+ public MENetworkCraftingPatternChange(final ICraftingProvider p, final IGridNode n) {
+ this.provider = p;
+ this.node = n;
+ }
}
diff --git a/src/api/java/appeng/api/networking/events/MENetworkEvent.java b/src/api/java/appeng/api/networking/events/MENetworkEvent.java
index f40b183a..f9d56c1e 100644
--- a/src/api/java/appeng/api/networking/events/MENetworkEvent.java
+++ b/src/api/java/appeng/api/networking/events/MENetworkEvent.java
@@ -23,56 +23,48 @@
package appeng.api.networking.events;
-
import appeng.api.networking.IGrid;
-
/**
* Part of AE's Event Bus.
*
* Posted via {@link IGrid}.postEvent or {@link IGrid}.postEventTo
*/
-public class MENetworkEvent
-{
+public class MENetworkEvent {
+ private int visited = 0;
+ private boolean canceled = false;
- private int visited = 0;
- private boolean canceled = false;
+ /**
+ * Call to prevent AE from posting the event to any further objects.
+ */
+ public void cancel() {
+ this.canceled = true;
+ }
- /**
- * Call to prevent AE from posting the event to any further objects.
- */
- public void cancel()
- {
- this.canceled = true;
- }
+ /**
+ * called by AE after each object is called to cancel any future calls.
+ *
+ * @return true to cancel future calls
+ */
+ public boolean isCanceled() {
+ return this.canceled;
+ }
- /**
- * called by AE after each object is called to cancel any future calls.
- *
- * @return true to cancel future calls
- */
- public boolean isCanceled()
- {
- return this.canceled;
- }
+ /**
+ * the number of objects that were visited by the event.
+ *
+ * @return number of visitors
+ */
+ public int getVisitedObjects() {
+ return this.visited;
+ }
- /**
- * the number of objects that were visited by the event.
- *
- * @return number of visitors
- */
- public int getVisitedObjects()
- {
- return this.visited;
- }
-
- /**
- * Called by AE after iterating the event subscribers.
- *
- * @param v current number of visitors
- */
- public void setVisitedObjects( final int v )
- {
- this.visited = v;
- }
+ /**
+ * Called by AE after iterating the event subscribers.
+ *
+ * @param v current number of visitors
+ */
+ public void setVisitedObjects(final int v) {
+ this.visited = v;
+ }
}
diff --git a/src/api/java/appeng/api/networking/events/MENetworkEventSubscribe.java b/src/api/java/appeng/api/networking/events/MENetworkEventSubscribe.java
index c66e69b6..48d679a7 100644
--- a/src/api/java/appeng/api/networking/events/MENetworkEventSubscribe.java
+++ b/src/api/java/appeng/api/networking/events/MENetworkEventSubscribe.java
@@ -23,19 +23,14 @@
package appeng.api.networking.events;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
import appeng.api.networking.IGridCache;
import appeng.api.networking.IGridHost;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-
/**
* Usable on any {@link IGridHost}, or {@link IGridCache}
*/
-@Retention( RetentionPolicy.RUNTIME )
-public @interface MENetworkEventSubscribe
-{
-
-}
+@Retention(RetentionPolicy.RUNTIME)
+public @interface MENetworkEventSubscribe {}
diff --git a/src/api/java/appeng/api/networking/events/MENetworkPostCacheConstruction.java b/src/api/java/appeng/api/networking/events/MENetworkPostCacheConstruction.java
index 1fddaa8a..7f5727ea 100644
--- a/src/api/java/appeng/api/networking/events/MENetworkPostCacheConstruction.java
+++ b/src/api/java/appeng/api/networking/events/MENetworkPostCacheConstruction.java
@@ -23,12 +23,8 @@
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
-{
-
-}
+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 85915e84..1380c206 100644
--- a/src/api/java/appeng/api/networking/events/MENetworkPowerIdleChange.java
+++ b/src/api/java/appeng/api/networking/events/MENetworkPowerIdleChange.java
@@ -23,10 +23,8 @@
package appeng.api.networking.events;
-
import appeng.api.networking.IGridNode;
-
/**
* 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
@@ -34,13 +32,10 @@ import appeng.api.networking.IGridNode;
*
* you do not need to send this event when your node is added / removed from the grid.
*/
-public class MENetworkPowerIdleChange extends MENetworkEvent
-{
+public class MENetworkPowerIdleChange extends MENetworkEvent {
+ public final IGridNode node;
- public final IGridNode node;
-
- public MENetworkPowerIdleChange( final IGridNode nodeThatChanged )
- {
- this.node = nodeThatChanged;
- }
+ public MENetworkPowerIdleChange(final IGridNode nodeThatChanged) {
+ this.node = nodeThatChanged;
+ }
}
diff --git a/src/api/java/appeng/api/networking/events/MENetworkPowerStatusChange.java b/src/api/java/appeng/api/networking/events/MENetworkPowerStatusChange.java
index a2d2d163..6d4e1e25 100644
--- a/src/api/java/appeng/api/networking/events/MENetworkPowerStatusChange.java
+++ b/src/api/java/appeng/api/networking/events/MENetworkPowerStatusChange.java
@@ -23,11 +23,9 @@
package appeng.api.networking.events;
-
import appeng.api.networking.IGridNode;
import appeng.api.networking.energy.IEnergyGrid;
-
/**
* Posted by the network when the power status of the network goes up or down,
* the change is reflected via the {@link IEnergyGrid}.isNetworkPowered() or via
@@ -35,7 +33,4 @@ import appeng.api.networking.energy.IEnergyGrid;
*
* Note: Most machines just need to check {@link IGridNode}.isActive()
*/
-public class MENetworkPowerStatusChange extends MENetworkEvent
-{
-
-}
+public class MENetworkPowerStatusChange extends MENetworkEvent {}
diff --git a/src/api/java/appeng/api/networking/events/MENetworkPowerStorage.java b/src/api/java/appeng/api/networking/events/MENetworkPowerStorage.java
index c97c05f3..c12ffa79 100644
--- a/src/api/java/appeng/api/networking/events/MENetworkPowerStorage.java
+++ b/src/api/java/appeng/api/networking/events/MENetworkPowerStorage.java
@@ -23,10 +23,8 @@
package appeng.api.networking.events;
-
import appeng.api.networking.energy.IAEPowerStorage;
-
/**
* informs the network, that a {@link IAEPowerStorage} block that had either run,
* out of power, or was full, is no longer in that state.
@@ -36,28 +34,24 @@ import appeng.api.networking.energy.IAEPowerStorage;
*
* you do not need to send this event when your node is added / removed from the grid.
*/
-public class MENetworkPowerStorage extends MENetworkEvent
-{
+public class MENetworkPowerStorage extends MENetworkEvent {
+ public final IAEPowerStorage storage;
+ public final PowerEventType type;
- public final IAEPowerStorage storage;
- public final PowerEventType type;
+ public MENetworkPowerStorage(final IAEPowerStorage t, final PowerEventType y) {
+ this.storage = t;
+ this.type = y;
+ }
- public MENetworkPowerStorage( final IAEPowerStorage t, final PowerEventType y )
- {
- this.storage = t;
- this.type = y;
- }
+ public enum PowerEventType {
+ /**
+ * informs the network this tile is ready to receive power again.
+ */
+ REQUEST_POWER,
- public enum PowerEventType
- {
- /**
- * informs the network this tile is ready to receive power again.
- */
- REQUEST_POWER,
-
- /**
- * informs the network this tile is ready to provide power again.
- */
- PROVIDE_POWER
- }
+ /**
+ * informs the network this tile is ready to provide power again.
+ */
+ PROVIDE_POWER
+ }
}
diff --git a/src/api/java/appeng/api/networking/events/MENetworkSecurityChange.java b/src/api/java/appeng/api/networking/events/MENetworkSecurityChange.java
index 968d8475..d2e7e036 100644
--- a/src/api/java/appeng/api/networking/events/MENetworkSecurityChange.java
+++ b/src/api/java/appeng/api/networking/events/MENetworkSecurityChange.java
@@ -23,11 +23,7 @@
package appeng.api.networking.events;
-
/**
* Posted by the security framework when permissions change
*/
-public class MENetworkSecurityChange extends MENetworkEvent
-{
-
-}
+public class MENetworkSecurityChange extends MENetworkEvent {}
diff --git a/src/api/java/appeng/api/networking/events/MENetworkSpatialEvent.java b/src/api/java/appeng/api/networking/events/MENetworkSpatialEvent.java
index ea666a12..0f9ca24f 100644
--- a/src/api/java/appeng/api/networking/events/MENetworkSpatialEvent.java
+++ b/src/api/java/appeng/api/networking/events/MENetworkSpatialEvent.java
@@ -23,25 +23,21 @@
package appeng.api.networking.events;
-
import appeng.api.networking.IGridHost;
-
/**
* An event that is posted whenever a spatial IO is active, called for IGridCache
*/
-public class MENetworkSpatialEvent extends MENetworkEvent
-{
- public final IGridHost host;
- public final double spatialEnergyUsage;
+public class MENetworkSpatialEvent extends MENetworkEvent {
+ public final IGridHost host;
+ public final double spatialEnergyUsage;
- /**
- * @param SpatialIO ( INSTANCE of the SpatialIO block )
- * @param EnergyUsage ( the amount of energy that the SpatialIO uses)
- */
- public MENetworkSpatialEvent( final IGridHost SpatialIO, final double EnergyUsage )
- {
- this.host = SpatialIO;
- this.spatialEnergyUsage = EnergyUsage;
- }
+ /**
+ * @param SpatialIO ( INSTANCE of the SpatialIO block )
+ * @param EnergyUsage ( the amount of energy that the SpatialIO uses)
+ */
+ public MENetworkSpatialEvent(final IGridHost SpatialIO, final double EnergyUsage) {
+ this.host = SpatialIO;
+ this.spatialEnergyUsage = EnergyUsage;
+ }
}
diff --git a/src/api/java/appeng/api/networking/events/MENetworkStorageEvent.java b/src/api/java/appeng/api/networking/events/MENetworkStorageEvent.java
index a919da07..050414b4 100644
--- a/src/api/java/appeng/api/networking/events/MENetworkStorageEvent.java
+++ b/src/api/java/appeng/api/networking/events/MENetworkStorageEvent.java
@@ -23,28 +23,21 @@
package appeng.api.networking.events;
-
import appeng.api.storage.IMEMonitor;
import appeng.api.storage.StorageChannel;
-
/**
- * posted by the network when the networks Storage Changes, you can use the currentItems list to check levels, and
- * update status.
- *
- * this is the least useful method of getting info about changes in the network.
- *
- * Do not modify the list or its contents in anyway.
+ * posted by the network when the networks Storage Changes, you can use the currentItems
+ * list to check levels, and update status. this is the least useful method of getting
+ * info about changes in the network. Do not modify the list or its contents in
+ * anyway.
*/
-public class MENetworkStorageEvent extends MENetworkEvent
-{
+public class MENetworkStorageEvent extends MENetworkEvent {
+ public final IMEMonitor monitor;
+ public final StorageChannel channel;
- public final IMEMonitor monitor;
- public final StorageChannel channel;
-
- public MENetworkStorageEvent( final IMEMonitor o, final StorageChannel chan )
- {
- this.monitor = o;
- this.channel = chan;
- }
+ public MENetworkStorageEvent(final IMEMonitor o, final StorageChannel chan) {
+ this.monitor = o;
+ this.channel = chan;
+ }
}
diff --git a/src/api/java/appeng/api/networking/pathing/ControllerState.java b/src/api/java/appeng/api/networking/pathing/ControllerState.java
index c027d673..ede4d143 100644
--- a/src/api/java/appeng/api/networking/pathing/ControllerState.java
+++ b/src/api/java/appeng/api/networking/pathing/ControllerState.java
@@ -23,26 +23,24 @@
package appeng.api.networking.pathing;
+public enum ControllerState {
+ /**
+ * No controller blocks are present in the network.
+ */
+ NO_CONTROLLER,
-public enum ControllerState
-{
- /**
- * No controller blocks are present in the network.
- */
- NO_CONTROLLER,
+ /**
+ * Controller rules followed, booting enabled.
+ */
+ CONTROLLER_ONLINE,
- /**
- * Controller rules followed, booting enabled.
- */
- CONTROLLER_ONLINE,
+ /**
+ * Controller rules not followed, lock up while booting.
+ */
+ CONTROLLER_CONFLICT,
- /**
- * Controller rules not followed, lock up while booting.
- */
- CONTROLLER_CONFLICT,
-
- /**
- * Controller is online and has infinite channels
- */
- CONTROLLER_INFINITE
+ /**
+ * Controller is online and has infinite channels
+ */
+ CONTROLLER_INFINITE
}
diff --git a/src/api/java/appeng/api/networking/pathing/IPathingGrid.java b/src/api/java/appeng/api/networking/pathing/IPathingGrid.java
index f9a592ee..dd195bd4 100644
--- a/src/api/java/appeng/api/networking/pathing/IPathingGrid.java
+++ b/src/api/java/appeng/api/networking/pathing/IPathingGrid.java
@@ -23,26 +23,22 @@
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();
-public interface IPathingGrid extends IGridCache
-{
+ /**
+ * @return the controller state of the network, useful if you want to
+ * require a controller for a feature.
+ */
+ ControllerState getControllerState();
- /**
- * @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, path-finding and all.
- */
- void repath();
+ /**
+ * trigger a network reset, booting, path-finding and all.
+ */
+ void repath();
}
\ No newline at end of file
diff --git a/src/api/java/appeng/api/networking/security/BaseActionSource.java b/src/api/java/appeng/api/networking/security/BaseActionSource.java
index bfaa66a2..e0dbd61a 100644
--- a/src/api/java/appeng/api/networking/security/BaseActionSource.java
+++ b/src/api/java/appeng/api/networking/security/BaseActionSource.java
@@ -23,17 +23,12 @@
package appeng.api.networking.security;
+public class BaseActionSource {
+ public boolean isPlayer() {
+ return false;
+ }
-public class BaseActionSource
-{
-
- public boolean isPlayer()
- {
- return false;
- }
-
- public boolean isMachine()
- {
- return false;
- }
+ public boolean isMachine() {
+ return false;
+ }
}
diff --git a/src/api/java/appeng/api/networking/security/IActionHost.java b/src/api/java/appeng/api/networking/security/IActionHost.java
index 90c056d8..ada2f498 100644
--- a/src/api/java/appeng/api/networking/security/IActionHost.java
+++ b/src/api/java/appeng/api/networking/security/IActionHost.java
@@ -23,21 +23,17 @@
package appeng.api.networking.security;
-
import appeng.api.networking.IGridHost;
import appeng.api.networking.IGridNode;
-
-public interface IActionHost extends IGridHost
-{
-
- /**
- * Used to for calculating security rules, you must supply a node from your
- * IGridHost for the security test, this should be the primary node for the
- * machine, unless the action is preformed by a non primary node.
- *
- * @return the the gridnode that actions from this IGridHost are preformed
- * by.
- */
- IGridNode getActionableNode();
+public interface IActionHost extends IGridHost {
+ /**
+ * Used to for calculating security rules, you must supply a node from your
+ * IGridHost for the security test, this should be the primary node for the
+ * machine, unless the action is preformed by a non primary node.
+ *
+ * @return the the gridnode that actions from this IGridHost are preformed
+ * by.
+ */
+ IGridNode getActionableNode();
}
diff --git a/src/api/java/appeng/api/networking/security/ISecurityGrid.java b/src/api/java/appeng/api/networking/security/ISecurityGrid.java
index ef1d73d4..9db95573 100644
--- a/src/api/java/appeng/api/networking/security/ISecurityGrid.java
+++ b/src/api/java/appeng/api/networking/security/ISecurityGrid.java
@@ -23,40 +23,37 @@
package appeng.api.networking.security;
-
import appeng.api.config.SecurityPermissions;
import appeng.api.networking.IGridCache;
import net.minecraft.entity.player.EntityPlayer;
+public interface ISecurityGrid extends IGridCache {
+ /**
+ * @return true if a security provider is in the network ( and only 1 )
+ */
+ boolean isAvailable();
-public interface ISecurityGrid extends IGridCache
-{
+ /**
+ * Check if a player has permissions.
+ *
+ * @param player to be checked player
+ * @param perm checked permissions
+ * @return true if the player has permissions.
+ */
+ boolean hasPermission(EntityPlayer player, SecurityPermissions perm);
- /**
- * @return true if a security provider is in the network ( and only 1 )
- */
- boolean isAvailable();
+ /**
+ * Check if a player has permissions.
+ *
+ * @param playerID id of player
+ * @param perm checked permissions
+ * @return true if the player has permissions.
+ */
+ boolean hasPermission(int playerID, SecurityPermissions perm);
- /**
- * Check if a player has permissions.
- *
- * @param player to be checked player
- * @param perm checked permissions
- * @return true if the player has permissions.
- */
- boolean hasPermission( EntityPlayer player, SecurityPermissions perm );
-
- /**
- * Check if a player has permissions.
- *
- * @param playerID id of player
- * @param perm checked permissions
- * @return true if the player has permissions.
- */
- boolean hasPermission( int playerID, SecurityPermissions perm );
-
- /**
- * @return PlayerID of the admin, or owner, this is the person who placed the security block.
- */
- int getOwner();
+ /**
+ * @return PlayerID of the admin, or owner, this is the person who placed the security
+ * block.
+ */
+ int getOwner();
}
diff --git a/src/api/java/appeng/api/networking/security/ISecurityProvider.java b/src/api/java/appeng/api/networking/security/ISecurityProvider.java
index 8ff1a5fd..6a9661e1 100644
--- a/src/api/java/appeng/api/networking/security/ISecurityProvider.java
+++ b/src/api/java/appeng/api/networking/security/ISecurityProvider.java
@@ -23,40 +23,37 @@
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.
*/
-public interface ISecurityProvider
-{
+public interface ISecurityProvider {
+ /**
+ * used to represent the security key for the network, should be based on a unique
+ * timestamp.
+ *
+ * @return unique key.
+ */
+ long getSecurityKey();
- /**
- * used to represent the security key for the network, should be based on a unique timestamp.
- *
- * @return unique key.
- */
- long getSecurityKey();
+ /**
+ * Push permission data into security cache.
+ *
+ * @param playerPerms player permissions
+ */
+ void readPermissions(HashMap
+ * 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 extends IAEStack> input, BaseActionSource src
+ );
- /**
- * 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 extends IAEStack> 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);
- /**
- * 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 );
+ /**
+ * 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 10035323..15c6734a 100644
--- a/src/api/java/appeng/api/networking/ticking/IGridTickable.java
+++ b/src/api/java/appeng/api/networking/ticking/IGridTickable.java
@@ -23,54 +23,51 @@
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
-{
+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.
+ *
+ */
- /**
- * 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);
- /**
- * 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 );
+ /**
+ * 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 4a70a7fa..a3165047 100644
--- a/src/api/java/appeng/api/networking/ticking/ITickManager.java
+++ b/src/api/java/appeng/api/networking/ticking/ITickManager.java
@@ -23,40 +23,35 @@
package appeng.api.networking.ticking;
-
import appeng.api.networking.IGridCache;
import appeng.api.networking.IGridNode;
-
/**
* The network tick manager.
*/
-public interface ITickManager extends IGridCache
-{
+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);
- /**
- * 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);
- /**
- * 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 );
+ /**
+ * 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 35e83b92..a83f2fbd 100644
--- a/src/api/java/appeng/api/networking/ticking/TickRateModulation.java
+++ b/src/api/java/appeng/api/networking/ticking/TickRateModulation.java
@@ -23,36 +23,34 @@
package appeng.api.networking.ticking;
+public enum TickRateModulation {
+ /**
+ * same as idle, but also puts the node to sleep.
+ */
+ SLEEP,
-public enum TickRateModulation
-{
- /**
- * same as idle, but also puts the node to sleep.
- */
- SLEEP,
+ /**
+ * set tick rate to maximum.
+ */
+ IDLE,
- /**
- * set tick rate to maximum.
- */
- IDLE,
+ /**
+ * decrease the tick rate marginally.
+ */
+ SLOWER,
- /**
- * decrease the tick rate marginally.
- */
- SLOWER,
+ /**
+ * continue at current rate.
+ */
+ SAME,
- /**
- * continue at current rate.
- */
- SAME,
+ /**
+ * increase the tick rate marginally.
+ */
+ FASTER,
- /**
- * increase the tick rate marginally.
- */
- FASTER,
-
- /**
- * changes the tick rate to the minimum tick rate.
- */
- URGENT
+ /**
+ * 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 6d46e235..32da2595 100644
--- a/src/api/java/appeng/api/networking/ticking/TickingRequest.java
+++ b/src/api/java/appeng/api/networking/ticking/TickingRequest.java
@@ -23,48 +23,46 @@
package appeng.api.networking.ticking;
-
/**
* Describes how your tiles ticking is executed.
*/
-public class TickingRequest
-{
+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 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;
- /**
- * 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;
- /**
- * 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;
- /**
- * True only if you call {@link ITickManager}.alertDevice( IGridNode );
- */
- public final boolean canBeAlerted;
-
- public TickingRequest( final int min, final int max, final boolean sleep, final boolean alertable )
- {
- this.minTickRate = min;
- this.maxTickRate = max;
- this.isSleeping = sleep;
- this.canBeAlerted = alertable;
- }
+ public TickingRequest(
+ final int min, final int max, final boolean sleep, final boolean alertable
+ ) {
+ this.minTickRate = min;
+ this.maxTickRate = max;
+ this.isSleeping = sleep;
+ this.canBeAlerted = alertable;
+ }
}
diff --git a/src/api/java/appeng/api/package-info.java b/src/api/java/appeng/api/package-info.java
index 336bffbb..2a00b4b9 100644
--- a/src/api/java/appeng/api/package-info.java
+++ b/src/api/java/appeng/api/package-info.java
@@ -21,9 +21,11 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-@API( apiVersion = "@aeversion@", owner = "appliedenergistics2", provides = "appliedenergistics2|API" )
+@API(
+ apiVersion = "@aeversion@",
+ 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 03c54de4..3255ed9d 100644
--- a/src/api/java/appeng/api/parts/BusSupport.java
+++ b/src/api/java/appeng/api/parts/BusSupport.java
@@ -23,12 +23,10 @@
package appeng.api.parts;
+public enum BusSupport {
+ CABLE,
-public enum BusSupport
-{
- CABLE,
+ DENSE_CABLE,
- DENSE_CABLE,
-
- NO_PARTS
+ NO_PARTS
}
diff --git a/src/api/java/appeng/api/parts/CableRenderMode.java b/src/api/java/appeng/api/parts/CableRenderMode.java
index d9e80bfc..db524c1a 100644
--- a/src/api/java/appeng/api/parts/CableRenderMode.java
+++ b/src/api/java/appeng/api/parts/CableRenderMode.java
@@ -23,19 +23,16 @@
package appeng.api.parts;
+public enum CableRenderMode {
+ Standard(false),
-public enum CableRenderMode
-{
- Standard( false ),
+ CableView(true);
- CableView( true );
+ public final boolean transparentFacades;
+ public final boolean opaqueFacades;
- public final boolean transparentFacades;
- public final boolean opaqueFacades;
-
- CableRenderMode( final boolean hideFacades )
- {
- this.transparentFacades = hideFacades;
- this.opaqueFacades = !hideFacades;
- }
+ CableRenderMode(final boolean hideFacades) {
+ this.transparentFacades = hideFacades;
+ this.opaqueFacades = !hideFacades;
+ }
}
diff --git a/src/api/java/appeng/api/parts/IAlphaPassItem.java b/src/api/java/appeng/api/parts/IAlphaPassItem.java
index db20111d..4c2c3b0f 100644
--- a/src/api/java/appeng/api/parts/IAlphaPassItem.java
+++ b/src/api/java/appeng/api/parts/IAlphaPassItem.java
@@ -23,18 +23,15 @@
package appeng.api.parts;
-
import net.minecraft.item.ItemStack;
-
-public interface IAlphaPassItem
-{
-
- /**
- * Extend, and return true to enable a second pass for your parts in the bus rendering pipe line.
- *
- * @param is item
- * @return true to enable a second pass for your parts in the bus rendering pipe line.
- */
- boolean useAlphaPass( ItemStack is );
+public interface IAlphaPassItem {
+ /**
+ * Extend, and return true to enable a second pass for your parts in the bus rendering
+ * pipe line.
+ *
+ * @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 a03230ef..922312ba 100644
--- a/src/api/java/appeng/api/parts/IBoxProvider.java
+++ b/src/api/java/appeng/api/parts/IBoxProvider.java
@@ -23,14 +23,11 @@
package appeng.api.parts;
-
-public interface IBoxProvider
-{
-
- /**
- * add your collision information to the the list.
- *
- * @param boxes collision boxes
- */
- void getBoxes( IPartCollisionHelper boxes );
+public interface IBoxProvider {
+ /**
+ * add your collision information to the the list.
+ *
+ * @param boxes collision boxes
+ */
+ 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 c34d6d13..8bafcdf0 100644
--- a/src/api/java/appeng/api/parts/IFacadeContainer.java
+++ b/src/api/java/appeng/api/parts/IFacadeContainer.java
@@ -23,77 +23,73 @@
package appeng.api.parts;
+import java.io.IOException;
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
-{
+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);
- /**
- * 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);
- /**
- * 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);
- /**
- * @return the {@link IFacadePart} for a given side, or null.
- */
- IFacadePart getFacade( ForgeDirection s );
+ /**
+ * rotate the facades left.
+ */
+ void rotateLeft();
- /**
- * rotate the facades left.
- */
- void rotateLeft();
+ /**
+ * write nbt data
+ *
+ * @param data to be written data
+ */
+ void writeToNBT(NBTTagCompound data);
- /**
- * 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 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);
- /**
- * 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;
- /**
- * 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();
+ /**
+ * @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 37893802..4b4ef73c 100644
--- a/src/api/java/appeng/api/parts/IFacadePart.java
+++ b/src/api/java/appeng/api/parts/IFacadePart.java
@@ -23,7 +23,6 @@
package appeng.api.parts;
-
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.RenderBlocks;
@@ -33,69 +32,75 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.AxisAlignedBB;
import net.minecraftforge.common.util.ForgeDirection;
-
/**
* Used Internally.
*
* not intended for implementation.
*/
-public interface IFacadePart
-{
+public interface IFacadePart {
+ /**
+ * used to save the part.
+ */
+ ItemStack getItemStack();
- /**
- * 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);
- /**
- * 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.
- *
- * @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);
- /**
- * 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 side the facade is in
- */
- ForgeDirection getSide();
+ /**
+ * @return the box for the face of the facade
+ */
+ AxisAlignedBB getPrimaryBox();
- /**
- * @return the box for the face of the facade
- */
- AxisAlignedBB getPrimaryBox();
+ Item getItem();
- Item getItem();
+ int getItemDamage();
- int getItemDamage();
+ boolean notAEFacade();
- boolean notAEFacade();
+ void setThinFacades(boolean useThinFacades);
- void setThinFacades( boolean useThinFacades );
-
- boolean isTransparent();
+ 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 02e59753..67d503d1 100644
--- a/src/api/java/appeng/api/parts/IPart.java
+++ b/src/api/java/appeng/api/parts/IPart.java
@@ -23,6 +23,9 @@
package appeng.api.parts;
+import java.io.IOException;
+import java.util.List;
+import java.util.Random;
import appeng.api.networking.IGridNode;
import cpw.mods.fml.relauncher.Side;
@@ -40,250 +43,251 @@ import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
-import java.io.IOException;
-import java.util.List;
-import java.util.Random;
+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 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 item of part
+ */
+ ItemStack getItemStack(PartItemStack type);
+ /**
+ * render item form for inventory, or entity.
+ *
+ * GL Available
+ *
+ * @param rh helper
+ * @param renderer renderer
+ */
+ @SideOnly(Side.CLIENT)
+ void renderInventory(IPartRenderHelper rh, RenderBlocks renderer);
-public interface IPart extends IBoxProvider
-{
+ /**
+ * render world renderer ( preferred )
+ *
+ * GL is NOT Available
+ *
+ * @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);
- /**
- * 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 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 item of part
- */
- ItemStack getItemStack( PartItemStack type );
+ /**
+ * render TESR.
+ *
+ * GL Available
+ *
+ * @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
+ );
- /**
- * render item form for inventory, or entity.
- *
- * GL Available
- *
- * @param rh helper
- * @param renderer renderer
- */
- @SideOnly( Side.CLIENT )
- void renderInventory( IPartRenderHelper rh, RenderBlocks renderer );
+ /**
+ * @return the Block sheet icon used when rendering the breaking particles, return
+ * null to use the ItemStack
+ * texture.
+ */
+ @SideOnly(Side.CLIENT)
+ IIcon getBreakingTexture();
- /**
- * render world renderer ( preferred )
- *
- * GL is NOT Available
- *
- * @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 );
+ /**
+ * return true only if your part require dynamic rendering, must be consistent.
+ *
+ * @return true to enable renderDynamic
+ */
+ boolean requireDynamicRender();
- /**
- * render TESR.
- *
- * GL Available
- *
- * @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 if the bus has a solid side, and you can place random stuff on it like
+ * torches or levers
+ */
+ boolean isSolid();
- /**
- * @return the Block sheet icon used when rendering the breaking particles, return null to use the ItemStack
- * texture.
- */
- @SideOnly( Side.CLIENT )
- IIcon getBreakingTexture();
+ /**
+ * @return true if this part can connect to redstone ( also MFR Rednet )
+ */
+ boolean canConnectRedstone();
- /**
- * return true only if your part require dynamic rendering, must be consistent.
- *
- * @return true to enable renderDynamic
- */
- boolean requireDynamicRender();
+ /**
+ * 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 to be written nbt data
+ */
+ void writeToNBT(NBTTagCompound data);
- /**
- * @return if the bus has a solid side, and you can place random stuff on it like torches or levers
- */
- boolean isSolid();
+ /**
+ * Read the previously written NBT Data. this is the mirror for writeToNBT
+ *
+ * @param data to be read nbt data
+ */
+ void readFromNBT(NBTTagCompound data);
- /**
- * @return true if this part can connect to redstone ( also MFR Rednet )
- */
- boolean canConnectRedstone();
+ /**
+ * @return get the amount of light produced by the bus
+ */
+ int getLightLevel();
- /**
- * 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 to be written nbt data
- */
- void writeToNBT( NBTTagCompound data );
+ /**
+ * does this part act like a ladder?
+ *
+ * @param entity climbing entity
+ * @return true if entity can climb
+ */
+ boolean isLadder(EntityLivingBase entity);
- /**
- * Read the previously written NBT Data. this is the mirror for writeToNBT
- *
- * @param data to be read nbt data
- */
- void readFromNBT( NBTTagCompound data );
+ /**
+ * a block around the bus's host has been changed.
+ */
+ void onNeighborChanged();
- /**
- * @return get the amount of light produced by the bus
- */
- int getLightLevel();
+ /**
+ * @return output redstone on facing side
+ */
+ int isProvidingStrongPower();
- /**
- * does this part act like a ladder?
- *
- * @param entity climbing entity
- * @return true if entity can climb
- */
- boolean isLadder( EntityLivingBase entity );
+ /**
+ * @return output redstone on facing side
+ */
+ int isProvidingWeakPower();
- /**
- * a block around the bus's host has been changed.
- */
- void onNeighborChanged();
+ /**
+ * write data to bus packet.
+ *
+ * @param data to be written data
+ * @throws IOException
+ */
+ void writeToStream(ByteBuf data) throws IOException;
- /**
- * @return output redstone on facing side
- */
- int isProvidingStrongPower();
+ /**
+ * read data from bus packet.
+ *
+ * @param data to be read data
+ * @return true will re-draw the part.
+ * @throws IOException
+ */
+ boolean readFromStream(ByteBuf data) throws IOException;
- /**
- * @return output redstone on facing side
- */
- int isProvidingWeakPower();
+ /**
+ * 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 grid node
+ */
+ IGridNode getGridNode();
- /**
- * write data to bus packet.
- *
- * @param data to be written data
- * @throws IOException
- */
- void writeToStream( ByteBuf data ) throws IOException;
+ /**
+ * called when an entity collides with the bus.
+ *
+ * @param entity colliding entity
+ */
+ void onEntityCollision(Entity entity);
- /**
- * read data from bus packet.
- *
- * @param data to be read data
- * @return true will re-draw the part.
- * @throws IOException
- */
- boolean readFromStream( ByteBuf data ) throws IOException;
+ /**
+ * called when your part is being removed from the world.
+ */
+ void removeFromWorld();
- /**
- * 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 grid node
- */
- IGridNode getGridNode();
+ /**
+ * called when your part is being added to the world.
+ */
+ void addToWorld();
- /**
- * called when an entity collides with the bus.
- *
- * @param entity colliding entity
- */
- void onEntityCollision( Entity entity );
+ /**
+ * used for tunnels.
+ *
+ * @return a grid node that represents the external facing side, these must be
+ * isWorldAccessible with the correct
+ * faces marked as external
+ */
+ IGridNode getExternalFacingNode();
- /**
- * called when your part is being removed from the world.
- */
- void removeFromWorld();
+ /**
+ * called by the Part host to keep your part informed.
+ *
+ * @param host part side
+ * @param tile tile entity of part
+ */
+ void setPartHostInfo(ForgeDirection side, IPartHost host, TileEntity tile);
- /**
- * called when your part is being added to the world.
- */
- void addToWorld();
+ /**
+ * Called when you right click the part, very similar to Block.onActivateBlock
+ *
+ * @param player right clicking player
+ * @param pos position of block
+ * @return if your activate method performed something.
+ */
+ boolean onActivate(EntityPlayer player, Vec3 pos);
- /**
- * used for tunnels.
- *
- * @return a grid node that represents the external facing side, these must be isWorldAccessible with the correct
- * faces marked as external
- */
- IGridNode getExternalFacingNode();
+ /**
+ * Called when you right click the part, very similar to Block.onActivateBlock
+ *
+ * @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);
- /**
- * called by the Part host to keep your part informed.
- *
- * @param host part side
- * @param tile tile entity of part
- */
- void setPartHostInfo( ForgeDirection side, IPartHost host, TileEntity tile );
+ /**
+ * 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 item drops if wrenched
+ * @param wrenched control flag for wrenched vs broken
+ */
+ void getDrops(List
+ * No complaints about the size, I like using pixels :P
+ *
+ * @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);
-public interface IPartCollisionHelper
-{
+ /**
+ * @return east in world space.
+ */
+ ForgeDirection getWorldX();
- /**
- * add a collision box, expects 0.0 - 16.0 block coords.
- *
- * No complaints about the size, I like using pixels :P
- *
- * @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 );
+ /**
+ * @return up in world space.
+ */
+ ForgeDirection getWorldY();
- /**
- * @return east in world space.
- */
- ForgeDirection getWorldX();
+ /**
+ * @return forward in world space.
+ */
+ ForgeDirection getWorldZ();
- /**
- * @return up in world space.
- */
- ForgeDirection getWorldY();
-
- /**
- * @return forward in world space.
- */
- ForgeDirection getWorldZ();
-
- /**
- * @return true if this test is to get the BB Collision information.
- */
- boolean isBBCollision();
+ /**
+ * @return true if this test is to get the BB Collision information.
+ */
+ boolean isBBCollision();
}
diff --git a/src/api/java/appeng/api/parts/IPartHelper.java b/src/api/java/appeng/api/parts/IPartHelper.java
index d42d812e..1d665847 100644
--- a/src/api/java/appeng/api/parts/IPartHelper.java
+++ b/src/api/java/appeng/api/parts/IPartHelper.java
@@ -23,64 +23,62 @@
package appeng.api.parts;
-
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
+public interface IPartHelper {
+ /**
+ * Register a new layer with the part layer system, this allows you to write
+ * an in between between tile entities and parts.
+ *
+ * AE By Default includes,
+ *
+ * 1. ISidedInventory ( and by extension IInventory. )
+ *
+ * 2. IFluidHandler Forge Fluids
+ *
+ * 3. IPowerEmitter BC Power output.
+ *
+ * 4. IPowerReceptor BC Power input.
+ *
+ * 5. IEnergySink IC2 Power input.
+ *
+ * 6. IEnergySource IC2 Power output.
+ *
+ * 7. IPipeConnection BC Pipe Connections
+ *
+ * As long as a valid layer is registered for a interface you can simply
+ * implement that interface on a part get implement it.
+ *
+ * @return true on success, false on failure, usually a error will be logged
+ * as well.
+ */
+ boolean registerNewLayer(String string, String layerInterface);
-public interface IPartHelper
-{
+ /**
+ * Register IBusItem with renderer
+ */
+ void setItemBusRenderer(IPartItem i);
- /**
- * Register a new layer with the part layer system, this allows you to write
- * an in between between tile entities and parts.
- *
- * AE By Default includes,
- *
- * 1. ISidedInventory ( and by extension IInventory. )
- *
- * 2. IFluidHandler Forge Fluids
- *
- * 3. IPowerEmitter BC Power output.
- *
- * 4. IPowerReceptor BC Power input.
- *
- * 5. IEnergySink IC2 Power input.
- *
- * 6. IEnergySource IC2 Power output.
- *
- * 7. IPipeConnection BC Pipe Connections
- *
- * As long as a valid layer is registered for a interface you can simply
- * implement that interface on a part get implement it.
- *
- * @return true on success, false on failure, usually a error will be logged
- * as well.
- */
- boolean registerNewLayer( String string, String layerInterface );
+ /**
+ * use in use item, to try and place a IBusItem
+ *
+ * @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
+ );
- /**
- * Register IBusItem with renderer
- */
- void setItemBusRenderer( IPartItem i );
-
- /**
- * use in use item, to try and place a IBusItem
- *
- * @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 );
-
- /**
- * @return the render mode
- */
- CableRenderMode getCableRenderMode();
+ /**
+ * @return the render mode
+ */
+ CableRenderMode getCableRenderMode();
}
diff --git a/src/api/java/appeng/api/parts/IPartHost.java b/src/api/java/appeng/api/parts/IPartHost.java
index c59afe1c..594ef536 100644
--- a/src/api/java/appeng/api/parts/IPartHost.java
+++ b/src/api/java/appeng/api/parts/IPartHost.java
@@ -23,6 +23,7 @@
package appeng.api.parts;
+import java.util.Set;
import appeng.api.util.AEColor;
import appeng.api.util.DimensionalCoord;
@@ -32,145 +33,144 @@ 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
-{
+public interface IPartHost {
+ /**
+ * @return the facade container
+ */
+ IFacadeContainer getFacadeContainer();
- /**
- * @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);
- /**
- * 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);
- /**
- * 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);
- /**
- * 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);
- /**
- * 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();
- /**
- * 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 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 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();
- /**
- * @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();
- /**
- * 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);
- /**
- * 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);
- /**
- * 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();
- /**
- * can be used by parts to trigger the tile or part to save.
- */
- void markForSave();
+ /**
+ * part of the {@link LayerBase}
+ */
+ void partChanged();
- /**
- * 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);
- /**
- * 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();
- /**
- * 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
- * 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.
- *
+ * This is a pretty basic requirement, once you implement the interface, and
+ * createPartFromItemStack 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.
*
+ * No complaints about the size, I like using pixels :P
+ *
+ * @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);
+ /**
+ * static renderer
+ *
+ * render a single face.
+ *
+ * @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
+ );
-public interface IPartRenderHelper
-{
+ /**
+ * static renderer
+ *
+ * render a box with a cut out box in the center.
+ *
+ * @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
+ );
- /**
- * sets the Render Helpers Block Bounds. 0.0 - 16.0 block coords.
- *
- * No complaints about the size, I like using pixels :P
- *
- * @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 );
+ /**
+ * static renderer
+ *
+ * render a block of specified bounds.
+ *
+ * @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);
- /**
- * static renderer
- *
- * render a single face.
- *
- * @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 );
+ /**
+ * render a single face in inventory renderer.
+ *
+ * @param IIcon icon of part
+ * @param direction face of part
+ * @param renderer renderer
+ */
+ @SideOnly(Side.CLIENT)
+ void
+ renderInventoryFace(IIcon IIcon, ForgeDirection direction, RenderBlocks renderer);
- /**
- * static renderer
- *
- * render a box with a cut out box in the center.
- *
- * @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 );
+ /**
+ * render a box in inventory renderer.
+ *
+ * @param renderer renderer
+ */
+ @SideOnly(Side.CLIENT)
+ void renderInventoryBox(RenderBlocks renderer);
- /**
- * static renderer
- *
- * render a block of specified bounds.
- *
- * @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 );
+ /**
+ * inventory, and static renderer.
+ *
+ * set unique icons for each side of the block.
+ *
+ * @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);
- /**
- * render a single face in inventory renderer.
- *
- * @param IIcon icon of part
- * @param direction face of part
- * @param renderer renderer
- */
- @SideOnly( Side.CLIENT )
- void renderInventoryFace( IIcon IIcon, ForgeDirection direction, RenderBlocks renderer );
+ /**
+ * inventory, and static renderer.
+ *
+ * set all sides to a single IIcon.
+ *
+ * @param ico to be set icon
+ */
+ void setTexture(IIcon ico);
- /**
- * render a box in inventory renderer.
- *
- * @param renderer renderer
- */
- @SideOnly( Side.CLIENT )
- void renderInventoryBox( RenderBlocks renderer );
+ /**
+ * configure the color multiplier for the inventory renderer.
+ *
+ * @param whiteVariant color multiplier
+ */
+ void setInvColor(int whiteVariant);
- /**
- * inventory, and static renderer.
- *
- * set unique icons for each side of the block.
- *
- * @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 );
+ /**
+ * @return the block used for rendering, might need it for some reason...
+ */
+ Block getBlock();
- /**
- * inventory, and static renderer.
- *
- * set all sides to a single IIcon.
- *
- * @param ico to be set icon
- */
- void setTexture( IIcon ico );
+ /**
+ * @return the east vector in world directions, rather then renderer
+ */
+ ForgeDirection getWorldX();
- /**
- * configure the color multiplier for the inventory renderer.
- *
- * @param whiteVariant color multiplier
- */
- void setInvColor( int whiteVariant );
+ /**
+ * @return the up vector in world directions, rather then renderer.
+ */
+ ForgeDirection getWorldY();
- /**
- * @return the block used for rendering, might need it for some reason...
- */
- Block getBlock();
+ /**
+ * @return the forward vector in world directions, rather then renderer.
+ */
+ ForgeDirection getWorldZ();
- /**
- * @return the east vector in world directions, rather then renderer
- */
- ForgeDirection getWorldX();
+ /**
+ * Pre-Calculates default lighting for the part, call this before using the render
+ * helper to render anything else to get simplified, but faster lighting for more then
+ * one block. Only worth it if you render more then 1 block.
+ */
+ ISimplifiedBundle
+ useSimplifiedRendering(int x, int y, int z, IBoxProvider p, ISimplifiedBundle sim);
- /**
- * @return the up vector in world directions, rather then renderer.
- */
- ForgeDirection getWorldY();
+ /**
+ * disables, useSimplifiedRendering.
+ */
+ void normalRendering();
- /**
- * @return the forward vector in world directions, rather then renderer.
- */
- ForgeDirection getWorldZ();
+ /**
+ * render a block using the current renderer state.
+ *
+ * @param x x pos of part
+ * @param y y pos of part
+ * @param z z pos of part
+ * @param renderer renderer of part
+ */
+ @SideOnly(Side.CLIENT)
+ void renderBlockCurrentBounds(int x, int y, int z, RenderBlocks renderer);
- /**
- * Pre-Calculates default lighting for the part, call this before using the render helper to render anything else to
- * get simplified, but faster lighting for more then one block.
- *
- * Only worth it if you render more then 1 block.
- */
- ISimplifiedBundle useSimplifiedRendering( int x, int y, int z, IBoxProvider p, ISimplifiedBundle sim );
+ /**
+ * allow you to enable your part to render during the alpha pass or the standard pass.
+ *
+ * @param pass render pass
+ */
+ void renderForPass(int pass);
- /**
- * disables, useSimplifiedRendering.
- */
- void normalRendering();
-
- /**
- * render a block using the current renderer state.
- *
- * @param x x pos of part
- * @param y y pos of part
- * @param z z pos of part
- * @param renderer renderer of part
- */
- @SideOnly( Side.CLIENT )
- 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 render pass
- */
- void renderForPass( int pass );
-
- /**
- * Set which faces to render, remember to set back to ALL when you are done.
- *
- * @param complementOf sides to render
- */
- void setFacesToRender( EnumSet
+ * This Method looks silly, that is because its not used at runtime, a real
+ * implementation will be used instead.
+ *
+ * @param side side of part
+ * @return the part for the requested side.
+ */
+ public IPart getPart(final ForgeDirection side) {
+ return null; // place holder.
+ }
- /**
- * Grants access for the layer to the parts of the host.
- *
- * This Method looks silly, that is because its not used at runtime, a real implementation will be used instead.
- *
- * @param side side of part
- * @return the part for the requested side.
- */
- public IPart getPart( final ForgeDirection side )
- {
- return null; // place holder.
- }
+ /**
+ * called when the parts change in the container, YOU MUST CALL super.PartChanged();
+ */
+ public void notifyNeighbors() {}
- /**
- * called when the parts change in the container, YOU MUST CALL super.PartChanged();
- */
- public void notifyNeighbors()
- {
- }
+ /**
+ * called when the parts change in the container, YOU MUST CALL super.PartChanged();
+ */
+ public void partChanged() {}
- /**
- * called when the parts change in the container, YOU MUST CALL super.PartChanged();
- */
- public void partChanged()
- {
- }
+ /**
+ * @return a mutable list of flags you can adjust to track state.
+ */
+ public Set
+ * 1 - green, ( usually means available room for types or items. )
+ *
+ * 2 - orange, ( usually means available room for items, but not types. )
+ *
+ * 3 - red, ( usually means the cell is 100% full )
+ *
+ * @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.
+ */
+ int getStatusForCell(ItemStack is, IMEInventory handler);
- /**
- * 0 - cell is missing.
- *
- * 1 - green, ( usually means available room for types or items. )
- *
- * 2 - orange, ( usually means available room for items, but not types. )
- *
- * 3 - red, ( usually means the cell is 100% full )
- *
- * @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.
- */
- int getStatusForCell( ItemStack is, IMEInventory handler );
-
- /**
- * @return the ae/t to drain for this storage cell inside a chest/drive.
- */
- double cellIdleDrain( ItemStack is, IMEInventory handler );
+ /**
+ * @return the ae/t to drain for this storage cell inside a chest/drive.
+ */
+ double cellIdleDrain(ItemStack is, IMEInventory handler);
}
\ No newline at end of file
diff --git a/src/api/java/appeng/api/storage/ICellInventory.java b/src/api/java/appeng/api/storage/ICellInventory.java
index c711ce6a..31b62b35 100644
--- a/src/api/java/appeng/api/storage/ICellInventory.java
+++ b/src/api/java/appeng/api/storage/ICellInventory.java
@@ -23,98 +23,94 @@
package appeng.api.storage;
-
import appeng.api.config.FuzzyMode;
import appeng.api.storage.data.IAEItemStack;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
+public interface ICellInventory extends IMEInventory You must return the correct Handler for the correct channel, if your
+ * handler returns a IAEItemStack handler, for a Fluid Channel stuffs going to
+ * explode, same with the reverse.
+ *
+ * @return a valid list of handlers, NEVER NULL
+ */
+ List
- * You must return the correct Handler for the correct channel, if your handler returns a IAEItemStack handler, for
- * a Fluid Channel stuffs going to explode, same with the reverse.
- *
- * @return a valid list of handlers, NEVER NULL
- */
- List
- * Positive and negative are supported
- */
- int getPriority();
+ /**
+ * the storage's priority.
+ *
+ * Positive and negative are supported
+ */
+ int getPriority();
}
diff --git a/src/api/java/appeng/api/storage/ICellRegistry.java b/src/api/java/appeng/api/storage/ICellRegistry.java
index c2000bd0..a5198c08 100644
--- a/src/api/java/appeng/api/storage/ICellRegistry.java
+++ b/src/api/java/appeng/api/storage/ICellRegistry.java
@@ -23,51 +23,49 @@
package appeng.api.storage;
-
import appeng.api.IAppEngApi;
import net.minecraft.item.ItemStack;
-
/**
- * Storage Cell Registry, used for specially implemented cells, if you just want to make a item act like a cell, or new
- * cell with different bytes, then you should probably consider IStorageCell instead its considerably simpler.
- *
- * Do not Implement, obtained via {@link IAppEngApi}.getCellRegistry()
+ * Storage Cell Registry, used for specially implemented cells, if you just want to make a
+ * item act like a cell, or new cell with different bytes, then you should probably
+ * consider IStorageCell instead its considerably simpler. Do not Implement, obtained
+ * via {@link IAppEngApi}.getCellRegistry()
*/
-public interface ICellRegistry
-{
+public interface ICellRegistry {
+ /**
+ * Register a new handler.
+ *
+ * @param handler cell handler
+ */
+ void addCellHandler(ICellHandler handler);
- /**
- * Register a new handler.
- *
- * @param handler cell handler
- */
- void addCellHandler( ICellHandler handler );
+ /**
+ * return true, if you can get a InventoryHandler for the item passed.
+ *
+ * @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. )
+ */
+ boolean isCellHandled(ItemStack is);
- /**
- * return true, if you can get a InventoryHandler for the item passed.
- *
- * @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. )
- */
- boolean isCellHandled( ItemStack is );
+ /**
+ * get the handler, for the requested type.
+ *
+ * @param is to be checked item
+ * @return the handler registered for this item type.
+ */
+ ICellHandler getHandler(ItemStack is);
- /**
- * get the handler, for the requested type.
- *
- * @param is to be checked item
- * @return the handler registered for this item type.
- */
- ICellHandler getHandler( ItemStack is );
-
- /**
- * returns an IMEInventoryHandler for the provided item.
- *
- * @param is item with inventory handler
- * @param host can be null, or the hosting tile / part.
- * @param chan the storage channel to request the handler for.
- * @return new IMEInventoryHandler, or null if there isn't one.
- */
- IMEInventoryHandler getCellInventory( ItemStack is, ISaveProvider host, StorageChannel chan );
+ /**
+ * returns an IMEInventoryHandler for the provided item.
+ *
+ * @param is item with inventory handler
+ * @param host can be null, or the hosting tile / part.
+ * @param chan the storage channel to request the handler for.
+ * @return new IMEInventoryHandler, or null if there isn't one.
+ */
+ IMEInventoryHandler
+ getCellInventory(ItemStack is, ISaveProvider host, StorageChannel chan);
}
\ No newline at end of file
diff --git a/src/api/java/appeng/api/storage/ICellWorkbenchItem.java b/src/api/java/appeng/api/storage/ICellWorkbenchItem.java
index e4830807..55deb7b3 100644
--- a/src/api/java/appeng/api/storage/ICellWorkbenchItem.java
+++ b/src/api/java/appeng/api/storage/ICellWorkbenchItem.java
@@ -23,47 +23,43 @@
package appeng.api.storage;
-
import appeng.api.config.FuzzyMode;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
+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 item
+ * @return true if the item should be editable in the cell workbench.
+ */
+ boolean isEditable(ItemStack is);
-public interface ICellWorkbenchItem
-{
+ /**
+ * used to edit the upgrade slots on your cell, should have a capacity of 0-24, you
+ * are also responsible for implementing the valid checks, and any storage/usage of
+ * them. onInventoryChange will be called when saving is needed.
+ */
+ IInventory getUpgradesInventory(ItemStack is);
- /**
- * if this return false, the item will not be treated as a cell, and cannot be inserted into the work bench.
- *
- * @param is item
- * @return true if the item should be editable in the cell workbench.
- */
- boolean isEditable( ItemStack is );
+ /**
+ * Used to extract, or mirror the contents of the work bench onto the cell.
+ *
+ * - This should have exactly 63 slots, any more, or less might cause issues.
+ *
+ * onInventoryChange will be called when saving is needed.
+ */
+ IInventory getConfigInventory(ItemStack is);
- /**
- * used to edit the upgrade slots on your cell, should have a capacity of 0-24, you are also responsible for
- * implementing the valid checks, and any storage/usage of them.
- *
- * onInventoryChange will be called when saving is needed.
- */
- IInventory getUpgradesInventory( ItemStack is );
+ /**
+ * @return the current fuzzy status.
+ */
+ FuzzyMode getFuzzyMode(ItemStack is);
- /**
- * Used to extract, or mirror the contents of the work bench onto the cell.
- *
- * - This should have exactly 63 slots, any more, or less might cause issues.
- *
- * onInventoryChange will be called when saving is needed.
- */
- IInventory getConfigInventory( ItemStack is );
-
- /**
- * @return the current fuzzy status.
- */
- FuzzyMode getFuzzyMode( ItemStack is );
-
- /**
- * sets the setting on the cell.
- */
- void setFuzzyMode( ItemStack is, FuzzyMode fzMode );
+ /**
+ * sets the setting on the cell.
+ */
+ void setFuzzyMode(ItemStack is, FuzzyMode fzMode);
}
diff --git a/src/api/java/appeng/api/storage/IExternalStorageHandler.java b/src/api/java/appeng/api/storage/IExternalStorageHandler.java
index e3c421c0..b20ab99b 100644
--- a/src/api/java/appeng/api/storage/IExternalStorageHandler.java
+++ b/src/api/java/appeng/api/storage/IExternalStorageHandler.java
@@ -23,39 +23,41 @@
package appeng.api.storage;
-
import appeng.api.networking.security.BaseActionSource;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
-
/**
* A Registration Record for {@link IExternalStorageRegistry}
*/
-public interface IExternalStorageHandler
-{
+public interface IExternalStorageHandler {
+ /**
+ * if this can handle the provided inventory, return true. ( Generally skipped by AE,
+ * and it just calls getInventory
+ * )
+ *
+ * @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
+ );
- /**
- * if this can handle the provided inventory, return true. ( Generally skipped by AE, and it just calls getInventory
- * )
- *
- * @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 );
-
- /**
- * if this can handle the given inventory, return the a IMEInventory implementing class for it, if not return null
- *
- * 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 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 );
+ /**
+ * if this can handle the given inventory, return the a IMEInventory implementing
+ * class for it, if not return null 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 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
+ );
}
\ No newline at end of file
diff --git a/src/api/java/appeng/api/storage/IExternalStorageRegistry.java b/src/api/java/appeng/api/storage/IExternalStorageRegistry.java
index 0be24a55..0e3b5fef 100644
--- a/src/api/java/appeng/api/storage/IExternalStorageRegistry.java
+++ b/src/api/java/appeng/api/storage/IExternalStorageRegistry.java
@@ -23,34 +23,36 @@
package appeng.api.storage;
-
import appeng.api.IAppEngApi;
import appeng.api.networking.security.BaseActionSource;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
-
/**
* A Registry of External Storage handlers.
*
- * Do not implement obtain via {@link IAppEngApi}.registries().getExternalStorageRegistry()
+ * Do not implement obtain via {@link
+ * IAppEngApi}.registries().getExternalStorageRegistry()
*/
-public interface IExternalStorageRegistry
-{
+public interface IExternalStorageRegistry {
+ /**
+ * A registry for StorageBus interactions
+ *
+ * @param esh storage handler
+ */
+ void addExternalStorageInterface(IExternalStorageHandler esh);
- /**
- * A registry for StorageBus interactions
- *
- * @param esh storage handler
- */
- void addExternalStorageInterface( IExternalStorageHandler esh );
-
- /**
- * @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 );
+ /**
+ * @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
+ );
}
\ No newline at end of file
diff --git a/src/api/java/appeng/api/storage/IMEInventory.java b/src/api/java/appeng/api/storage/IMEInventory.java
index 51f4a790..d82fc838 100644
--- a/src/api/java/appeng/api/storage/IMEInventory.java
+++ b/src/api/java/appeng/api/storage/IMEInventory.java
@@ -23,55 +23,50 @@
package appeng.api.storage;
-
import appeng.api.config.Actionable;
import appeng.api.networking.security.BaseActionSource;
import appeng.api.storage.data.IAEStack;
import appeng.api.storage.data.IItemList;
-
/**
- * AE's Equivalent to IInventory, used to reading contents, and manipulating contents of ME Inventories.
- *
- * Implementations should COMPLETELY ignore stack size limits from an external view point, Meaning that you can inject
- * Integer.MAX_VALUE items and it should work as defined, or be able to extract Integer.MAX_VALUE and have it work as
- * defined, Translations to MC's max stack size are external to the AE API.
- *
- * If you want to request a stack of an item, you should should determine that prior to requesting the stack from the
- * inventory.
+ * AE's Equivalent to IInventory, used to reading contents, and manipulating contents of
+ * ME Inventories. Implementations should COMPLETELY ignore stack size limits from an
+ * external view point, Meaning that you can inject Integer.MAX_VALUE items and it should
+ * work as defined, or be able to extract Integer.MAX_VALUE and have it work as defined,
+ * Translations to MC's max stack size are external to the AE API. If you want to
+ * request a stack of an item, you should should determine that prior to requesting the
+ * stack from the inventory.
*/
-public interface IMEInventory
- * never check a tile for this, always go though ITileStorageMonitorable if you wish to use this interface.
+ * represents the internal behavior of a {@link ITileStorageMonitorable} use it to get
+ * this value for a tile, or part. never check a tile for this, always go though
+ * ITileStorageMonitorable if you wish to use this interface.
*/
-public interface IStorageMonitorable
-{
+public interface IStorageMonitorable {
+ /**
+ * Access the item inventory for the monitorable storage.
+ */
+ IMEMonitor
* Construct with Util.createFluidStack( FluidStack )
*/
-public interface IAEFluidStack extends IAEStack
- * You may hold on to these if you want, just make sure you let go of them when your not using them.
- *
- * Don't Implement.
- *
- * Construct with Util.createItemStack( ItemStack )
+ * An alternate version of ItemStack for AE to keep tabs on things easier, and to support
+ * larger storage. stackSizes of getItemStack will be capped. You may hold on to these
+ * if you want, just make sure you let go of them when your not using them. Don't
+ * Implement. Construct with Util.createItemStack( ItemStack )
*/
-public interface IAEItemStack extends IAEStack
+ * 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);
- /**
- * removes items from the requestable
- *
- * @param i decreased amount of requested items
- */
- void decCountRequestable( long i );
+ /**
+ * 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);
- /**
- * write to a NBTTagCompound.
- *
- * @param i to be written data
- */
- void writeToNBT( NBTTagCompound i );
+ /**
+ * Slower for disk saving, but smaller/more efficient for packets.
+ *
+ * @param data to be written data
+ * @throws IOException
+ */
+ void writeToPacket(ByteBuf data) throws IOException;
- /**
- * 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 );
+ /**
+ * Clone the Item / Fluid Stack
+ *
+ * @return a new Stack, which is copied from the original.
+ */
+ StackType copy();
- /**
- * 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 );
+ /**
+ * create an empty stack.
+ *
+ * @return a new stack, which represents an empty copy of the original.
+ */
+ StackType empty();
- /**
- * Slower for disk saving, but smaller/more efficient for packets.
- *
- * @param data to be written data
- * @throws IOException
- */
- void writeToPacket( ByteBuf data ) throws IOException;
+ /**
+ * obtain the NBT Data for the item.
+ *
+ * @return nbt data
+ */
+ IAETagCompound getTagCompound();
- /**
- * Clone the Item / Fluid Stack
- *
- * @return a new Stack, which is copied from the original.
- */
- StackType copy();
+ /**
+ * @return true if the stack is a {@link IAEItemStack}
+ */
+ boolean isItem();
- /**
- * create an empty stack.
- *
- * @return a new stack, which represents an empty copy of the original.
- */
- StackType empty();
+ /**
+ * @return true if the stack is a {@link IAEFluidStack}
+ */
+ boolean isFluid();
- /**
- * 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();
+ /**
+ * @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 64973739..630b6ef8 100644
--- a/src/api/java/appeng/api/storage/data/IAETagCompound.java
+++ b/src/api/java/appeng/api/storage/data/IAETagCompound.java
@@ -23,35 +23,32 @@
package appeng.api.storage.data;
-
import appeng.api.features.IItemComparison;
import net.minecraft.nbt.NBTTagCompound;
-
/**
* Don't cast this... either compare with it, or copy it.
*
* Don't Implement.
*/
-public interface IAETagCompound
-{
+public interface IAETagCompound {
+ /**
+ * @return a copy ( the copy will not be a IAETagCompound, it will be a NBTTagCompound
+ * )
+ */
+ NBTTagCompound getNBTTagCompoundCopy();
- /**
- * @return a copy ( the copy will not be a IAETagCompound, it will be a NBTTagCompound )
- */
- NBTTagCompound getNBTTagCompoundCopy();
+ /**
+ * compare to other NBTTagCompounds or IAETagCompounds
+ *
+ * @param a compared object
+ * @return true, if they are the same.
+ */
+ @Override
+ boolean equals(Object a);
- /**
- * compare to other NBTTagCompounds or IAETagCompounds
- *
- * @param a compared object
- * @return true, if they are the same.
- */
- @Override
- boolean equals( Object a );
-
- /**
- * @return the special comparison for this tag
- */
- IItemComparison getSpecialComparison();
+ /**
+ * @return the special comparison for this tag
+ */
+ IItemComparison getSpecialComparison();
}
\ No newline at end of file
diff --git a/src/api/java/appeng/api/storage/data/IItemContainer.java b/src/api/java/appeng/api/storage/data/IItemContainer.java
index b47c3a37..f6df35d2 100644
--- a/src/api/java/appeng/api/storage/data/IItemContainer.java
+++ b/src/api/java/appeng/api/storage/data/IItemContainer.java
@@ -23,11 +23,9 @@
package appeng.api.storage.data;
-
-import appeng.api.config.FuzzyMode;
-
import java.util.Collection;
+import appeng.api.config.FuzzyMode;
/**
* Represents a list of items in AE.
@@ -36,31 +34,31 @@ import java.util.Collection;
*
* Construct with Util.createItemList()
*/
-public interface IItemContainer
@@ -34,50 +32,50 @@ import java.util.Iterator;
*
* Construct with Util.createItemList()
*/
-public interface IItemList
* Should be the same order as Dyes, excluding Transparent.
*/
-public enum AEColor
-{
+public enum AEColor {
+ White("gui.appliedenergistics2.White", 0xBEBEBE, 0xDBDBDB, 0xFAFAFA),
- White( "gui.appliedenergistics2.White", 0xBEBEBE, 0xDBDBDB, 0xFAFAFA ),
+ Orange("gui.appliedenergistics2.Orange", 0xF99739, 0xFAAE44, 0xF4DEC3),
- Orange( "gui.appliedenergistics2.Orange", 0xF99739, 0xFAAE44, 0xF4DEC3 ),
+ Magenta("gui.appliedenergistics2.Magenta", 0x821E82, 0xB82AB8, 0xC598C8),
- Magenta( "gui.appliedenergistics2.Magenta", 0x821E82, 0xB82AB8, 0xC598C8 ),
+ LightBlue("gui.appliedenergistics2.LightBlue", 0x628DCB, 0x82ACE7, 0xD8F6FF),
- LightBlue( "gui.appliedenergistics2.LightBlue", 0x628DCB, 0x82ACE7, 0xD8F6FF ),
+ Yellow("gui.appliedenergistics2.Yellow", 0xFFF7AA, 0xF8FF4A, 0xFFFFE8),
- Yellow( "gui.appliedenergistics2.Yellow", 0xFFF7AA, 0xF8FF4A, 0xFFFFE8 ),
+ Lime("gui.appliedenergistics2.Lime", 0x7CFF4A, 0xBBFF51, 0xE7F7D7),
- Lime( "gui.appliedenergistics2.Lime", 0x7CFF4A, 0xBBFF51, 0xE7F7D7 ),
+ Pink("gui.appliedenergistics2.Pink", 0xDC8DB5, 0xF8B5D7, 0xF7DEEB),
- Pink( "gui.appliedenergistics2.Pink", 0xDC8DB5, 0xF8B5D7, 0xF7DEEB ),
+ Gray("gui.appliedenergistics2.Gray", 0x7C7C7C, 0xA0A0A0, 0xC9C9C9),
- Gray( "gui.appliedenergistics2.Gray", 0x7C7C7C, 0xA0A0A0, 0xC9C9C9 ),
+ LightGray("gui.appliedenergistics2.LightGray", 0x9D9D9D, 0xCDCDCD, 0xEFEFEF),
- LightGray( "gui.appliedenergistics2.LightGray", 0x9D9D9D, 0xCDCDCD, 0xEFEFEF ),
+ Cyan("gui.appliedenergistics2.Cyan", 0x2F9BA5, 0x51AAC6, 0xAEDDF4),
- Cyan( "gui.appliedenergistics2.Cyan", 0x2F9BA5, 0x51AAC6, 0xAEDDF4 ),
+ Purple("gui.appliedenergistics2.Purple", 0x8230B2, 0xA453CE, 0xC7A3CC),
- Purple( "gui.appliedenergistics2.Purple", 0x8230B2, 0xA453CE, 0xC7A3CC ),
+ Blue("gui.appliedenergistics2.Blue", 0x2D29A0, 0x514AFF, 0xDDE6FF),
- Blue( "gui.appliedenergistics2.Blue", 0x2D29A0, 0x514AFF, 0xDDE6FF ),
+ Brown("gui.appliedenergistics2.Brown", 0x724E35, 0xB7967F, 0xE0D2C8),
- Brown( "gui.appliedenergistics2.Brown", 0x724E35, 0xB7967F, 0xE0D2C8 ),
+ Green("gui.appliedenergistics2.Green", 0x45A021, 0x60E32E, 0xE3F2E3),
- Green( "gui.appliedenergistics2.Green", 0x45A021, 0x60E32E, 0xE3F2E3 ),
+ Red("gui.appliedenergistics2.Red", 0xA50029, 0xFF003C, 0xFFE6ED),
- Red( "gui.appliedenergistics2.Red", 0xA50029, 0xFF003C, 0xFFE6ED ),
+ Black("gui.appliedenergistics2.Black", 0x2B2B2B, 0x565656, 0x848484),
- Black( "gui.appliedenergistics2.Black", 0x2B2B2B, 0x565656, 0x848484 ),
+ Transparent("gui.appliedenergistics2.Fluix", 0x1B2344, 0x895CA8, 0xD7BBEC);
- Transparent( "gui.appliedenergistics2.Fluix", 0x1B2344, 0x895CA8, 0xD7BBEC );
+ public static final List
* Obtained via {@link IConfigurableObject}
*/
-public interface IConfigManager
-{
+public interface IConfigManager {
+ /**
+ * get a list of different settings
+ *
+ * @return enum set of settings
+ */
+ Set
- * and it can be used to manipulate the direction of some machines, most of these orientations are purely visual.
- *
- * AE also responds to Block.rotateBlock
+ * and it can be used to manipulate the direction of some machines, most of these
+ * orientations are purely visual. AE also responds to Block.rotateBlock
*/
-public interface IOrientable
-{
+public interface IOrientable {
+ /**
+ * @return true or false, if the tile rotation is meaningful, or even changeable
+ */
+ boolean canBeRotated();
- /**
- * @return true or false, if the tile rotation is meaningful, or even changeable
- */
- boolean canBeRotated();
+ /**
+ * @return the direction the tile is facing
+ */
+ ForgeDirection getForward();
- /**
- * @return the direction the tile is facing
- */
- ForgeDirection getForward();
+ /**
+ * @return the direction top of the tile
+ */
+ ForgeDirection getUp();
- /**
- * @return the direction top of the tile
- */
- ForgeDirection getUp();
-
- /**
- * Update the orientation
- *
- * @param Forward new forward direction
- * @param Up new upwards direction
- */
- void setOrientation( ForgeDirection Forward, ForgeDirection Up );
+ /**
+ * Update the orientation
+ *
+ * @param Forward new forward direction
+ * @param Up new upwards direction
+ */
+ void setOrientation(ForgeDirection Forward, ForgeDirection Up);
}
\ No newline at end of file
diff --git a/src/api/java/appeng/api/util/IOrientableBlock.java b/src/api/java/appeng/api/util/IOrientableBlock.java
index dea99d14..1e7fcf6e 100644
--- a/src/api/java/appeng/api/util/IOrientableBlock.java
+++ b/src/api/java/appeng/api/util/IOrientableBlock.java
@@ -23,27 +23,23 @@
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
-{
+public interface IOrientableBlock {
+ /**
+ * @return if this block uses metadata to store its rotation.
+ */
+ boolean usesMetadata();
- /**
- * @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 );
+ /**
+ * @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/IReadOnlyCollection.java b/src/api/java/appeng/api/util/IReadOnlyCollection.java
index 84e042ae..a2324829 100644
--- a/src/api/java/appeng/api/util/IReadOnlyCollection.java
+++ b/src/api/java/appeng/api/util/IReadOnlyCollection.java
@@ -23,22 +23,19 @@
package appeng.api.util;
+public interface IReadOnlyCollection
- * {@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 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 );
+ /**
+ * request that the handler move the the tile from its current location to
+ * the new one. the tile has already been invalidated, and the blocks have
+ * already been fully moved.
+ *
+ * {@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 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);
}
\ No newline at end of file
diff --git a/src/api/java/appeng/api/movable/IMovableRegistry.java b/src/api/java/appeng/api/movable/IMovableRegistry.java
index ffd00394..d575e267 100644
--- a/src/api/java/appeng/api/movable/IMovableRegistry.java
+++ b/src/api/java/appeng/api/movable/IMovableRegistry.java
@@ -23,99 +23,89 @@
package appeng.api.movable;
-
import net.minecraft.block.Block;
import net.minecraft.tileentity.TileEntity;
-
/**
- * Used to determine if a tile is marked as movable, a block will be considered movable, if...
- *
*
*/
-public interface IPartItem
-{
-
- /**
- * create a new part INSTANCE, from the item stack.
- *
- * @param is item
- * @return part from item
- */
- @Nullable
- IPart createPartFromItemStack( ItemStack is );
+public interface IPartItem {
+ /**
+ * create a new part INSTANCE, from the item stack.
+ *
+ * @param is item
+ * @return part from item
+ */
+ @Nullable
+ 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 339b5f49..58370977 100644
--- a/src/api/java/appeng/api/parts/IPartRenderHelper.java
+++ b/src/api/java/appeng/api/parts/IPartRenderHelper.java
@@ -23,6 +23,7 @@
package appeng.api.parts;
+import java.util.EnumSet;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -31,173 +32,181 @@ import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.util.IIcon;
import net.minecraftforge.common.util.ForgeDirection;
-import java.util.EnumSet;
+public interface IPartRenderHelper {
+ /**
+ * sets the Render Helpers Block Bounds. 0.0 - 16.0 block coords.
+ *
* {@literal @}Override
@@ -48,22 +44,21 @@ import javax.annotation.Nullable;
* }
*
* {@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)
+ * 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 );
* }
*
* > input, List
> output)
+ throws RecipeError;
-
-public interface ICraftHandler
-{
-
- /**
- * Called when your recipe handler receives a newly parsed list of inputs/outputs.
- *
- * @param input parsed inputs
- * @param output parsed outputs
- * @throws RecipeError
- */
- void setup( List
> input, List
> output ) throws RecipeError;
-
- /**
- * called when all recipes are parsed, and your required to register your recipe.
- *
- * @throws RegistrationError
- * @throws MissingIngredientError
- */
- void register() throws RegistrationError, MissingIngredientError;
+ /**
+ * called when all recipes are parsed, and your required to register your recipe.
+ *
+ * @throws RegistrationError
+ * @throws MissingIngredientError
+ */
+ void register() throws RegistrationError, MissingIngredientError;
}
diff --git a/src/api/java/appeng/api/recipes/IIngredient.java b/src/api/java/appeng/api/recipes/IIngredient.java
index 7117a221..d47d5789 100644
--- a/src/api/java/appeng/api/recipes/IIngredient.java
+++ b/src/api/java/appeng/api/recipes/IIngredient.java
@@ -23,67 +23,65 @@
package appeng.api.recipes;
-
import appeng.api.exceptions.MissingIngredientError;
import appeng.api.exceptions.RegistrationError;
import net.minecraft.item.ItemStack;
+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;
-public interface IIngredient
-{
+ /**
+ * 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;
- /**
- * 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;
+ /**
+ * 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 "_"
+ */
+ boolean isAir();
- /**
- * 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;
+ /**
+ * @return The Name Space of the item. Prefer getItemStack or getItemStackSet
+ */
+ String getNameSpace();
- /**
- * 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 "_"
- */
- boolean isAir();
+ /**
+ * @return The Name of the item. Prefer getItemStack or getItemStackSet
+ */
+ String getItemName();
- /**
- * @return The Name Space of the item. Prefer getItemStack or getItemStackSet
- */
- String getNameSpace();
+ /**
+ * @return The Damage Value of the item. Prefer getItemStack or getItemStackSet
+ */
+ int getDamageValue();
- /**
- * @return The Name of the item. Prefer getItemStack or getItemStackSet
- */
- String getItemName();
+ /**
+ * @return The Damage Value of the item. Prefer getItemStack or getItemStackSet
+ */
+ int getQty();
- /**
- * @return The Damage Value of the item. Prefer getItemStack or getItemStackSet
- */
- int getDamageValue();
-
- /**
- * @return The Damage Value of the item. Prefer getItemStack or getItemStackSet
- */
- int getQty();
-
- /**
- * Bakes the lists in for faster runtime look-ups.
- *
- * @throws MissingIngredientError
- * @throws RegistrationError
- */
- void bake() throws RegistrationError, MissingIngredientError;
+ /**
+ * Bakes the lists in for faster runtime look-ups.
+ *
+ * @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 5c7b32e0..f56b09c5 100644
--- a/src/api/java/appeng/api/recipes/IRecipeHandler.java
+++ b/src/api/java/appeng/api/recipes/IRecipeHandler.java
@@ -23,23 +23,20 @@
package appeng.api.recipes;
-
/**
* Represents the AE2 Recipe Loading/Reading Class
*/
-public interface IRecipeHandler
-{
+public interface IRecipeHandler {
+ /**
+ * Call when you want to read recipes in from a file based on a loader
+ *
+ * @param loader recipe loader
+ * @param path path of file
+ */
+ void parseRecipes(IRecipeLoader loader, String path);
- /**
- * Call when you want to read recipes in from a file based on a loader
- *
- * @param loader recipe loader
- * @param path path of file
- */
- void parseRecipes( IRecipeLoader loader, String path );
-
- /**
- * this loads the read recipes into minecraft, should be called in Init.
- */
- void injectRecipes();
+ /**
+ * this loads the read recipes into minecraft, should be called in Init.
+ */
+ void injectRecipes();
}
diff --git a/src/api/java/appeng/api/recipes/IRecipeLoader.java b/src/api/java/appeng/api/recipes/IRecipeLoader.java
index fe1e485c..bb69f245 100644
--- a/src/api/java/appeng/api/recipes/IRecipeLoader.java
+++ b/src/api/java/appeng/api/recipes/IRecipeLoader.java
@@ -23,17 +23,14 @@
package appeng.api.recipes;
-
-import javax.annotation.Nonnull;
import java.io.BufferedReader;
+import javax.annotation.Nonnull;
-
-public interface IRecipeLoader
-{
- /**
- * @param filePath the path to the to be loaded file
- * @return reader handler of the file
- * @throws Exception if reading goes wrong
- */
- BufferedReader getFile( @Nonnull String filePath ) throws Exception;
+public interface IRecipeLoader {
+ /**
+ * @param filePath the path to the to be loaded file
+ * @return reader handler of the file
+ * @throws Exception if reading goes wrong
+ */
+ BufferedReader getFile(@Nonnull String filePath) throws Exception;
}
diff --git a/src/api/java/appeng/api/recipes/ISubItemResolver.java b/src/api/java/appeng/api/recipes/ISubItemResolver.java
index 3ef2bd09..3c311b0a 100644
--- a/src/api/java/appeng/api/recipes/ISubItemResolver.java
+++ b/src/api/java/appeng/api/recipes/ISubItemResolver.java
@@ -23,13 +23,11 @@
package appeng.api.recipes;
-
-public interface ISubItemResolver
-{
- /**
- * @param namespace namespace of sub item
- * @param fullName name of sub item
- * @return either a ResolveResult, or a ResolverResultSet
- */
- Object resolveItemByName( String namespace, String fullName );
+public interface ISubItemResolver {
+ /**
+ * @param namespace namespace of sub item
+ * @param fullName name of sub item
+ * @return either a ResolveResult, or a ResolverResultSet
+ */
+ Object resolveItemByName(String namespace, String fullName);
}
diff --git a/src/api/java/appeng/api/recipes/ResolverResult.java b/src/api/java/appeng/api/recipes/ResolverResult.java
index 51405576..2878e649 100644
--- a/src/api/java/appeng/api/recipes/ResolverResult.java
+++ b/src/api/java/appeng/api/recipes/ResolverResult.java
@@ -23,28 +23,24 @@
package appeng.api.recipes;
-
import net.minecraft.nbt.NBTTagCompound;
+public class ResolverResult {
+ public final String itemName;
+ public final int damageValue;
+ public final NBTTagCompound compound;
-public class ResolverResult
-{
+ public ResolverResult(final String name, final int damage) {
+ this.itemName = name;
+ this.damageValue = damage;
+ this.compound = null;
+ }
- public final String itemName;
- public final int damageValue;
- public final NBTTagCompound compound;
-
- public ResolverResult( final String name, final int damage )
- {
- this.itemName = name;
- this.damageValue = damage;
- this.compound = null;
- }
-
- public ResolverResult( final String name, final int damage, final NBTTagCompound data )
- {
- this.itemName = name;
- this.damageValue = damage;
- this.compound = data;
- }
+ public ResolverResult(
+ final String name, final int damage, final NBTTagCompound data
+ ) {
+ this.itemName = name;
+ this.damageValue = damage;
+ this.compound = data;
+ }
}
diff --git a/src/api/java/appeng/api/recipes/ResolverResultSet.java b/src/api/java/appeng/api/recipes/ResolverResultSet.java
index 0531ba61..eb00da67 100644
--- a/src/api/java/appeng/api/recipes/ResolverResultSet.java
+++ b/src/api/java/appeng/api/recipes/ResolverResultSet.java
@@ -23,22 +23,17 @@
package appeng.api.recipes;
-
-import net.minecraft.item.ItemStack;
-
import java.util.Arrays;
import java.util.List;
+import net.minecraft.item.ItemStack;
-public class ResolverResultSet
-{
+public class ResolverResultSet {
+ public final String name;
+ public final List