This commit is contained in:
Timo Ley 2022-12-03 21:46:13 +01:00
commit 8c0236bb29
1199 changed files with 103655 additions and 106953 deletions

1
.gitignore vendored
View file

@ -15,6 +15,7 @@
!LICENSE
!CONTRIBUTING.md
!CHANGELOG.md
!austri3Fix.md
# include sourcecode
!src/

2
austri3Fix.md Normal file
View file

@ -0,0 +1,2 @@
- we demultiblocked the transition plane
- transition plane doesn't collect items

View file

@ -1,21 +1,3 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
apply plugin: 'forge'
apply plugin: 'maven-publish'
@ -43,7 +25,9 @@ buildscript {
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
classpath ('com.anatawa12.forge:ForgeGradle:1.2-1.0.+') {
changing = true
}
}
}
@ -100,7 +84,8 @@ sourceSets {
resources {
srcDir "src/main/resources/"
include "assets/appliedenergistics2/recipes/**/*.recipe",
include(
"assets/appliedenergistics2/recipes/**/*.recipe",
"assets/appliedenergistics2/recipes/README.html",
"assets/appliedenergistics2/lang/*.lang",
"assets/appliedenergistics2/textures/blocks/*",
@ -110,14 +95,17 @@ sourceSets {
"assets/appliedenergistics2/meta/*",
"mcmod.info",
"pack.mcmeta"
)
}
}
}
processResources {
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand 'version': project.version, 'mcversion': minecraft_version
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
filesMatching('mcmod.info') {
expand 'version':project.version, 'mcversion':project.minecraft.version
}
}

View file

@ -1,24 +1,3 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
repositories {
mavenLocal()
// ChickenBones' maven repo is unavailable now...
@ -30,36 +9,54 @@ repositories {
maven {
name "Mobius"
url "http://mobiusstrip.eu/maven"
metadataSources {
artifact()
}
}
maven {
name = "Player"
url = "http://maven.ic2.player.to/"
metadataSources {
artifact()
}
}
maven {
name = "Tterrag"
url = "http://maven.tterrag.com/"
metadataSources {
artifact()
}
}
maven {
name "OpenComputers Repo"
url = "http://maven.cil.li/"
metadataSources {
artifact()
}
}
maven {
name = "MM repo"
url = "http://maven.k-4u.nl/"
metadataSources {
artifact()
}
}
maven {
name = "tilera"
url = "https://data.tilera.xyz/maven/"
url = "https://maven.tilera.xyz/"
}
ivy {
name "BuildCraft"
artifactPattern "http://www.mod-buildcraft.com/releases/BuildCraft/[revision]/[module]-[revision]-[classifier].[ext]"
metadataSources {
artifact()
}
}
ivy {
@ -67,6 +64,9 @@ repositories {
layout "pattern", {
artifact "[revision]/artifact/build/libs/[artifact]-0.9.3.[revision](-[classifier]).[ext]"
}
metadataSources {
artifact()
}
}
// CurseForge DNS for TE is not available or I am just being unlucky, code part can stay since this is applicable to any other curseforge mod though
@ -106,7 +106,7 @@ dependencies {
// mods "net.mcft.copy.betterstorage:BetterStorage:${minecraft_version}-${betterstorage_version}:deobf"
mods "inventorytweaks:InventoryTweaks:${invtweaks_version}:deobf"
mods "li.cil.oc:OpenComputers:MC${minecraft_version}-${opencomputers_version}:dev"
compile "logisticspipes:logisticspipes:${logisticspipes_build}:dev"
implementation "logisticspipes:logisticspipes:${logisticspipes_build}:dev"
// mods name: 'CoFHLib', version: "[${minecraft_version}]${cofhlib_version}-dev", ext: 'jar'
// mods name: 'CoFHCore', version: "[${minecraft_version}]${cofhcore_version}-dev", ext: 'jar'
@ -122,27 +122,27 @@ dependencies {
compileOnly files("lib/CodeChickenCore-${minecraft_version}-${code_chicken_core_version}-dev.jar")
compileOnly files("lib/NotEnoughItems-${minecraft_version}-${nei_version}-dev.jar")
compile files("lib/buildcraft-${bc_version}-dev.jar")
compile files("lib/PneumaticCraft-${minecraft_version}-${pneumaticcraft_version}-api.jar")
implementation files("lib/buildcraft-${bc_version}-dev.jar")
implementation files("lib/PneumaticCraft-${minecraft_version}-${pneumaticcraft_version}-api.jar")
// provided APIs
compile files("lib/OpenComputers-MC${minecraft_version}-${opencomputers_version}-api.jar")
compile files("lib/industrialcraft-2-${ic2_version}-experimental-api.jar")
compile files("lib/BetterStorage-${minecraft_version}-${betterstorage_version}-api.jar")
implementation files("lib/OpenComputers-MC${minecraft_version}-${opencomputers_version}-api.jar")
implementation files("lib/industrialcraft-2-${ic2_version}-experimental-api.jar")
implementation files("lib/BetterStorage-${minecraft_version}-${betterstorage_version}-api.jar")
// self compiled APIs
compile "appeng:Waila:${waila_version}_${minecraft_version}:api"
compile "appeng:RotaryCraft:${rotarycraft_version}:api"
compile "appeng:mekanism:${minecraft_version}-${mekansim_version}:api"
compile "appeng:InventoryTweaks:${invtweaks_version}:api"
implementation "appeng:Waila:${waila_version}_${minecraft_version}:api"
implementation "appeng:RotaryCraft:${rotarycraft_version}:api"
implementation "appeng:mekanism:${minecraft_version}-${mekansim_version}:api"
implementation "appeng:InventoryTweaks:${invtweaks_version}:api"
// self compiled stubs
compile(group: 'api', name: 'coloredlightscore', version: "${api_coloredlightscore_version}")
compile(group: 'api', name: 'craftguide', version: "${api_craftguide_version}")
compile(group: 'api', name: 'immibis', version: "${api_immibis_version}")
compile(group: 'api', name: 'mfr', version: "${api_mfr_version}")
compile(group: 'api', name: 'railcraft', version: "${api_railcraft_version}")
compile(group: 'api', name: 'rf', version: "${api_rf_version}")
implementation(group: 'api', name: 'coloredlightscore', version: "${api_coloredlightscore_version}")
implementation(group: 'api', name: 'craftguide', version: "${api_craftguide_version}")
implementation(group: 'api', name: 'immibis', version: "${api_immibis_version}")
implementation(group: 'api', name: 'mfr', version: "${api_mfr_version}")
implementation(group: 'api', name: 'railcraft', version: "${api_railcraft_version}")
implementation(group: 'api', name: 'rf', version: "${api_rf_version}")
testCompile "junit:junit:4.12"
testImplementation "junit:junit:4.12"
}

View file

@ -1,7 +1,3 @@
task wrapper(type: Wrapper) {
gradleVersion = "2.4"
}
// WAILA
task installWaila(type: Copy, dependsOn: "deinstallWaila") {
from { configurations.mods }

View file

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.0-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-bin.zip

View file

@ -23,45 +23,43 @@
package appeng.api;
import appeng.api.exceptions.CoreInaccessibleException;
import java.lang.reflect.Field;
import appeng.api.exceptions.CoreInaccessibleException;
/**
* Entry point for api.
* <p>
* 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;
static
{
try
{
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." );
} 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."
);
}
}
@ -70,9 +68,7 @@ public enum AEApi
*
* @return the {@link IAppEngApi}
*/
public static IAppEngApi instance()
{
public static IAppEngApi instance() {
return HELD_API;
}
}

View file

@ -23,7 +23,6 @@
package appeng.api;
import appeng.api.definitions.*;
import appeng.api.exceptions.FailedConnection;
import appeng.api.features.IRegistryContainer;
@ -33,10 +32,7 @@ import appeng.api.networking.IGridNode;
import appeng.api.parts.IPartHelper;
import appeng.api.storage.IStorageHelper;
public interface IAppEngApi
{
public interface IAppEngApi {
/**
* @return Registry Container for the numerous registries in AE2.
*/
@ -100,5 +96,6 @@ public interface IAppEngApi
* @param b to be connected gridnode
* @throws appeng.api.exceptions.FailedConnection
*/
IGridConnection createGridConnection( IGridNode a, IGridNode b ) throws FailedConnection;
IGridConnection createGridConnection(IGridNode a, IGridNode b)
throws FailedConnection;
}

View file

@ -23,32 +23,28 @@
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;
AccessRestriction( final int v )
{
AccessRestriction(final int v) {
this.permissionBit = v;
}
public boolean hasPermission( final AccessRestriction ar )
{
public boolean hasPermission(final AccessRestriction ar) {
return (this.permissionBit & ar.permissionBit) == ar.permissionBit;
}
public AccessRestriction restrictPermissions( final AccessRestriction ar )
{
public AccessRestriction restrictPermissions(final AccessRestriction ar) {
return this.getPermByBit(this.permissionBit & ar.permissionBit);
}
private AccessRestriction getPermByBit( final int bit )
{
switch( bit )
{
private AccessRestriction getPermByBit(final int bit) {
switch (bit) {
default:
case 0:
return NO_ACCESS;
@ -61,13 +57,11 @@ public enum AccessRestriction
}
}
public AccessRestriction addPermissions( final AccessRestriction ar )
{
public AccessRestriction addPermissions(final AccessRestriction ar) {
return this.getPermByBit(this.permissionBit | ar.permissionBit);
}
public AccessRestriction removePermissions( final AccessRestriction ar )
{
public AccessRestriction removePermissions(final AccessRestriction ar) {
return this.getPermByBit(this.permissionBit & (~ar.permissionBit));
}
}

View file

@ -23,8 +23,4 @@
package appeng.api.config;
public enum ActionItems
{
WRENCH, CLOSE, STASH, ENCODE, SUBSTITUTION
}
public enum ActionItems { WRENCH, CLOSE, STASH, ENCODE, SUBSTITUTION }

View file

@ -23,9 +23,7 @@
package appeng.api.config;
public enum Actionable
{
public enum Actionable {
/**
* Perform the intended action.
*/

View file

@ -23,10 +23,7 @@
package appeng.api.config;
public enum CondenserOutput
{
public enum CondenserOutput {
TRASH, // 0
MATTER_BALLS, // 256
@ -34,5 +31,4 @@ public enum CondenserOutput
SINGULARITY; // 250,000
public int requiredPower = 0;
}

View file

@ -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 }

View file

@ -23,8 +23,4 @@
package appeng.api.config;
public enum FullnessMode
{
EMPTY, HALF, FULL
}
public enum FullnessMode { EMPTY, HALF, FULL }

View file

@ -23,24 +23,23 @@
package appeng.api.config;
public enum FuzzyMode
{
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 );
IGNORE_ALL(-1),
PERCENT_99(0),
PERCENT_75(25),
PERCENT_50(50),
PERCENT_25(75);
public final float breakPoint;
public final float percentage;
FuzzyMode( final float p )
{
FuzzyMode(final float p) {
this.percentage = p;
this.breakPoint = p / 100.0f;
}
public int calculateBreakPoint( final int maxDamage )
{
public int calculateBreakPoint(final int maxDamage) {
return (int) ((this.percentage * maxDamage) / 100.0f);
}
}

View file

@ -23,8 +23,4 @@
package appeng.api.config;
public enum IncludeExclude
{
WHITELIST, BLACKLIST
}
public enum IncludeExclude { WHITELIST, BLACKLIST }

View file

@ -23,8 +23,4 @@
package appeng.api.config;
public enum ItemSubstitution
{
ENABLED, DISABLED
}
public enum ItemSubstitution { ENABLED, DISABLED }

View file

@ -23,9 +23,7 @@
package appeng.api.config;
public enum LevelEmitterMode
{
public enum LevelEmitterMode {
STORED_AMOUNT,

View file

@ -23,9 +23,7 @@
package appeng.api.config;
public enum LevelType
{
public enum LevelType {
ITEM_LEVEL,

View file

@ -23,8 +23,6 @@
package appeng.api.config;
public enum ModSettings
{
public enum ModSettings {
}

View file

@ -23,9 +23,7 @@
package appeng.api.config;
public enum NetworkEmitterMode
{
public enum NetworkEmitterMode {
POWER_LEVEL,

View file

@ -23,8 +23,4 @@
package appeng.api.config;
public enum OperationMode
{
FILL, EMPTY
}
public enum OperationMode { FILL, EMPTY }

View file

@ -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 }

View file

@ -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;
public double multiply( final double in )
{
public double multiply(final double in) {
return in * this.multiplier;
}
public double divide( final double in )
{
public double divide(final double in) {
return in / this.multiplier;
}
}

View file

@ -23,13 +23,12 @@
package appeng.api.config;
public enum PowerUnits
{
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
RF("gui.appliedenergistics2.units.thermalexpansion"
), // ThermalExpansion - Redstone Flux
MK("gui.appliedenergistics2.units.mekanism"); // Mekanism - Joules
/**
@ -41,8 +40,7 @@ public enum PowerUnits
*/
public double conversionRatio = 1.0;
PowerUnits( final String un )
{
PowerUnits(final String un) {
this.unlocalizedName = un;
}
@ -51,15 +49,14 @@ public enum PowerUnits
* <p>
* Example: PowerUnits.EU.convertTo( PowerUnits.AE, 32 );
* <p>
* will normally returns 64, as it will convert the EU, to AE with AE's power settings.
* 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 )
{
public double convertTo(final PowerUnits target, final double value) {
return (value * this.conversionRatio) / target.conversionRatio;
}
}

View file

@ -23,8 +23,4 @@
package appeng.api.config;
public enum RedstoneMode
{
IGNORE, LOW_SIGNAL, HIGH_SIGNAL, SIGNAL_PULSE
}
public enum RedstoneMode { IGNORE, LOW_SIGNAL, HIGH_SIGNAL, SIGNAL_PULSE }

View file

@ -23,8 +23,4 @@
package appeng.api.config;
public enum RelativeDirection
{
LEFT, RIGHT, UP, DOW
}
public enum RelativeDirection { LEFT, RIGHT, UP, DOW }

View file

@ -23,8 +23,4 @@
package appeng.api.config;
public enum SchedulingMode
{
DEFAULT, ROUNDROBIN, RANDOM
}
public enum SchedulingMode { DEFAULT, ROUNDROBIN, RANDOM }

View file

@ -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 }

View file

@ -23,22 +23,20 @@
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
{
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. )
* 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. )
* 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,
@ -48,7 +46,8 @@ public enum SecurityPermissions
CRAFT,
/**
* required to modify automation, and make modifications to the networks physical layout.
* required to modify automation, and make modifications to the networks physical
* layout.
*/
BUILD,
@ -57,15 +56,14 @@ public enum SecurityPermissions
*/
SECURITY;
private final String unlocalizedName = "gui.appliedenergistics2.security." + this.name().toLowerCase();
private final String unlocalizedName
= "gui.appliedenergistics2.security." + this.name().toLowerCase();
public String getUnlocalizedName()
{
public String getUnlocalizedName() {
return this.unlocalizedName + ".name";
}
public String getUnlocalizedTip()
{
public String getUnlocalizedTip() {
return this.unlocalizedName + ".tip";
}
}

View file

@ -23,56 +23,63 @@
package appeng.api.config;
import javax.annotation.Nonnull;
import java.util.EnumSet;
import javax.annotation.Nonnull;
public enum Settings
{
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)),
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));
private final EnumSet<? extends Enum<?>> values;
Settings( @Nonnull final EnumSet<? extends Enum<?>> possibleOptions )
{
if( possibleOptions.isEmpty() )
{
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()
{
public EnumSet<? extends Enum<?>> getPossibleValues() {
return this.values;
}
}

View file

@ -23,8 +23,4 @@
package appeng.api.config;
public enum SortDir
{
ASCENDING, DESCENDING
}
public enum SortDir { ASCENDING, DESCENDING }

View file

@ -23,8 +23,4 @@
package appeng.api.config;
public enum SortOrder
{
NAME, AMOUNT, MOD, INVTWEAKS
}
public enum SortOrder { NAME, AMOUNT, MOD, INVTWEAKS }

View file

@ -23,9 +23,7 @@
package appeng.api.config;
public enum StorageFilter
{
public enum StorageFilter {
NONE,

View file

@ -23,9 +23,7 @@
package appeng.api.config;
public enum TerminalStyle
{
public enum TerminalStyle {
TALL,

View file

@ -23,9 +23,7 @@
package appeng.api.config;
public enum TunnelType
{
public enum TunnelType {
ME, // Network Tunnel
IC2_POWER, // EU Tunnel
RF_POWER, // RF Tunnel

View file

@ -23,27 +23,28 @@
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
{
public enum Upgrades {
/**
* Gold Tier Upgrades.
*/
CAPACITY( 0 ), REDSTONE( 0 ), CRAFTING( 0 ),
CAPACITY(0),
REDSTONE(0),
CRAFTING(0),
/**
* Diamond Tier Upgrades.
*/
FUZZY( 1 ), SPEED( 1 ), INVERTER( 1 );
FUZZY(1),
SPEED(1),
INVERTER(1);
/**
* @deprecated use {@link Upgrades#getTier()}
@ -55,18 +56,17 @@ public enum Upgrades
* @deprecated use {@link Upgrades#getSupported()}
*/
@Deprecated
private final Map<ItemStack, Integer> supportedMax = new HashMap<ItemStack, Integer>();
private final Map<ItemStack, Integer> supportedMax
= new HashMap<ItemStack, Integer>();
Upgrades( final int tier )
{
Upgrades(final int tier) {
this.tier = tier;
}
/**
* @return list of Items/Blocks that support this upgrade, and how many it supports.
*/
public Map<ItemStack, Integer> getSupported()
{
public Map<ItemStack, Integer> getSupported() {
return this.supportedMax;
}
@ -76,11 +76,9 @@ public enum Upgrades
* @param item machine in which this upgrade can be installed
* @param maxSupported amount how many upgrades can be installed
*/
public void registerItem( final IItemDefinition item, final int maxSupported )
{
public void registerItem(final IItemDefinition item, final int maxSupported) {
final Optional<ItemStack> maybeStack = item.maybeStack(1);
for( final ItemStack stack : maybeStack.asSet() )
{
for (final ItemStack stack : maybeStack.asSet()) {
this.registerItem(stack, maxSupported);
}
}
@ -91,10 +89,8 @@ public enum Upgrades
* @param stack machine in which this upgrade can be installed
* @param maxSupported amount how many upgrades can be installed
*/
public void registerItem( final ItemStack stack, final int maxSupported )
{
if( stack != null )
{
public void registerItem(final ItemStack stack, final int maxSupported) {
if (stack != null) {
this.supportedMax.put(stack, maxSupported);
}
}
@ -107,21 +103,17 @@ public enum Upgrades
* @deprecated use {@link Upgrades#registerItem(IItemDefinition, int)}
*/
@Deprecated
public void registerItem( final AEItemDefinition item, final int maxSupported )
{
if( item != null )
{
public void registerItem(final AEItemDefinition item, final int maxSupported) {
if (item != null) {
final ItemStack stack = item.stack(1);
if( stack != null )
{
if (stack != null) {
this.registerItem(stack, maxSupported);
}
}
}
public int getTier()
{
public int getTier() {
return this.tier;
}
}

View file

@ -23,8 +23,4 @@
package appeng.api.config;
public enum ViewItems
{
ALL, STORED, CRAFTABLE
}
public enum ViewItems { ALL, STORED, CRAFTABLE }

View file

@ -23,8 +23,4 @@
package appeng.api.config;
public enum YesNo
{
YES, NO, UNDECIDED
}
public enum YesNo { YES, NO, UNDECIDED }

View file

@ -23,16 +23,13 @@
package appeng.api.definitions;
import appeng.api.util.AEItemDefinition;
/**
* @deprecated use {@link IBlocks} now
*/
@Deprecated
public class Blocks
{
public class Blocks {
public AEItemDefinition blockQuartzOre;
public AEItemDefinition blockQuartzOreCharged;

View file

@ -1,14 +1,11 @@
package appeng.api.definitions;
import com.google.common.base.Optional;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraft.world.IBlockAccess;
public interface IBlockDefinition extends IItemDefinition
{
public interface IBlockDefinition extends IItemDefinition {
/**
* @return the {@link Block} implementation if applicable
*/

View file

@ -23,12 +23,10 @@
package appeng.api.definitions;
/**
* A list of all blocks in AE
*/
public interface IBlocks
{
public interface IBlocks {
/*
* world gen
*/

View file

@ -1,10 +1,8 @@
package appeng.api.definitions;
import net.minecraft.item.ItemStack;
import net.minecraft.world.IBlockAccess;
/**
* Interface to compare a definition with an itemstack or a block
*
@ -12,8 +10,7 @@ import net.minecraft.world.IBlockAccess;
* @version rv2
* @since rv2
*/
public interface IComparableDefinition
{
public interface IComparableDefinition {
/**
* Compare {@link ItemStack} with this
*
@ -30,7 +27,8 @@ public interface IComparableDefinition
* @param y y pos of block
* @param z z pos of block
* @return if the block is placed in the world at the specific location.
* @deprecated moved to {@link IBlockDefinition}. Is removed in the next major release rv3
* @deprecated moved to {@link IBlockDefinition}. Is removed in the next major release
* rv3
*/
@Deprecated
boolean isSameAs(IBlockAccess world, int x, int y, int z);

View file

@ -23,12 +23,10 @@
package appeng.api.definitions;
/**
* All definitions in AE
*/
public interface IDefinitions
{
public interface IDefinitions {
/**
* @return an accessible list of all of AE's blocks
*/

View file

@ -23,14 +23,11 @@
package appeng.api.definitions;
import com.google.common.base.Optional;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
public interface IItemDefinition extends IComparableDefinition
{
public interface IItemDefinition extends IComparableDefinition {
/**
* @return the {@link Item} Implementation if applicable
*/

View file

@ -23,15 +23,12 @@
package appeng.api.definitions;
import appeng.api.util.AEColoredItemDefinition;
/**
* A list of all items in AE
*/
public interface IItems
{
public interface IItems {
IItemDefinition certusQuartzAxe();
IItemDefinition certusQuartzHoe();

View file

@ -23,12 +23,10 @@
package appeng.api.definitions;
/**
* A list of all materials in AE
*/
public interface IMaterials
{
public interface IMaterials {
IItemDefinition cell2SpatialPart();
IItemDefinition cell16SpatialPart();

View file

@ -23,15 +23,12 @@
package appeng.api.definitions;
import appeng.api.util.AEColoredItemDefinition;
/**
* A list of all parts in AE
*/
public interface IParts
{
public interface IParts {
AEColoredItemDefinition cableSmart();
AEColoredItemDefinition cableCovered();

View file

@ -1,12 +1,9 @@
package appeng.api.definitions;
import com.google.common.base.Optional;
import net.minecraft.tileentity.TileEntity;
public interface ITileDefinition extends IBlockDefinition
{
public interface ITileDefinition extends IBlockDefinition {
/**
* @return the {@link TileEntity} Class if applicable.
*/

View file

@ -23,17 +23,14 @@
package appeng.api.definitions;
import appeng.api.util.AEColoredItemDefinition;
import appeng.api.util.AEItemDefinition;
/**
* @deprecated use {@link IItems}
*/
@Deprecated
public class Items
{
public class Items {
public AEItemDefinition itemCertusQuartzAxe;
public AEItemDefinition itemCertusQuartzHoe;

View file

@ -23,16 +23,13 @@
package appeng.api.definitions;
import appeng.api.util.AEItemDefinition;
/**
* @deprecated use {@link IMaterials}
*/
@Deprecated
public class Materials
{
public class Materials {
public AEItemDefinition materialCell2SpatialPart;
public AEItemDefinition materialCell16SpatialPart;

View file

@ -23,17 +23,14 @@
package appeng.api.definitions;
import appeng.api.util.AEColoredItemDefinition;
import appeng.api.util.AEItemDefinition;
/**
* @deprecated use {@link IParts}
*/
@Deprecated
public class Parts
{
public class Parts {
public AEColoredItemDefinition partCableSmart;
public AEColoredItemDefinition partCableCovered;

View file

@ -23,30 +23,24 @@
package appeng.api.events;
import appeng.api.features.ILocatable;
import cpw.mods.fml.common.eventhandler.Event;
/**
* Input Event:
* <p>
* 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 LocatableEventAnnounce( final ILocatable o, final LocatableEvent ev )
{
public LocatableEventAnnounce(final ILocatable o, final LocatableEvent ev) {
this.target = o;
this.change = ev;
}
public enum LocatableEvent
{
public enum LocatableEvent {
Register, // Adds the locatable to the registry
Unregister // Removes the locatable from the registry
}

View file

@ -23,14 +23,10 @@
package appeng.api.exceptions;
public class AppEngException extends Exception
{
public class AppEngException extends Exception {
private static final long serialVersionUID = -9051434206368465494L;
public AppEngException( final String t )
{
public AppEngException(final String t) {
super(t);
}
}

View file

@ -1,10 +1,7 @@
package appeng.api.exceptions;
public class CoreInaccessibleException extends RuntimeException
{
public CoreInaccessibleException( final String message )
{
public class CoreInaccessibleException extends RuntimeException {
public CoreInaccessibleException(final String message) {
super(message);
}
}

View file

@ -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
* <p>
* 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 <p> 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 String DEFAULT_MESSAGE
= "Connection between both nodes already exists.";
public ExistingConnectionException()
{
public ExistingConnectionException() {
super(DEFAULT_MESSAGE);
}
public ExistingConnectionException( String message )
{
public ExistingConnectionException(String message) {
super(message);
}
}

View file

@ -23,10 +23,8 @@
package appeng.api.exceptions;
import appeng.api.networking.IGridNode;
/**
* Exception indicating a failed connection between two {@link IGridNode}s.
* <p>
@ -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;
public FailedConnection()
{
}
public FailedConnection() {}
public FailedConnection( String message )
{
public FailedConnection(String message) {
super(message);
}
}

View file

@ -1,10 +1,7 @@
package appeng.api.exceptions;
public class MissingDefinition extends RuntimeException
{
public MissingDefinition( final String message )
{
public class MissingDefinition extends RuntimeException {
public MissingDefinition(final String message) {
super(message);
}
}

View file

@ -23,14 +23,10 @@
package appeng.api.exceptions;
public class MissingIngredientError extends Exception
{
public class MissingIngredientError extends Exception {
private static final long serialVersionUID = -998858343831371697L;
public MissingIngredientError( final String n )
{
public MissingIngredientError(final String n) {
super(n);
}
}

View file

@ -23,14 +23,10 @@
package appeng.api.exceptions;
public class ModNotInstalled extends Exception
{
public class ModNotInstalled extends Exception {
private static final long serialVersionUID = -9052435206368425494L;
public ModNotInstalled( final String t )
{
public ModNotInstalled(final String t) {
super(t);
}
}

View file

@ -23,7 +23,6 @@
package appeng.api.exceptions;
/**
* Exception due to trying to connect one or more null values.
* <p>
@ -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 String DEFAULT_MESSAGE
= "Connection forged between null entities.";
public NullNodeConnectionException()
{
public NullNodeConnectionException() {
super(DEFAULT_MESSAGE);
}
public NullNodeConnectionException( String message )
{
public NullNodeConnectionException(String message) {
super(message);
}
}

View file

@ -23,14 +23,10 @@
package appeng.api.exceptions;
public class RecipeError extends Exception
{
public class RecipeError extends Exception {
private static final long serialVersionUID = -6602870588617670262L;
public RecipeError( final String n )
{
public RecipeError(final String n) {
super(n);
}
}

View file

@ -23,14 +23,10 @@
package appeng.api.exceptions;
public class RegistrationError extends Exception
{
public class RegistrationError extends Exception {
private static final long serialVersionUID = -6602870588617670263L;
public RegistrationError( final String n )
{
public RegistrationError(final String n) {
super(n);
}
}

View file

@ -23,7 +23,6 @@
package appeng.api.exceptions;
/**
* Exception due to trying to connect different security realms.
* <p>
@ -34,19 +33,16 @@ package appeng.api.exceptions;
* @version rv3
* @since rv3
*/
public class SecurityConnectionException extends FailedConnection
{
public class SecurityConnectionException extends FailedConnection {
private static final long serialVersionUID = 5048714900434215426L;
private static final String DEFAULT_MESSAGE = "Connection failed due to different security realms.";
private static final String DEFAULT_MESSAGE
= "Connection failed due to different security realms.";
public SecurityConnectionException()
{
public SecurityConnectionException() {
super(DEFAULT_MESSAGE);
}
public SecurityConnectionException( String message )
{
public SecurityConnectionException(String message) {
super(message);
}
}

View file

@ -23,16 +23,12 @@
package appeng.api.features;
import net.minecraft.item.ItemStack;
/**
* Registration Records for {@link IGrinderRegistry}
*/
public interface IGrinderEntry
{
public interface IGrinderEntry {
/**
* the current input
*

View file

@ -23,18 +23,14 @@
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.
*
@ -43,7 +39,8 @@ public interface IGrinderRegistry
List<IGrinderEntry> getRecipes();
/**
* add a new recipe the easy way, in &#8594; out, how many turns., duplicates will not be added.
* add a new recipe the easy way, in &#8594; out, how many turns., duplicates will not
* be added.
*
* @param in input
* @param out output
@ -60,7 +57,8 @@ public interface IGrinderRegistry
* @param chance chance to get the optional output within 0.0 - 1.0
* @param turns amount of turns to turn the input into the outputs
*/
void addRecipe( ItemStack in, ItemStack out, ItemStack optional, float chance, int turns );
void
addRecipe(ItemStack in, ItemStack out, ItemStack optional, float chance, int turns);
/**
* add a new recipe with optional outputs, duplicates will not be added.
@ -73,7 +71,15 @@ public interface IGrinderRegistry
* @param chance2 chance to get the second optional output within 0.0 - 1.0
* @param turns amount of turns to turn the input into the outputs
*/
void addRecipe( ItemStack in, ItemStack out, ItemStack optional, float chance, ItemStack optional2, float chance2, int turns );
void addRecipe(
ItemStack in,
ItemStack out,
ItemStack optional,
float chance,
ItemStack optional2,
float chance2,
int turns
);
/**
* Searches for a recipe for a given input, and returns it.

View file

@ -1,13 +1,11 @@
package appeng.api.features;
import java.util.List;
import javax.annotation.Nonnull;
import com.google.common.base.Optional;
import net.minecraft.item.ItemStack;
import javax.annotation.Nonnull;
import java.util.List;
/**
* Registration Records for {@link IInscriberRegistry}
* <p>
@ -20,8 +18,7 @@ import java.util.List;
* @version rv2
* @since rv2
*/
public interface IInscriberRecipe
{
public interface IInscriberRecipe {
/**
* the current inputs
*

View file

@ -1,12 +1,10 @@
package appeng.api.features;
import java.util.Collection;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
import javax.annotation.Nonnull;
import java.util.Collection;
/**
* Builder for an inscriber recipe
*
@ -14,8 +12,7 @@ import java.util.Collection;
* @version rv2
* @since rv2
*/
public interface IInscriberRecipeBuilder
{
public interface IInscriberRecipeBuilder {
/**
* Creates an inscriber recipe with inputs.
* Needs to be invoked.

View file

@ -1,12 +1,10 @@
package appeng.api.features;
import net.minecraft.item.ItemStack;
import javax.annotation.Nonnull;
import java.util.Collection;
import java.util.Set;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
/**
* Lets you manipulate Inscriber Recipes, by adding or editing existing ones.
@ -15,8 +13,7 @@ import java.util.Set;
* @version rv3
* @since rv2
*/
public interface IInscriberRegistry
{
public interface IInscriberRegistry {
/**
* An immutable copy of currently registered recipes.
* <p>
@ -68,5 +65,4 @@ public interface IInscriberRegistry
* @param toBeRemovedRecipe to be removed recipe, can be null, makes just no sense.
*/
void removeRecipe(IInscriberRecipe toBeRemovedRecipe);
}

View file

@ -23,9 +23,7 @@
package appeng.api.features;
public interface IItemComparison
{
public interface IItemComparison {
boolean sameAsPrecise(IItemComparison comp);
boolean sameAsFuzzy(IItemComparison comp);

View file

@ -23,18 +23,14 @@
package appeng.api.features;
import net.minecraft.item.ItemStack;
/**
* Provider for special comparisons. when an item is encountered AE Will request
* if the comparison function handles the item, by trying to request a
* IItemComparison class.
*/
public interface IItemComparisonProvider
{
public interface IItemComparisonProvider {
/**
* should return a new IItemComparison, or return null if it doesn't handle
* the supplied item.

View file

@ -23,17 +23,13 @@
package appeng.api.features;
import appeng.api.events.LocatableEventAnnounce;
/**
* A registration record for the {@link ILocatableRegistry} use the {@link LocatableEventAnnounce} event on the Forge
* Event bus to update the registry.
* A registration record for the {@link ILocatableRegistry} use the {@link
* LocatableEventAnnounce} event on the Forge Event bus to update the registry.
*/
public interface ILocatable
{
public interface ILocatable {
/**
* @return the serial for a locatable object
*/

View file

@ -23,12 +23,10 @@
package appeng.api.features;
/**
* A Registry for locatable items, works based on serial numbers.
*/
public interface ILocatableRegistry
{
public interface ILocatableRegistry {
/**
* Attempts to find the object with the serial specified, if it can it
* returns the object.

View file

@ -23,15 +23,12 @@
package appeng.api.features;
import net.minecraft.item.ItemStack;
public interface IMatterCannonAmmoRegistry
{
public interface IMatterCannonAmmoRegistry {
/**
* register a new ammo, generally speaking this is based off of atomic weight to make it easier to guess at
* register a new ammo, generally speaking this is based off of atomic weight to make
* it easier to guess at
*
* @param ammo new ammo
* @param weight atomic weight

View file

@ -23,13 +23,9 @@
package appeng.api.features;
import net.minecraft.item.ItemStack;
public interface INetworkEncodable
{
public interface INetworkEncodable {
/**
* Used to get the current key from the item.
*

View file

@ -23,19 +23,15 @@
package appeng.api.features;
import javax.annotation.Nullable;
import appeng.api.config.TunnelType;
import net.minecraft.item.ItemStack;
import javax.annotation.Nullable;
/**
* A Registry for how p2p Tunnels are attuned
*/
public interface IP2PTunnelRegistry
{
public interface IP2PTunnelRegistry {
/**
* Allows third parties to register items from their mod as potential
* attunements for AE's P2P Tunnels

View file

@ -23,20 +23,17 @@
package appeng.api.features;
import javax.annotation.Nullable;
import com.mojang.authlib.GameProfile;
import net.minecraft.entity.player.EntityPlayer;
import javax.annotation.Nullable;
/**
* Maintains a save specific list of userids and username combinations this greatly simplifies storage internally and
* gives a common place to look up and get IDs for the security framework.
* Maintains a save specific list of userids and username combinations this greatly
* simplifies storage internally and gives a common place to look up and get IDs for the
* security framework.
*/
public interface IPlayerRegistry
{
public interface IPlayerRegistry {
/**
* @param gameProfile user game profile
* @return user id of a username.

View file

@ -23,23 +23,19 @@
package appeng.api.features;
import javax.annotation.Nullable;
import appeng.api.recipes.ICraftHandler;
import appeng.api.recipes.IRecipeHandler;
import appeng.api.recipes.ISubItemResolver;
import javax.annotation.Nullable;
/**
* @author AlgorithmX2
* @author thatsIch
* @version rv3 - 10.08.2015
* @since rv0
*/
public interface IRecipeHandlerRegistry
{
public interface IRecipeHandlerRegistry {
/**
* Add a new Recipe Handler to the parser.
* <p>

View file

@ -23,22 +23,18 @@
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.
*/
@ -50,8 +46,9 @@ public interface IRegistryContainer
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.
* 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();

View file

@ -23,16 +23,12 @@
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.
*

View file

@ -23,18 +23,14 @@
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
@ -44,7 +40,8 @@ public interface IWirelessTermHandler extends INetworkEncodable
/**
* 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
* @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

View file

@ -23,18 +23,14 @@
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.
*

View file

@ -23,15 +23,13 @@
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 disableWorldGenForProviderID(
WorldGenType type, Class<? extends WorldProvider> provider
);
void enableWorldGenForDimension(WorldGenType type, int dimID);
@ -39,8 +37,5 @@ public interface IWorldGen
boolean isWorldGenEnabled(WorldGenType type, World w);
enum WorldGenType
{
CertusQuartz, ChargedCertusQuartz, Meteorites
}
enum WorldGenType { CertusQuartz, ChargedCertusQuartz, Meteorites }
}

View file

@ -1,8 +1,6 @@
package appeng.api.features;
public enum InscriberProcessType
{
public enum InscriberProcessType {
/**
* uses the optionals as catalyst
*/

View file

@ -23,19 +23,15 @@
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
{
public interface ICraftingPatternItem {
/**
* Access Details about a pattern
*

View file

@ -23,13 +23,10 @@
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.
*/

View file

@ -23,16 +23,12 @@
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
{
public interface IUpgradeableHost extends IConfigurableObject, ISegmentedInventory {
/**
* determine how many of an upgrade are installed.
*/

View file

@ -23,18 +23,15 @@
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 class TransitionResult {
public final boolean success;
public final double energyUsage;
public TransitionResult( final boolean _success, final double power )
{
public TransitionResult(final boolean _success, final double power) {
this.success = _success;
this.energyUsage = power;
}

View file

@ -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
{
public interface IGuiItem {
IGuiItemObject getGuiObject(ItemStack is, World world, int x, int y, int z);
}

View file

@ -23,12 +23,8 @@
package appeng.api.implementations.guiobjects;
import net.minecraft.item.ItemStack;
public interface IGuiItemObject
{
public interface IGuiItemObject {
ItemStack getItemStack();
}

View file

@ -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
{
public interface INetworkTool extends IInventory, IGuiItemObject {
IGridHost getGridHost(); // null for most purposes.
}

View file

@ -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<IAEItemStack>, IEnergySource, IGuiItemObject
{
}
public interface IPortableCell
extends ITerminalHost, IMEMonitor<IAEItemStack>, IEnergySource, IGuiItemObject {}

View file

@ -23,18 +23,14 @@
package appeng.api.implementations.items;
import appeng.api.config.AccessRestriction;
import appeng.api.networking.energy.IAEPowerStorage;
import net.minecraft.item.ItemStack;
/**
* Basically the same as {@link IAEPowerStorage}, but for items.
*/
public interface IAEItemPowerStorage
{
public interface IAEItemPowerStorage {
/**
* Inject amt, power into the device, it will store what it can, and return
* the amount unable to be stored.

View file

@ -23,18 +23,14 @@
package appeng.api.implementations.items;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
/**
* Implemented on AE's wrench(s) as a substitute for if BC's API is not
* available.
*/
public interface IAEWrench
{
public interface IAEWrench {
/**
* Check if the wrench can be used.
*

View file

@ -23,6 +23,7 @@
package appeng.api.implementations.items;
import java.util.EnumSet;
import appeng.api.config.SecurityPermissions;
import appeng.api.features.IPlayerRegistry;
@ -30,12 +31,7 @@ import appeng.api.networking.security.ISecurityRegistry;
import com.mojang.authlib.GameProfile;
import net.minecraft.item.ItemStack;
import java.util.EnumSet;
public interface IBiometricCard
{
public interface IBiometricCard {
/**
* Set the {@link GameProfile} to null, to clear it.
*/
@ -83,5 +79,6 @@ public interface IBiometricCard
* @param pr player registry
* @param is card
*/
void registerPermissions( ISecurityRegistry registry, IPlayerRegistry pr, ItemStack is );
void
registerPermissions(ISecurityRegistry registry, IPlayerRegistry pr, ItemStack is);
}

View file

@ -23,15 +23,11 @@
package appeng.api.implementations.items;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.item.ItemStack;
public interface IGrowableCrystal
{
public interface IGrowableCrystal {
ItemStack triggerGrowth(ItemStack is);
float getMultiplier(Block blk, Material mat);

View file

@ -23,18 +23,14 @@
package appeng.api.implementations.items;
import net.minecraft.item.ItemStack;
import java.util.Set;
import net.minecraft.item.ItemStack;
/**
* Lets you specify the name of the group of items this falls under.
*/
public interface IItemGroup
{
public interface IItemGroup {
/**
* returning null, is the same as not implementing the interface at all.
*

View file

@ -23,20 +23,16 @@
package appeng.api.implementations.items;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
/**
* Memory Card API
* <p>
* 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.

View file

@ -23,20 +23,16 @@
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
@ -89,5 +85,7 @@ public interface ISpatialStorageCell
* @param doTransition transition
* @return result of transition
*/
TransitionResult doSpatialTransition( ItemStack is, World w, WorldCoord min, WorldCoord max, boolean doTransition );
TransitionResult doSpatialTransition(
ItemStack is, World w, WorldCoord min, WorldCoord max, boolean doTransition
);
}

View file

@ -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,9 +37,7 @@ import net.minecraft.item.ItemStack;
* <p>
* 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.

Some files were not shown because too many files have changed in this diff Show more