Compare commits
136 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| db7296c0a1 | |||
| d1f2625262 | |||
| b756a3f564 | |||
| dfa595ad2a | |||
| 0519f60cb0 | |||
| 81c32d5181 | |||
| b609b08f98 | |||
| 50f141edbd | |||
| 0542a58e4b | |||
| 58db877006 | |||
| dff3364eb5 | |||
| 88310cf04b | |||
| d81eb1fe2d | |||
| d8f452b665 | |||
| ec05bd994c | |||
| dff48c07c9 | |||
| 234d97b8ce | |||
| 9bf8b4388f | |||
| b31f2df58d | |||
| 14df50dbf3 | |||
| 6aeca93b85 | |||
| 3143c871d0 | |||
| 7f7c71a22e | |||
| 05f522580b | |||
| 926af89029 | |||
| f1248c4c33 | |||
| bd2ee1c5ea | |||
| 8ef286b9d6 | |||
| 4b4693498d | |||
| e41d6a0289 | |||
| c8d716d39f | |||
| 33c1535bfa | |||
| 1067d30264 | |||
| 96145e75f4 | |||
| 2ba6dad3b2 | |||
| a870393edb | |||
| d04bc2fb3c | |||
| 9d52e85afa | |||
| 3745e6ce8d | |||
| a4c38263d1 | |||
| c1a7a35192 | |||
| eb98ec891b | |||
| 69a5507f96 | |||
| a1f43ff51a | |||
| da91585d69 | |||
| f138a68f3e | |||
| 30191eb5ba | |||
| 4552394f6e | |||
| 9c3d3db3fb | |||
| 9c1c9056f1 | |||
| b5582688a3 | |||
| 34597a4e21 | |||
| e0b32d2641 | |||
| 6baf952904 | |||
| f132ae3678 | |||
| 720b38442e | |||
| 136f5d7314 | |||
| a83e4b7c3d | |||
| 1bb0109c45 | |||
| 4744dfab78 | |||
| 7dedd4700f | |||
| 95fb894ba3 | |||
| 621ddc5535 | |||
| ece09a956b | |||
| db5493f60b | |||
| f0482dd391 | |||
| c53b3b5dfc | |||
| ad16550a86 | |||
| 99e4928542 | |||
| 43995a4b32 | |||
| 8ec9bb8b3b | |||
| 18c8197ff4 | |||
| dd1ca1e286 | |||
| c9f0b4e489 | |||
| 63a6037ad2 | |||
| 3675f154d1 | |||
| 5e5be0e192 | |||
| e300bf93fd | |||
| cdf949a557 | |||
| 4c5aeac39f | |||
| a5f58bb22f | |||
| dddfd6dbaf | |||
| 53f448e578 | |||
| 311939c63c | |||
| d8a3556bc3 | |||
| 57e84c3039 | |||
| 1bcf7f9d52 | |||
| 2746002eb1 | |||
| ee6a3def22 | |||
| 0b15c56037 | |||
| 39c26a72e2 | |||
| d2f62ef98c | |||
| 6476a519bb | |||
| b8e2d73aa0 | |||
| 5a2b35ccd0 | |||
| 16218e46ec | |||
| 27b692823c | |||
| 68aaec16bc | |||
| ec8d393403 | |||
| 27e5eac6aa | |||
| ca521935e0 | |||
| f60798129c | |||
| 3e90f354c5 | |||
| a27ed6d9ba | |||
| b18addbf37 | |||
| 3fa501d726 | |||
| ef3cb0a455 | |||
| be82dfec1f | |||
| 8eb5ad01cf | |||
| a3c5e4cb05 | |||
| c35e057d96 | |||
| a5a80b58d5 | |||
| c10c809c9e | |||
| 3d2bd84450 | |||
| 2776b2d430 | |||
| f0d04699d1 | |||
| afbce77d0b | |||
| 3a5844a0fe | |||
| e2798aaaf4 | |||
| 99d86511a1 | |||
| a8c920932e | |||
| bd9eaa2d48 | |||
| c6f232ab63 | |||
| 29a4464e18 | |||
| 63e375f208 | |||
| 2f51568772 | |||
| 59adde7c6b | |||
| 52c512635d | |||
| e0175bac98 | |||
| 63ab2bbad0 | |||
| 33b04f6ff9 | |||
| 236f6f72e3 | |||
| 8920d949d2 | |||
| eed0c11d7f | |||
| 8179259afa | |||
| e38293a291 |
@@ -1,6 +1,6 @@
|
|||||||
# Applied Energistics 2
|
# Applied Energistics 2
|
||||||
|
|
||||||
## Table of Content
|
## Table of Contents
|
||||||
|
|
||||||
* [About](#about)
|
* [About](#about)
|
||||||
* [Contacts](#contacts)
|
* [Contacts](#contacts)
|
||||||
@@ -31,7 +31,7 @@ Applied Energistics 2 API is (c) 2013 - 2014 AlgorithmX2 and licensed under MIT.
|
|||||||
Applied Energistics 2 is (c) 2013 - 2014 AlgorithmX2 and licensed under LGPL v3.
|
Applied Energistics 2 is (c) 2013 - 2014 AlgorithmX2 and licensed under LGPL v3.
|
||||||
See the LICENSE.txt for details or go to http://www.gnu.org/licenses/lgpl-3.0.txt for more information.
|
See the LICENSE.txt for details or go to http://www.gnu.org/licenses/lgpl-3.0.txt for more information.
|
||||||
|
|
||||||
Textures and Models are licensed under Creative Commons 3.
|
Textures and Models are licensed under [Creative Commons, Attribution-NonCommercial-ShareAlike 3.0]( https://creativecommons.org/licenses/by-nc-sa/3.0/).
|
||||||
|
|
||||||
## Downloads
|
## Downloads
|
||||||
|
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ jar {
|
|||||||
minecraft {
|
minecraft {
|
||||||
version = config.minecraft_version + "-" + config.forge_version
|
version = config.minecraft_version + "-" + config.forge_version
|
||||||
|
|
||||||
|
replaceIn "AEConfig.java"
|
||||||
replace "@version@", project.version
|
replace "@version@", project.version
|
||||||
replace "@aechannel@", config.aechannel
|
replace "@aechannel@", config.aechannel
|
||||||
|
|
||||||
|
|||||||
+8
-8
@@ -8,17 +8,17 @@ archivesBaseName=appliedenergistics2
|
|||||||
# Versions #
|
# Versions #
|
||||||
#########################################################
|
#########################################################
|
||||||
minecraft_version=1.7.10
|
minecraft_version=1.7.10
|
||||||
forge_version=10.13.2.1230
|
forge_version=10.13.2.1291
|
||||||
|
|
||||||
#########################################################
|
#########################################################
|
||||||
# APIs used for development #
|
# APIs used for development #
|
||||||
#########################################################
|
#########################################################
|
||||||
cb_minecraft_version=1.7.10
|
cb_minecraft_version=1.7.10
|
||||||
fmp_version=1.1.0.311
|
fmp_version=1.1.1.324
|
||||||
code_chicken_lib_version=1.1.1.105
|
code_chicken_lib_version=1.1.3.127
|
||||||
code_chicken_core_version=1.0.4.29
|
code_chicken_core_version=1.0.4.35
|
||||||
nei_version=1.0.3.66
|
nei_version=1.0.4.90
|
||||||
waila_version=1.5.5_1.7.10
|
bc_version=6.4.3
|
||||||
|
|
||||||
#########################################################
|
#########################################################
|
||||||
# API Stubs #
|
# API Stubs #
|
||||||
@@ -32,10 +32,10 @@ api_craftguide_version=1
|
|||||||
api_ic2_version=1
|
api_ic2_version=1
|
||||||
api_immibis_version=1
|
api_immibis_version=1
|
||||||
api_invtweaks_version=1
|
api_invtweaks_version=1
|
||||||
api_mekansim_version=1
|
api_mekansim_version=1.7.10-8.0.1.198
|
||||||
api_mfr_version=1
|
api_mfr_version=1
|
||||||
api_railcraft_version=1
|
api_railcraft_version=1
|
||||||
api_rblocks_version=1
|
api_rblocks_version=1
|
||||||
api_rf_version=2
|
api_rf_version=2
|
||||||
api_rotarycraft_version=1
|
api_rotarycraft_version=1
|
||||||
dev_buildcraft_version=1
|
api_waila_version=1.5.10_1.7.10
|
||||||
@@ -10,25 +10,3 @@ task copyChicken(type: Copy, dependsOn: "extractUserDev") {
|
|||||||
}
|
}
|
||||||
tasks.setupDevWorkspace.dependsOn copyChicken
|
tasks.setupDevWorkspace.dependsOn copyChicken
|
||||||
tasks.setupDecompWorkspace.dependsOn copyChicken
|
tasks.setupDecompWorkspace.dependsOn copyChicken
|
||||||
|
|
||||||
// same for BC hacked file
|
|
||||||
task copyBuildcraft(type: Copy, dependsOn: "extractUserDev") {
|
|
||||||
from { configurations.compile }
|
|
||||||
include "**/*buildcraft*.jar"
|
|
||||||
into file(minecraft.runDir + "/mods")
|
|
||||||
mustRunAfter "deobfBinJar"
|
|
||||||
mustRunAfter "repackMinecraft"
|
|
||||||
}
|
|
||||||
tasks.setupDevWorkspace.dependsOn copyBuildcraft
|
|
||||||
tasks.setupDecompWorkspace.dependsOn copyBuildcraft
|
|
||||||
|
|
||||||
// and for IC2 because it needs its EMLJ jar
|
|
||||||
task copyIndustrialcraft(type: Copy, dependsOn: "extractUserDev") {
|
|
||||||
from { configurations.compile }
|
|
||||||
include "**/*industrialcraft*.jar"
|
|
||||||
into file(minecraft.runDir + "/mods")
|
|
||||||
mustRunAfter "deobfBinJar"
|
|
||||||
mustRunAfter "repackMinecraft"
|
|
||||||
}
|
|
||||||
tasks.setupDevWorkspace.dependsOn copyIndustrialcraft
|
|
||||||
tasks.setupDecompWorkspace.dependsOn copyIndustrialcraft
|
|
||||||
@@ -43,24 +43,22 @@ dependencies {
|
|||||||
compile "codechicken:CodeChickenCore:${config.cb_minecraft_version}-${config.code_chicken_core_version}:dev"
|
compile "codechicken:CodeChickenCore:${config.cb_minecraft_version}-${config.code_chicken_core_version}:dev"
|
||||||
compile "codechicken:NotEnoughItems:${config.cb_minecraft_version}-${config.nei_version}:dev"
|
compile "codechicken:NotEnoughItems:${config.cb_minecraft_version}-${config.nei_version}:dev"
|
||||||
|
|
||||||
compile "mcp.mobius.waila:Waila:${config.waila_version}:dev"
|
compile "com.mod-buildcraft:buildcraft:${config.bc_version}:dev"
|
||||||
|
|
||||||
|
// self compiled APIs
|
||||||
compile(group: 'api', name: 'betterstorage', version: "${config.api_betterstorage_version}")
|
compile(group: 'api', name: 'betterstorage', version: "${config.api_betterstorage_version}")
|
||||||
compile(group: 'api', name: 'coloredlightscore', version: "${config.api_coloredlightscore_version}")
|
compile(group: 'api', name: 'coloredlightscore', version: "${config.api_coloredlightscore_version}")
|
||||||
compile(group: 'api', name: 'craftguide', version: "${config.api_craftguide_version}")
|
compile(group: 'api', name: 'craftguide', version: "${config.api_craftguide_version}")
|
||||||
compile(group: 'api', name: 'ic2', version: "${config.api_ic2_version}")
|
compile(group: 'api', name: 'ic2', version: "${config.api_ic2_version}")
|
||||||
compile(group: 'api', name: 'immibis', version: "${config.api_immibis_version}")
|
compile(group: 'api', name: 'immibis', version: "${config.api_immibis_version}")
|
||||||
compile(group: 'api', name: 'invtweaks', version: "${config.api_invtweaks_version}")
|
compile(group: 'api', name: 'invtweaks', version: "${config.api_invtweaks_version}")
|
||||||
compile(group: 'api', name: 'mekansim', version: "${config.api_mekansim_version}")
|
compile(group: 'api', name: 'mekanism', version: "${config.api_mekansim_version}", classifier: 'api')
|
||||||
compile(group: 'api', name: 'mfr', version: "${config.api_mfr_version}")
|
compile(group: 'api', name: 'mfr', version: "${config.api_mfr_version}")
|
||||||
compile(group: 'api', name: 'railcraft', version: "${config.api_railcraft_version}")
|
compile(group: 'api', name: 'railcraft', version: "${config.api_railcraft_version}")
|
||||||
compile(group: 'api', name: 'rblocks', version: "${config.api_rblocks_version}")
|
compile(group: 'api', name: 'rblocks', version: "${config.api_rblocks_version}")
|
||||||
compile(group: 'api', name: 'rf', version: "${config.api_rf_version}")
|
compile(group: 'api', name: 'rf', version: "${config.api_rf_version}")
|
||||||
compile(group: 'api', name: 'rotarycraft', version: "${config.api_rotarycraft_version}")
|
compile(group: 'api', name: 'rotarycraft', version: "${config.api_rotarycraft_version}")
|
||||||
compile(group: 'dev', name: 'buildcraft', version: "${config.dev_buildcraft_version}")
|
compile "appeng:Waila:${config.api_waila_version}:api"
|
||||||
|
|
||||||
// add hacked buildcraft jar to compile time (for facades)
|
|
||||||
compile fileTree(dir: 'libs', include: '*.jar')
|
|
||||||
|
|
||||||
testCompile "junit:junit:4.11"
|
testCompile "junit:junit:4.11"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public class AEApi
|
|||||||
/**
|
/**
|
||||||
* API Entry Point.
|
* API Entry Point.
|
||||||
*
|
*
|
||||||
* @return the {@link IAppEngApi} or null if the instance could not be retrieved
|
* @return the {@link IAppEngApi} or null if the INSTANCE could not be retrieved
|
||||||
*/
|
*/
|
||||||
public static IAppEngApi instance()
|
public static IAppEngApi instance()
|
||||||
{
|
{
|
||||||
@@ -47,7 +47,7 @@ public class AEApi
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
Class c = Class.forName( "appeng.core.Api" );
|
Class c = Class.forName( "appeng.core.Api" );
|
||||||
api = (IAppEngApi) c.getField( "instance" ).get( c );
|
api = (IAppEngApi) c.getField( "INSTANCE" ).get( c );
|
||||||
}
|
}
|
||||||
catch (Throwable e)
|
catch (Throwable e)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,28 +29,28 @@ public enum AccessRestriction
|
|||||||
|
|
||||||
private final int permissionBit;
|
private final int permissionBit;
|
||||||
|
|
||||||
private AccessRestriction(int v) {
|
AccessRestriction( int v ) {
|
||||||
permissionBit = v;
|
this.permissionBit = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasPermission(AccessRestriction ar)
|
public boolean hasPermission(AccessRestriction ar)
|
||||||
{
|
{
|
||||||
return (permissionBit & ar.permissionBit) == ar.permissionBit;
|
return ( this.permissionBit & ar.permissionBit) == ar.permissionBit;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AccessRestriction restrictPermissions(AccessRestriction ar)
|
public AccessRestriction restrictPermissions(AccessRestriction ar)
|
||||||
{
|
{
|
||||||
return getPermByBit( permissionBit & ar.permissionBit);
|
return this.getPermByBit( this.permissionBit & ar.permissionBit);
|
||||||
}
|
}
|
||||||
|
|
||||||
public AccessRestriction addPermissions(AccessRestriction ar)
|
public AccessRestriction addPermissions(AccessRestriction ar)
|
||||||
{
|
{
|
||||||
return getPermByBit( permissionBit | ar.permissionBit);
|
return this.getPermByBit( this.permissionBit | ar.permissionBit);
|
||||||
}
|
}
|
||||||
|
|
||||||
public AccessRestriction removePermissions(AccessRestriction ar)
|
public AccessRestriction removePermissions(AccessRestriction ar)
|
||||||
{
|
{
|
||||||
return getPermByBit( permissionBit & (~ar.permissionBit) );
|
return this.getPermByBit( this.permissionBit & (~ar.permissionBit) );
|
||||||
}
|
}
|
||||||
|
|
||||||
private AccessRestriction getPermByBit(int bit)
|
private AccessRestriction getPermByBit(int bit)
|
||||||
|
|||||||
@@ -31,14 +31,14 @@ public enum FuzzyMode
|
|||||||
final public float breakPoint;
|
final public float breakPoint;
|
||||||
final public float percentage;
|
final public float percentage;
|
||||||
|
|
||||||
private FuzzyMode(float p) {
|
FuzzyMode( float p ) {
|
||||||
percentage = p;
|
this.percentage = p;
|
||||||
breakPoint = p / 100.0f;
|
this.breakPoint = p / 100.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int calculateBreakPoint(int maxDamage)
|
public int calculateBreakPoint(int maxDamage)
|
||||||
{
|
{
|
||||||
return (int) ((percentage * maxDamage) / 100.0f);
|
return (int) (( this.percentage * maxDamage) / 100.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -34,11 +34,11 @@ public enum PowerMultiplier
|
|||||||
|
|
||||||
public double multiply(double in)
|
public double multiply(double in)
|
||||||
{
|
{
|
||||||
return in * multiplier;
|
return in * this.multiplier;
|
||||||
}
|
}
|
||||||
|
|
||||||
public double divide(double in)
|
public double divide(double in)
|
||||||
{
|
{
|
||||||
return in / multiplier;
|
return in / this.multiplier;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ public enum PowerUnits
|
|||||||
RF("gui.appliedenergistics2.units.thermalexpansion"), // ThermalExpansion - Redstone Flux
|
RF("gui.appliedenergistics2.units.thermalexpansion"), // ThermalExpansion - Redstone Flux
|
||||||
MK("gui.appliedenergistics2.units.mekanism"); // Mekanism - Joules
|
MK("gui.appliedenergistics2.units.mekanism"); // Mekanism - Joules
|
||||||
|
|
||||||
private PowerUnits(String un) {
|
PowerUnits( String un ) {
|
||||||
unlocalizedName = un;
|
this.unlocalizedName = un;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -59,7 +59,7 @@ public enum PowerUnits
|
|||||||
*/
|
*/
|
||||||
public double convertTo(PowerUnits target, double value)
|
public double convertTo(PowerUnits target, double value)
|
||||||
{
|
{
|
||||||
return (value * conversionRatio) / target.conversionRatio;
|
return (value * this.conversionRatio ) / target.conversionRatio;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -56,15 +56,15 @@ public enum SecurityPermissions
|
|||||||
*/
|
*/
|
||||||
SECURITY;
|
SECURITY;
|
||||||
|
|
||||||
final private String unlocalizedName = "gui.appliedenergistics2.security." + name().toLowerCase();
|
final private String unlocalizedName = "gui.appliedenergistics2.security." + this.name().toLowerCase();
|
||||||
|
|
||||||
public String getUnlocalizedName()
|
public String getUnlocalizedName()
|
||||||
{
|
{
|
||||||
return unlocalizedName + ".name";
|
return this.unlocalizedName + ".name";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUnlocalizedTip()
|
public String getUnlocalizedTip()
|
||||||
{
|
{
|
||||||
return unlocalizedName + ".tip";
|
return this.unlocalizedName + ".tip";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,47 +23,50 @@
|
|||||||
|
|
||||||
package appeng.api.config;
|
package appeng.api.config;
|
||||||
|
|
||||||
|
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
|
|
||||||
|
|
||||||
public enum Settings
|
public enum Settings
|
||||||
{
|
{
|
||||||
LEVEL_EMITTER_MODE(EnumSet.allOf( LevelEmitterMode.class )),
|
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 ));
|
STORAGE_FILTER( EnumSet.allOf( StorageFilter.class ) ), PLACE_BLOCK( EnumSet.of( YesNo.YES, YesNo.NO ) );
|
||||||
|
|
||||||
private EnumSet values;
|
private final EnumSet values;
|
||||||
|
|
||||||
public EnumSet getPossibleValues()
|
public EnumSet getPossibleValues()
|
||||||
{
|
{
|
||||||
return values;
|
return this.values;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Settings(EnumSet set) {
|
Settings( EnumSet set )
|
||||||
|
{
|
||||||
if ( set == null || set.isEmpty() )
|
if ( set == null || set.isEmpty() )
|
||||||
throw new RuntimeException( "Invalid configuration." );
|
throw new RuntimeException( "Invalid configuration." );
|
||||||
values = set;
|
this.values = set;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public enum Upgrades
|
|||||||
public final int myTier;
|
public final int myTier;
|
||||||
public final HashMap<ItemStack, Integer> supportedMax = new HashMap<ItemStack, Integer>();
|
public final HashMap<ItemStack, Integer> supportedMax = new HashMap<ItemStack, Integer>();
|
||||||
|
|
||||||
private Upgrades( int tier )
|
Upgrades( int tier )
|
||||||
{
|
{
|
||||||
this.myTier = tier;
|
this.myTier = tier;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,8 +44,8 @@ public class LocatableEventAnnounce extends Event
|
|||||||
final public LocatableEvent change;
|
final public LocatableEvent change;
|
||||||
|
|
||||||
public LocatableEventAnnounce(ILocatable o, LocatableEvent ev) {
|
public LocatableEventAnnounce(ILocatable o, LocatableEvent ev) {
|
||||||
target = o;
|
this.target = o;
|
||||||
change = ev;
|
this.change = ev;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,42 +36,42 @@ public interface IGrinderEntry
|
|||||||
*
|
*
|
||||||
* @return input that the grinder will accept.
|
* @return input that the grinder will accept.
|
||||||
*/
|
*/
|
||||||
public ItemStack getInput();
|
ItemStack getInput();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* lets you change the grinder recipe by changing its input.
|
* lets you change the grinder recipe by changing its input.
|
||||||
*
|
*
|
||||||
* @param input input item
|
* @param input input item
|
||||||
*/
|
*/
|
||||||
public void setInput(ItemStack input);
|
void setInput( ItemStack input );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gets the current output
|
* gets the current output
|
||||||
*
|
*
|
||||||
* @return output that the grinder will produce
|
* @return output that the grinder will produce
|
||||||
*/
|
*/
|
||||||
public ItemStack getOutput();
|
ItemStack getOutput();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gets the current output
|
* gets the current output
|
||||||
*
|
*
|
||||||
* @return output that the grinder will produce
|
* @return output that the grinder will produce
|
||||||
*/
|
*/
|
||||||
public ItemStack getOptionalOutput();
|
ItemStack getOptionalOutput();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gets the current output
|
* gets the current output
|
||||||
*
|
*
|
||||||
* @return output that the grinder will produce
|
* @return output that the grinder will produce
|
||||||
*/
|
*/
|
||||||
public ItemStack getSecondOptionalOutput();
|
ItemStack getSecondOptionalOutput();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* allows you to change the output.
|
* allows you to change the output.
|
||||||
*
|
*
|
||||||
* @param output output item
|
* @param output output item
|
||||||
*/
|
*/
|
||||||
public void setOutput(ItemStack output);
|
void setOutput( ItemStack output );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* stack, and 0.0-1.0 chance that it will be generated.
|
* stack, and 0.0-1.0 chance that it will be generated.
|
||||||
@@ -79,14 +79,14 @@ public interface IGrinderEntry
|
|||||||
* @param output output item
|
* @param output output item
|
||||||
* @param chance generation chance
|
* @param chance generation chance
|
||||||
*/
|
*/
|
||||||
public void setOptionalOutput(ItemStack output, float chance);
|
void setOptionalOutput( ItemStack output, float chance );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 0.0 - 1.0 the chance that the optional output will be generated.
|
* 0.0 - 1.0 the chance that the optional output will be generated.
|
||||||
*
|
*
|
||||||
* @return chance of optional output
|
* @return chance of optional output
|
||||||
*/
|
*/
|
||||||
public float getOptionalChance();
|
float getOptionalChance();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* stack, and 0.0-1.0 chance that it will be generated.
|
* stack, and 0.0-1.0 chance that it will be generated.
|
||||||
@@ -94,26 +94,26 @@ public interface IGrinderEntry
|
|||||||
* @param output second optional output item
|
* @param output second optional output item
|
||||||
* @param chance second optional output chance
|
* @param chance second optional output chance
|
||||||
*/
|
*/
|
||||||
public void setSecondOptionalOutput(ItemStack output, float chance);
|
void setSecondOptionalOutput( ItemStack output, float chance );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 0.0 - 1.0 the chance that the optional output will be generated.
|
* 0.0 - 1.0 the chance that the optional output will be generated.
|
||||||
*
|
*
|
||||||
* @return second optional output chance
|
* @return second optional output chance
|
||||||
*/
|
*/
|
||||||
public float getSecondOptionalChance();
|
float getSecondOptionalChance();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Energy cost, in turns.
|
* Energy cost, in turns.
|
||||||
*
|
*
|
||||||
* @return number of turns it takes to produce the output from the input.
|
* @return number of turns it takes to produce the output from the input.
|
||||||
*/
|
*/
|
||||||
public int getEnergyCost();
|
int getEnergyCost();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows you to adjust the number of turns
|
* Allows you to adjust the number of turns
|
||||||
*
|
*
|
||||||
* @param c number of turns to produce output.
|
* @param c number of turns to produce output.
|
||||||
*/
|
*/
|
||||||
public void setEnergyCost(int c);
|
void setEnergyCost( int c );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,10 +23,11 @@
|
|||||||
|
|
||||||
package appeng.api.features;
|
package appeng.api.features;
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lets you manipulate Grinder Recipes, by adding or editing existing ones.
|
* Lets you manipulate Grinder Recipes, by adding or editing existing ones.
|
||||||
*/
|
*/
|
||||||
@@ -38,7 +39,7 @@ public interface IGrinderRegistry
|
|||||||
*
|
*
|
||||||
* @return currentlyRegisteredRecipes
|
* @return currentlyRegisteredRecipes
|
||||||
*/
|
*/
|
||||||
public List<IGrinderEntry> getRecipes();
|
List<IGrinderEntry> getRecipes();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* add a new recipe the easy way, in → out, how many turns., duplicates will not be added.
|
* add a new recipe the easy way, in → out, how many turns., duplicates will not be added.
|
||||||
@@ -47,7 +48,7 @@ public interface IGrinderRegistry
|
|||||||
* @param out output
|
* @param out output
|
||||||
* @param turns amount of turns to turn the input into the output
|
* @param turns amount of turns to turn the input into the output
|
||||||
*/
|
*/
|
||||||
public void addRecipe(ItemStack in, ItemStack out, int turns);
|
void addRecipe( ItemStack in, ItemStack out, int turns );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* add a new recipe with optional outputs, duplicates will not be added.
|
* add a new recipe with optional outputs, duplicates will not be added.
|
||||||
@@ -79,6 +80,6 @@ public interface IGrinderRegistry
|
|||||||
* @param input input
|
* @param input input
|
||||||
* @return identified recipe or null
|
* @return identified recipe or null
|
||||||
*/
|
*/
|
||||||
public IGrinderEntry getRecipeForInput(ItemStack input);
|
IGrinderEntry getRecipeForInput( ItemStack input );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ package appeng.api.features;
|
|||||||
public interface IItemComparison
|
public interface IItemComparison
|
||||||
{
|
{
|
||||||
|
|
||||||
public boolean sameAsPrecise(IItemComparison comp);
|
boolean sameAsPrecise( IItemComparison comp );
|
||||||
|
|
||||||
public boolean sameAsFuzzy(IItemComparison comp);
|
boolean sameAsFuzzy( IItemComparison comp );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,6 +48,6 @@ public interface IItemComparisonProvider
|
|||||||
* @param stack item
|
* @param stack item
|
||||||
* @return true, if getComparison will return a valid IItemComparison Object
|
* @return true, if getComparison will return a valid IItemComparison Object
|
||||||
*/
|
*/
|
||||||
public boolean canHandle(ItemStack stack);
|
boolean canHandle( ItemStack stack );
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -23,19 +23,31 @@
|
|||||||
|
|
||||||
package appeng.api.features;
|
package appeng.api.features;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Registry for locatable items, works based on serial numbers.
|
* 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
|
* Attempts to find the object with the serial specified, if it can it
|
||||||
* returns the object.
|
* returns the object.
|
||||||
*
|
*
|
||||||
* @param serial serial
|
* @param serial serial
|
||||||
|
*
|
||||||
* @return requestedObject, or null
|
* @return requestedObject, or null
|
||||||
|
*
|
||||||
|
* @deprecated use {@link ILocatableRegistry#getLocatableBy(long)}
|
||||||
*/
|
*/
|
||||||
public abstract Object findLocatableBySerial(long serial);
|
@Deprecated
|
||||||
|
Object findLocatableBySerial( long serial );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the {@link ILocatable} with the registered serial, if available
|
||||||
|
*
|
||||||
|
* @param serial serial
|
||||||
|
*
|
||||||
|
* @return requestedObject, or null, if the object does not exist anymore
|
||||||
|
*/
|
||||||
|
ILocatable getLocatableBy( long serial );
|
||||||
}
|
}
|
||||||
@@ -23,7 +23,9 @@
|
|||||||
|
|
||||||
package appeng.api.features;
|
package appeng.api.features;
|
||||||
|
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
import appeng.api.config.TunnelType;
|
import appeng.api.config.TunnelType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -41,7 +43,7 @@ public interface IP2PTunnelRegistry
|
|||||||
* @param type
|
* @param type
|
||||||
* - the type of tunnel
|
* - the type of tunnel
|
||||||
*/
|
*/
|
||||||
public abstract void addNewAttunement(ItemStack trigger, TunnelType type);
|
void addNewAttunement( ItemStack trigger, TunnelType type );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns null if no attunement can be found.
|
* returns null if no attunement can be found.
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public interface IRecipeHandlerRegistry
|
|||||||
/**
|
/**
|
||||||
* @return a new recipe handler, which can be used to parse, and read recipe files.
|
* @return a new recipe handler, which can be used to parse, and read recipe files.
|
||||||
*/
|
*/
|
||||||
public IRecipeHandler createNewRecipehandler();
|
IRecipeHandler createNewRecipehandler();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* resolve sub items by name.
|
* resolve sub items by name.
|
||||||
|
|||||||
@@ -45,6 +45,6 @@ public interface ISpecialComparisonRegistry
|
|||||||
*
|
*
|
||||||
* @param prov comparison provider
|
* @param prov comparison provider
|
||||||
*/
|
*/
|
||||||
public void addComparisonProvider(IItemComparisonProvider prov);
|
void addComparisonProvider( IItemComparisonProvider prov );
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -29,16 +29,16 @@ import net.minecraft.world.WorldProvider;
|
|||||||
public interface IWorldGen
|
public interface IWorldGen
|
||||||
{
|
{
|
||||||
|
|
||||||
public enum WorldGenType
|
enum WorldGenType
|
||||||
{
|
{
|
||||||
CertusQuartz, ChargedCertusQuartz, Meteorites
|
CertusQuartz, ChargedCertusQuartz, Meteorites
|
||||||
}
|
}
|
||||||
|
|
||||||
public void disableWorldGenForProviderID(WorldGenType type, Class<? extends WorldProvider> provider);
|
void disableWorldGenForProviderID( WorldGenType type, Class<? extends WorldProvider> provider );
|
||||||
|
|
||||||
public void enableWorldGenForDimension(WorldGenType type, int dimID);
|
void enableWorldGenForDimension( WorldGenType type, int dimID );
|
||||||
|
|
||||||
public void disableWorldGenForDimension(WorldGenType type, int dimID);
|
void disableWorldGenForDimension( WorldGenType type, int dimID );
|
||||||
|
|
||||||
boolean isWorldGenEnabled(WorldGenType type, World w);
|
boolean isWorldGenEnabled(WorldGenType type, World w);
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class TransitionResult
|
|||||||
public final double energyUsage;
|
public final double energyUsage;
|
||||||
|
|
||||||
public TransitionResult(boolean _success, double power) {
|
public TransitionResult(boolean _success, double power) {
|
||||||
success = _success;
|
this.success = _success;
|
||||||
energyUsage = power;
|
this.energyUsage = power;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,5 +28,5 @@ import net.minecraft.item.ItemStack;
|
|||||||
public interface IGuiItemObject
|
public interface IGuiItemObject
|
||||||
{
|
{
|
||||||
|
|
||||||
public ItemStack getItemStack();
|
ItemStack getItemStack();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,9 @@
|
|||||||
|
|
||||||
package appeng.api.implementations.items;
|
package appeng.api.implementations.items;
|
||||||
|
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
import appeng.api.config.AccessRestriction;
|
import appeng.api.config.AccessRestriction;
|
||||||
import appeng.api.networking.energy.IAEPowerStorage;
|
import appeng.api.networking.energy.IAEPowerStorage;
|
||||||
|
|
||||||
@@ -39,7 +41,7 @@ public interface IAEItemPowerStorage
|
|||||||
*
|
*
|
||||||
* @return amount unable to be stored
|
* @return amount unable to be stored
|
||||||
*/
|
*/
|
||||||
public double injectAEPower(ItemStack is, double amt);
|
double injectAEPower( ItemStack is, double amt );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attempt to extract power from the device, it will extract what it can and
|
* Attempt to extract power from the device, it will extract what it can and
|
||||||
@@ -48,17 +50,17 @@ public interface IAEItemPowerStorage
|
|||||||
* @param amt to be extracted power from device
|
* @param amt to be extracted power from device
|
||||||
* @return what it could extract
|
* @return what it could extract
|
||||||
*/
|
*/
|
||||||
public double extractAEPower(ItemStack is, double amt);
|
double extractAEPower( ItemStack is, double amt );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the current maximum power ( this can change :P )
|
* @return the current maximum power ( this can change :P )
|
||||||
*/
|
*/
|
||||||
public double getAEMaxPower(ItemStack is);
|
double getAEMaxPower( ItemStack is );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the current AE Power Level, this may exceed getMEMaxPower()
|
* @return the current AE Power Level, this may exceed getMEMaxPower()
|
||||||
*/
|
*/
|
||||||
public double getAECurrentPower(ItemStack is);
|
double getAECurrentPower( ItemStack is );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Control the power flow by telling what the network can do, either add? or
|
* Control the power flow by telling what the network can do, either add? or
|
||||||
@@ -66,6 +68,6 @@ public interface IAEItemPowerStorage
|
|||||||
*
|
*
|
||||||
* @return access restriction of network
|
* @return access restriction of network
|
||||||
*/
|
*/
|
||||||
public AccessRestriction getPowerFlow(ItemStack is);
|
AccessRestriction getPowerFlow( ItemStack is );
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -39,7 +39,7 @@ public interface IPartStorageMonitor extends IPartMonitor, IPart, IGridHost, INe
|
|||||||
* IAEFluidStack the quantity is important remember to use getStackSize() on the IAEStack, and not on the
|
* IAEFluidStack the quantity is important remember to use getStackSize() on the IAEStack, and not on the
|
||||||
* FluidStack/ItemStack acquired from it.
|
* FluidStack/ItemStack acquired from it.
|
||||||
*/
|
*/
|
||||||
IAEStack getDisplayed();
|
IAEStack<?> getDisplayed();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the current locked state of the Storage Monitor
|
* @return the current locked state of the Storage Monitor
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public interface IGrid
|
|||||||
* @param iface face
|
* @param iface face
|
||||||
* @return the IGridCache you requested.
|
* @return the IGridCache you requested.
|
||||||
*/
|
*/
|
||||||
public <C extends IGridCache> C getCache(Class<? extends IGridCache> iface);
|
<C extends IGridCache> C getCache( Class<? extends IGridCache> iface );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Post an event into the network event bus.
|
* Post an event into the network event bus.
|
||||||
@@ -49,7 +49,7 @@ public interface IGrid
|
|||||||
* - event to post
|
* - event to post
|
||||||
* @return returns ev back to original poster
|
* @return returns ev back to original poster
|
||||||
*/
|
*/
|
||||||
public MENetworkEvent postEvent(MENetworkEvent ev);
|
MENetworkEvent postEvent( MENetworkEvent ev );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Post an event into the network event bus, but direct it at a single node.
|
* Post an event into the network event bus, but direct it at a single node.
|
||||||
@@ -58,7 +58,7 @@ public interface IGrid
|
|||||||
* event to post
|
* event to post
|
||||||
* @return returns ev back to original poster
|
* @return returns ev back to original poster
|
||||||
*/
|
*/
|
||||||
public MENetworkEvent postEventTo(IGridNode node, MENetworkEvent ev);
|
MENetworkEvent postEventTo( IGridNode node, MENetworkEvent ev );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get a list of the diversity of classes, you can use this to better detect which machines your interested in,
|
* get a list of the diversity of classes, you can use this to better detect which machines your interested in,
|
||||||
@@ -66,7 +66,7 @@ public interface IGrid
|
|||||||
*
|
*
|
||||||
* @return IReadOnlyCollection of all available host types (Of Type IGridHost).
|
* @return IReadOnlyCollection of all available host types (Of Type IGridHost).
|
||||||
*/
|
*/
|
||||||
public IReadOnlyCollection<Class<? extends IGridHost>> getMachinesClasses();
|
IReadOnlyCollection<Class<? extends IGridHost>> getMachinesClasses();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get machines on the network.
|
* Get machines on the network.
|
||||||
@@ -74,7 +74,7 @@ public interface IGrid
|
|||||||
* @param gridHostClass class of the grid host
|
* @param gridHostClass class of the grid host
|
||||||
* @return IMachineSet of all nodes belonging to hosts of specified class.
|
* @return IMachineSet of all nodes belonging to hosts of specified class.
|
||||||
*/
|
*/
|
||||||
public IMachineSet getMachines(Class<? extends IGridHost> gridHostClass);
|
IMachineSet getMachines( Class<? extends IGridHost> gridHostClass );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return IReadOnlyCollection for all nodes on the network, node visitors are preferred.
|
* @return IReadOnlyCollection for all nodes on the network, node visitors are preferred.
|
||||||
@@ -84,11 +84,11 @@ public interface IGrid
|
|||||||
/**
|
/**
|
||||||
* @return true if the last node has been removed from the grid.
|
* @return true if the last node has been removed from the grid.
|
||||||
*/
|
*/
|
||||||
public boolean isEmpty();
|
boolean isEmpty();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the node considered the pivot point of the grid.
|
* @return the node considered the pivot point of the grid.
|
||||||
*/
|
*/
|
||||||
public IGridNode getPivot();
|
IGridNode getPivot();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,13 +23,15 @@
|
|||||||
|
|
||||||
package appeng.api.networking;
|
package appeng.api.networking;
|
||||||
|
|
||||||
import appeng.api.parts.IPart;
|
|
||||||
import appeng.api.util.AEColor;
|
import java.util.EnumSet;
|
||||||
import appeng.api.util.DimensionalCoord;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
import java.util.EnumSet;
|
import appeng.api.parts.IPart;
|
||||||
|
import appeng.api.util.AEColor;
|
||||||
|
import appeng.api.util.DimensionalCoord;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An Implementation is required to create your node for IGridHost
|
* An Implementation is required to create your node for IGridHost
|
||||||
@@ -85,7 +87,7 @@ public interface IGridBlock
|
|||||||
* @param grid grid
|
* @param grid grid
|
||||||
* @param channelsInUse used channels
|
* @param channelsInUse used channels
|
||||||
*/
|
*/
|
||||||
public void setNetworkStatus(IGrid grid, int channelsInUse);
|
void setNetworkStatus( IGrid grid, int channelsInUse );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine which sides of the block can be connected too, only used when isWorldAccessible returns true, not used
|
* Determine which sides of the block can be connected too, only used when isWorldAccessible returns true, not used
|
||||||
@@ -108,5 +110,5 @@ public interface IGridBlock
|
|||||||
*
|
*
|
||||||
* @return the render item stack to use to render this node, null is valid, and will not show this node.
|
* @return the render item stack to use to render this node, null is valid, and will not show this node.
|
||||||
*/
|
*/
|
||||||
public ItemStack getMachineRepresentation();
|
ItemStack getMachineRepresentation();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ public interface IGridCacheRegistry
|
|||||||
void registerGridCache(Class<? extends IGridCache> iface, Class<? extends IGridCache> implementation);
|
void registerGridCache(Class<? extends IGridCache> iface, Class<? extends IGridCache> implementation);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* requests a new instance of a grid cache for use, used internally
|
* requests a new INSTANCE of a grid cache for use, used internally
|
||||||
*
|
*
|
||||||
* @param grid grid
|
* @param grid grid
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -32,6 +32,6 @@ public interface IGridConnectionVisitor extends IGridVisitor
|
|||||||
* @param n
|
* @param n
|
||||||
* the connection.
|
* the connection.
|
||||||
*/
|
*/
|
||||||
public void visitConnection(IGridConnection n);
|
void visitConnection( IGridConnection n );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,8 +23,10 @@
|
|||||||
|
|
||||||
package appeng.api.networking;
|
package appeng.api.networking;
|
||||||
|
|
||||||
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
import appeng.api.parts.IPart;
|
import appeng.api.parts.IPart;
|
||||||
import appeng.api.util.AECableType;
|
import appeng.api.util.AECableType;
|
||||||
|
|
||||||
@@ -46,9 +48,9 @@ public interface IGridHost
|
|||||||
* feel free to ignore this, most blocks will use the same node
|
* feel free to ignore this, most blocks will use the same node
|
||||||
* for every side.
|
* for every side.
|
||||||
* @return a new IGridNode, create these with
|
* @return a new IGridNode, create these with
|
||||||
* AEApi.instance().createGridNode( MyIGridBlock )
|
* AEApi.INSTANCE().createGridNode( MyIGridBlock )
|
||||||
*/
|
*/
|
||||||
public IGridNode getGridNode(ForgeDirection dir);
|
IGridNode getGridNode( ForgeDirection dir );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines how cables render when they connect to this block. Priority is
|
* Determines how cables render when they connect to this block. Priority is
|
||||||
@@ -56,11 +58,11 @@ public interface IGridHost
|
|||||||
*
|
*
|
||||||
* @param dir direction
|
* @param dir direction
|
||||||
*/
|
*/
|
||||||
public AECableType getCableConnectionType(ForgeDirection dir);
|
AECableType getCableConnectionType( ForgeDirection dir );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* break this host, its violating security rules, just break your block, or part.
|
* break this host, its violating security rules, just break your block, or part.
|
||||||
*/
|
*/
|
||||||
public void securityBreak();
|
void securityBreak();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,6 +39,6 @@ public interface IGridVisitor
|
|||||||
*
|
*
|
||||||
* @return true to continue visiting nodes beyond this node.
|
* @return true to continue visiting nodes beyond this node.
|
||||||
*/
|
*/
|
||||||
public boolean visitNode(IGridNode n);
|
boolean visitNode( IGridNode n );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,6 @@ public interface ICraftingCallback
|
|||||||
* @param job
|
* @param job
|
||||||
* - final job
|
* - final job
|
||||||
*/
|
*/
|
||||||
public void calculationComplete(ICraftingJob job);
|
void calculationComplete( ICraftingJob job );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import appeng.api.storage.data.IAEItemStack;
|
|||||||
/**
|
/**
|
||||||
* do not implement provided by {@link ICraftingPatternItem}
|
* do not implement provided by {@link ICraftingPatternItem}
|
||||||
*
|
*
|
||||||
* caching this instance will increase performance of validation and checks.
|
* caching this INSTANCE will increase performance of validation and checks.
|
||||||
*/
|
*/
|
||||||
public interface ICraftingPatternDetails
|
public interface ICraftingPatternDetails
|
||||||
{
|
{
|
||||||
@@ -82,7 +82,7 @@ public interface ICraftingPatternDetails
|
|||||||
boolean canSubstitute();
|
boolean canSubstitute();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allow using this instance of the pattern details to preform the crafting action with performance enhancements.
|
* Allow using this INSTANCE of the pattern details to preform the crafting action with performance enhancements.
|
||||||
*
|
*
|
||||||
* @param craftingInv inventory
|
* @param craftingInv inventory
|
||||||
* @param world crafting world
|
* @param world crafting world
|
||||||
|
|||||||
@@ -40,17 +40,17 @@ public interface IAEPowerStorage extends IEnergySource
|
|||||||
*
|
*
|
||||||
* @return amount of power which was unable to be stored
|
* @return amount of power which was unable to be stored
|
||||||
*/
|
*/
|
||||||
public double injectAEPower(double amt, Actionable mode);
|
double injectAEPower( double amt, Actionable mode );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the current maximum power ( this can change :P )
|
* @return the current maximum power ( this can change :P )
|
||||||
*/
|
*/
|
||||||
public double getAEMaxPower();
|
double getAEMaxPower();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the current AE Power Level, this may exceed getMEMaxPower()
|
* @return the current AE Power Level, this may exceed getMEMaxPower()
|
||||||
*/
|
*/
|
||||||
public double getAECurrentPower();
|
double getAECurrentPower();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checked on network reset to see if your block can be used as a public power storage ( use getPowerFlow to control
|
* Checked on network reset to see if your block can be used as a public power storage ( use getPowerFlow to control
|
||||||
@@ -58,13 +58,13 @@ public interface IAEPowerStorage extends IEnergySource
|
|||||||
*
|
*
|
||||||
* @return true if it can be used as a public power storage
|
* @return true if it can be used as a public power storage
|
||||||
*/
|
*/
|
||||||
public boolean isAEPublicPowerStorage();
|
boolean isAEPublicPowerStorage();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Control the power flow by telling what the network can do, either add? or subtract? or both!
|
* Control the power flow by telling what the network can do, either add? or subtract? or both!
|
||||||
*
|
*
|
||||||
* @return access restriction what the network can do
|
* @return access restriction what the network can do
|
||||||
*/
|
*/
|
||||||
public AccessRestriction getPowerFlow();
|
AccessRestriction getPowerFlow();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -36,18 +36,18 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
|
|||||||
/**
|
/**
|
||||||
* @return the current calculated idle energy drain each tick, is used internally to drain power for each tick.
|
* @return the current calculated idle energy drain each tick, is used internally to drain power for each tick.
|
||||||
*/
|
*/
|
||||||
public double getIdlePowerUsage();
|
double getIdlePowerUsage();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the average power drain over the past 10 ticks, includes idle usage during this time, and all use of
|
* @return the average power drain over the past 10 ticks, includes idle usage during this time, and all use of
|
||||||
* extractPower.
|
* extractPower.
|
||||||
*/
|
*/
|
||||||
public double getAvgPowerUsage();
|
double getAvgPowerUsage();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the average energy injected into the system per tick, for the last 10 ticks.
|
* @return the average energy injected into the system per tick, for the last 10 ticks.
|
||||||
*/
|
*/
|
||||||
public double getAvgPowerInjection();
|
double getAvgPowerInjection();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AE maintains an idle draw of power separate from active power draw, it condenses this into a single operation
|
* AE maintains an idle draw of power separate from active power draw, it condenses this into a single operation
|
||||||
@@ -59,7 +59,7 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
|
|||||||
*
|
*
|
||||||
* @return if the network is powered or not.
|
* @return if the network is powered or not.
|
||||||
*/
|
*/
|
||||||
public boolean isNetworkPowered();
|
boolean isNetworkPowered();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AE will accept any power, and store it, to maintain sanity please don't send more then 10,000 at a time.
|
* AE will accept any power, and store it, to maintain sanity please don't send more then 10,000 at a time.
|
||||||
@@ -78,14 +78,14 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
|
|||||||
* should the action be simulated or performed?
|
* should the action be simulated or performed?
|
||||||
* @return the amount of power that the network has OVER the limit.
|
* @return the amount of power that the network has OVER the limit.
|
||||||
*/
|
*/
|
||||||
public double injectPower(double amt, Actionable mode);
|
double injectPower( double amt, Actionable mode );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* this is should be considered an estimate, and not relied upon for real calculations.
|
* this is should be considered an estimate, and not relied upon for real calculations.
|
||||||
*
|
*
|
||||||
* @return estimated available power.
|
* @return estimated available power.
|
||||||
*/
|
*/
|
||||||
public double getStoredPower();
|
double getStoredPower();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* this is should be considered an estimate, and not relied upon for real calculations.
|
* this is should be considered an estimate, and not relied upon for real calculations.
|
||||||
@@ -100,6 +100,6 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
|
|||||||
*
|
*
|
||||||
* @return Amount of power required to charge the grid, in AE.
|
* @return Amount of power required to charge the grid, in AE.
|
||||||
*/
|
*/
|
||||||
public double getEnergyDemand(double maxRequired);
|
double getEnergyDemand( double maxRequired );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,16 +36,16 @@ public interface IEnergyGridProvider
|
|||||||
/**
|
/**
|
||||||
* internal use only
|
* internal use only
|
||||||
*/
|
*/
|
||||||
public double extractAEPower(double amt, Actionable mode, Set<IEnergyGrid> seen);
|
double extractAEPower( double amt, Actionable mode, Set<IEnergyGrid> seen );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* internal use only
|
* internal use only
|
||||||
*/
|
*/
|
||||||
public double injectAEPower(double amt, Actionable mode, Set<IEnergyGrid> seen);
|
double injectAEPower( double amt, Actionable mode, Set<IEnergyGrid> seen );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* internal use only
|
* internal use only
|
||||||
*/
|
*/
|
||||||
public double getEnergyDemand(double d, Set<IEnergyGrid> seen);
|
double getEnergyDemand( double d, Set<IEnergyGrid> seen );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,6 @@ public interface IEnergySource
|
|||||||
* @param mode should the action be simulated or performed?
|
* @param mode should the action be simulated or performed?
|
||||||
* @return returns extracted power.
|
* @return returns extracted power.
|
||||||
*/
|
*/
|
||||||
public double extractAEPower(double amt, Actionable mode, PowerMultiplier usePowerMultiplier);
|
double extractAEPower( double amt, Actionable mode, PowerMultiplier usePowerMultiplier );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class MENetworkChannelChanged extends MENetworkEvent
|
|||||||
public final IGridNode node;
|
public final IGridNode node;
|
||||||
|
|
||||||
public MENetworkChannelChanged(IGridNode n) {
|
public MENetworkChannelChanged(IGridNode n) {
|
||||||
node = n;
|
this.node = n;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public class MENetworkCraftingCpuChange extends MENetworkEvent
|
|||||||
public final IGridNode node;
|
public final IGridNode node;
|
||||||
|
|
||||||
public MENetworkCraftingCpuChange(IGridNode n) {
|
public MENetworkCraftingCpuChange(IGridNode n) {
|
||||||
node = n;
|
this.node = n;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,8 +33,8 @@ public class MENetworkCraftingPatternChange extends MENetworkEvent
|
|||||||
public final IGridNode node;
|
public final IGridNode node;
|
||||||
|
|
||||||
public MENetworkCraftingPatternChange(ICraftingProvider p, IGridNode n) {
|
public MENetworkCraftingPatternChange(ICraftingProvider p, IGridNode n) {
|
||||||
provider = p;
|
this.provider = p;
|
||||||
node = n;
|
this.node = n;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public class MENetworkEvent
|
|||||||
*/
|
*/
|
||||||
public void cancel()
|
public void cancel()
|
||||||
{
|
{
|
||||||
canceled = true;
|
this.canceled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -51,7 +51,7 @@ public class MENetworkEvent
|
|||||||
*/
|
*/
|
||||||
public boolean isCanceled()
|
public boolean isCanceled()
|
||||||
{
|
{
|
||||||
return canceled;
|
return this.canceled;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -61,7 +61,7 @@ public class MENetworkEvent
|
|||||||
*/
|
*/
|
||||||
public int getVisitedObjects()
|
public int getVisitedObjects()
|
||||||
{
|
{
|
||||||
return visited;
|
return this.visited;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -71,6 +71,6 @@ public class MENetworkEvent
|
|||||||
*/
|
*/
|
||||||
public void setVisitedObjects(int v)
|
public void setVisitedObjects(int v)
|
||||||
{
|
{
|
||||||
visited = v;
|
this.visited = v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public class MENetworkPowerIdleChange extends MENetworkEvent
|
|||||||
public final IGridNode node;
|
public final IGridNode node;
|
||||||
|
|
||||||
public MENetworkPowerIdleChange(IGridNode nodeThatChanged) {
|
public MENetworkPowerIdleChange(IGridNode nodeThatChanged) {
|
||||||
node = nodeThatChanged;
|
this.node = nodeThatChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,8 +54,8 @@ public class MENetworkPowerStorage extends MENetworkEvent
|
|||||||
public final PowerEventType type;
|
public final PowerEventType type;
|
||||||
|
|
||||||
public MENetworkPowerStorage(IAEPowerStorage t, PowerEventType y) {
|
public MENetworkPowerStorage(IAEPowerStorage t, PowerEventType y) {
|
||||||
storage = t;
|
this.storage = t;
|
||||||
type = y;
|
this.type = y;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ package appeng.api.networking.events;
|
|||||||
import appeng.api.networking.IGridHost;
|
import appeng.api.networking.IGridHost;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An event that is posted whenever a spatial IO is actived, called for IGridCache
|
* An event that is posted whenever a spatial IO is active, called for IGridCache
|
||||||
*/
|
*/
|
||||||
public class MENetworkSpatialEvent extends MENetworkEvent
|
public class MENetworkSpatialEvent extends MENetworkEvent
|
||||||
{
|
{
|
||||||
@@ -34,12 +34,12 @@ public class MENetworkSpatialEvent extends MENetworkEvent
|
|||||||
public final double spatialEnergyUsage;
|
public final double spatialEnergyUsage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param SpatialIO ( instance of the SpatialIO block )
|
* @param SpatialIO ( INSTANCE of the SpatialIO block )
|
||||||
* @param EnergyUsage ( the amount of energy that the SpatialIO uses)
|
* @param EnergyUsage ( the amount of energy that the SpatialIO uses)
|
||||||
*/
|
*/
|
||||||
public MENetworkSpatialEvent(IGridHost SpatialIO, double EnergyUsage)
|
public MENetworkSpatialEvent(IGridHost SpatialIO, double EnergyUsage)
|
||||||
{
|
{
|
||||||
host = SpatialIO;
|
this.host = SpatialIO;
|
||||||
spatialEnergyUsage = EnergyUsage;
|
this.spatialEnergyUsage = EnergyUsage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ public class MENetworkStorageEvent extends MENetworkEvent
|
|||||||
public final StorageChannel channel;
|
public final StorageChannel channel;
|
||||||
|
|
||||||
public MENetworkStorageEvent(IMEMonitor o, StorageChannel chan) {
|
public MENetworkStorageEvent(IMEMonitor o, StorageChannel chan) {
|
||||||
monitor = o;
|
this.monitor = o;
|
||||||
channel = chan;
|
this.channel = chan;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public interface IPathingGrid extends IGridCache
|
|||||||
ControllerState getControllerState();
|
ControllerState getControllerState();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* trigger a network reset, booting, pathfinding and all.
|
* trigger a network reset, booting, path-finding and all.
|
||||||
*/
|
*/
|
||||||
void repath();
|
void repath();
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class MachineSource extends BaseActionSource
|
|||||||
}
|
}
|
||||||
|
|
||||||
public MachineSource(IActionHost v) {
|
public MachineSource(IActionHost v) {
|
||||||
via = v;
|
this.via = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,8 +38,8 @@ public class PlayerSource extends BaseActionSource
|
|||||||
}
|
}
|
||||||
|
|
||||||
public PlayerSource(EntityPlayer p, IActionHost v) {
|
public PlayerSource(EntityPlayer p, IActionHost v) {
|
||||||
player = p;
|
this.player = p;
|
||||||
via = v;
|
this.via = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,10 +68,10 @@ public class TickingRequest
|
|||||||
public final boolean canBeAlerted;
|
public final boolean canBeAlerted;
|
||||||
|
|
||||||
public TickingRequest(int min, int max, boolean sleep, boolean alertable) {
|
public TickingRequest(int min, int max, boolean sleep, boolean alertable) {
|
||||||
minTickRate = min;
|
this.minTickRate = min;
|
||||||
maxTickRate = max;
|
this.maxTickRate = max;
|
||||||
isSleeping = sleep;
|
this.isSleeping = sleep;
|
||||||
canBeAlerted = alertable;
|
this.canBeAlerted = alertable;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,8 +33,8 @@ public enum CableRenderMode
|
|||||||
public final boolean transparentFacades;
|
public final boolean transparentFacades;
|
||||||
public final boolean opaqueFacades;
|
public final boolean opaqueFacades;
|
||||||
|
|
||||||
private CableRenderMode(boolean hideFacades) {
|
CableRenderMode( boolean hideFacades ) {
|
||||||
this.transparentFacades = hideFacades;
|
this.transparentFacades = hideFacades;
|
||||||
opaqueFacades = !hideFacades;
|
this.opaqueFacades = !hideFacades;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ public interface IPartHost
|
|||||||
*
|
*
|
||||||
* @param side side of part
|
* @param side side of part
|
||||||
* @param suppressUpdate
|
* @param suppressUpdate
|
||||||
* - used if you need to replace a part's instance, without really removing it first.
|
* - used if you need to replace a part's INSTANCE, without really removing it first.
|
||||||
*/
|
*/
|
||||||
void removePart(ForgeDirection side, boolean suppressUpdate);
|
void removePart(ForgeDirection side, boolean suppressUpdate);
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ import net.minecraft.item.ItemStack;
|
|||||||
/**
|
/**
|
||||||
* This is a pretty basic requirement, once you implement the interface, and createPartFromItemStack
|
* 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 );
|
* 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.
|
* then simply add these two methods, which tell MC to use the Block Textures, and call AE's Bus Placement Code.
|
||||||
*
|
*
|
||||||
@@ -45,7 +45,7 @@ import net.minecraft.item.ItemStack;
|
|||||||
* {@literal @}Override
|
* {@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 );
|
* return AEApi.INSTANCE().partHelper().placeBus( is, x, y, z, side, player, world );
|
||||||
* }
|
* }
|
||||||
* </code>
|
* </code>
|
||||||
* </pre>
|
* </pre>
|
||||||
@@ -55,7 +55,7 @@ public interface IPartItem
|
|||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* create a new part instance, from the item stack.
|
* create a new part INSTANCE, from the item stack.
|
||||||
*
|
*
|
||||||
* @param is item
|
* @param is item
|
||||||
* @return part from item
|
* @return part from item
|
||||||
|
|||||||
@@ -47,19 +47,19 @@ public class SelectedPart
|
|||||||
public final ForgeDirection side;
|
public final ForgeDirection side;
|
||||||
|
|
||||||
public SelectedPart() {
|
public SelectedPart() {
|
||||||
part = null;
|
this.part = null;
|
||||||
facade = null;
|
this.facade = null;
|
||||||
side = ForgeDirection.UNKNOWN;
|
this.side = ForgeDirection.UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SelectedPart(IPart part, ForgeDirection side) {
|
public SelectedPart(IPart part, ForgeDirection side) {
|
||||||
this.part = part;
|
this.part = part;
|
||||||
facade = null;
|
this.facade = null;
|
||||||
this.side = side;
|
this.side = side;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SelectedPart(IFacadePart facade, ForgeDirection side) {
|
public SelectedPart(IFacadePart facade, ForgeDirection side) {
|
||||||
part = null;
|
this.part = null;
|
||||||
this.facade = facade;
|
this.facade = facade;
|
||||||
this.side = side;
|
this.side = side;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,12 +23,13 @@
|
|||||||
|
|
||||||
package appeng.api.recipes;
|
package appeng.api.recipes;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import appeng.api.exceptions.MissingIngredientError;
|
import appeng.api.exceptions.MissingIngredientError;
|
||||||
import appeng.api.exceptions.RecipeError;
|
import appeng.api.exceptions.RecipeError;
|
||||||
import appeng.api.exceptions.RegistrationError;
|
import appeng.api.exceptions.RegistrationError;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface ICraftHandler
|
public interface ICraftHandler
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -39,7 +40,7 @@ public interface ICraftHandler
|
|||||||
* @param output parsed outputs
|
* @param output parsed outputs
|
||||||
* @throws RecipeError
|
* @throws RecipeError
|
||||||
*/
|
*/
|
||||||
public void setup(List<List<IIngredient>> input, List<List<IIngredient>> output) throws RecipeError;
|
void setup( List<List<IIngredient>> input, List<List<IIngredient>> output ) throws RecipeError;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* called when all recipes are parsed, and your required to register your recipe.
|
* called when all recipes are parsed, and your required to register your recipe.
|
||||||
@@ -47,6 +48,6 @@ public interface ICraftHandler
|
|||||||
* @throws RegistrationError
|
* @throws RegistrationError
|
||||||
* @throws MissingIngredientError
|
* @throws MissingIngredientError
|
||||||
*/
|
*/
|
||||||
public void register() throws RegistrationError, MissingIngredientError;
|
void register() throws RegistrationError, MissingIngredientError;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,9 @@
|
|||||||
|
|
||||||
package appeng.api.recipes;
|
package appeng.api.recipes;
|
||||||
|
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
import appeng.api.exceptions.MissingIngredientError;
|
import appeng.api.exceptions.MissingIngredientError;
|
||||||
import appeng.api.exceptions.RegistrationError;
|
import appeng.api.exceptions.RegistrationError;
|
||||||
|
|
||||||
@@ -55,30 +57,30 @@ public interface IIngredient {
|
|||||||
*
|
*
|
||||||
* @return true if this slot contains no ItemStack, this is passed as "_"
|
* @return true if this slot contains no ItemStack, this is passed as "_"
|
||||||
*/
|
*/
|
||||||
public boolean isAir();
|
boolean isAir();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return The Name Space of the item. Prefer getItemStack or getItemStackSet
|
* @return The Name Space of the item. Prefer getItemStack or getItemStackSet
|
||||||
*/
|
*/
|
||||||
public String getNameSpace();
|
String getNameSpace();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return The Name of the item. Prefer getItemStack or getItemStackSet
|
* @return The Name of the item. Prefer getItemStack or getItemStackSet
|
||||||
*/
|
*/
|
||||||
public String getItemName();
|
String getItemName();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return The Damage Value of the item. Prefer getItemStack or getItemStackSet
|
* @return The Damage Value of the item. Prefer getItemStack or getItemStackSet
|
||||||
*/
|
*/
|
||||||
public int getDamageValue();
|
int getDamageValue();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return The Damage Value of the item. Prefer getItemStack or getItemStackSet
|
* @return The Damage Value of the item. Prefer getItemStack or getItemStackSet
|
||||||
*/
|
*/
|
||||||
public int getQty();
|
int getQty();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bakes the lists in for faster runtime lookups.
|
* Bakes the lists in for faster runtime look-ups.
|
||||||
* @throws MissingIngredientError
|
* @throws MissingIngredientError
|
||||||
* @throws RegistrationError
|
* @throws RegistrationError
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -31,6 +31,6 @@ public interface ISubItemResolver
|
|||||||
* @param fullName name of sub item
|
* @param fullName name of sub item
|
||||||
* @return either a ResolveResult, or a ResolverResultSet
|
* @return either a ResolveResult, or a ResolverResultSet
|
||||||
*/
|
*/
|
||||||
public Object resolveItemByName(String namespace, String fullName);
|
Object resolveItemByName( String namespace, String fullName );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,15 +33,15 @@ public class ResolverResult
|
|||||||
final public NBTTagCompound compound;
|
final public NBTTagCompound compound;
|
||||||
|
|
||||||
public ResolverResult(String name, int damage) {
|
public ResolverResult(String name, int damage) {
|
||||||
itemName = name;
|
this.itemName = name;
|
||||||
damageValue = damage;
|
this.damageValue = damage;
|
||||||
compound = null;
|
this.compound = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ResolverResult(String name, int damage, NBTTagCompound data) {
|
public ResolverResult(String name, int damage, NBTTagCompound data) {
|
||||||
itemName = name;
|
this.itemName = name;
|
||||||
damageValue = damage;
|
this.damageValue = damage;
|
||||||
compound = data;
|
this.compound = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ public class ResolverResultSet
|
|||||||
public final List<ItemStack> results;
|
public final List<ItemStack> results;
|
||||||
|
|
||||||
public ResolverResultSet(String myName, ItemStack... set) {
|
public ResolverResultSet(String myName, ItemStack... set) {
|
||||||
results = Arrays.asList( set );
|
this.results = Arrays.asList( set );
|
||||||
name = myName;
|
this.name = myName;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ package appeng.api.storage;
|
|||||||
import appeng.api.networking.security.IActionHost;
|
import appeng.api.networking.security.IActionHost;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a IGridhost that contributes to storage, such as a ME Chest, or ME Drive.
|
* Represents an {@link appeng.api.networking.IGridHost} that contributes to storage, such as a ME Chest, or ME Drive.
|
||||||
*/
|
*/
|
||||||
public interface ICellContainer extends IActionHost, ICellProvider, ISaveProvider
|
public interface ICellContainer extends IActionHost, ICellProvider, ISaveProvider
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public interface IMEInventory<StackType extends IAEStack>
|
|||||||
* @param src action source
|
* @param src action source
|
||||||
* @return returns the number of items not added.
|
* @return returns the number of items not added.
|
||||||
*/
|
*/
|
||||||
public StackType injectItems(StackType input, Actionable type, BaseActionSource src);
|
StackType injectItems( StackType input, Actionable type, BaseActionSource src );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extract the specified item from the ME Inventory
|
* Extract the specified item from the ME Inventory
|
||||||
@@ -60,7 +60,7 @@ public interface IMEInventory<StackType extends IAEStack>
|
|||||||
* simulate, or perform action?
|
* simulate, or perform action?
|
||||||
* @return returns the number of items extracted, null
|
* @return returns the number of items extracted, null
|
||||||
*/
|
*/
|
||||||
public StackType extractItems(StackType request, Actionable mode, BaseActionSource src);
|
StackType extractItems( StackType request, Actionable mode, BaseActionSource src );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* request a full report of all available items, storage.
|
* request a full report of all available items, storage.
|
||||||
@@ -69,11 +69,11 @@ public interface IMEInventory<StackType extends IAEStack>
|
|||||||
* the IItemList the results will be written too
|
* the IItemList the results will be written too
|
||||||
* @return returns same list that was passed in, is passed out
|
* @return returns same list that was passed in, is passed out
|
||||||
*/
|
*/
|
||||||
public IItemList<StackType> getAvailableItems(IItemList<StackType> out);
|
IItemList<StackType> getAvailableItems( IItemList<StackType> out );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the type of channel your handler should be part of
|
* @return the type of channel your handler should be part of
|
||||||
*/
|
*/
|
||||||
public StorageChannel getChannel();
|
StorageChannel getChannel();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public interface IMEInventoryHandler<StackType extends IAEStack> extends IMEInve
|
|||||||
*
|
*
|
||||||
* @return the access
|
* @return the access
|
||||||
*/
|
*/
|
||||||
public AccessRestriction getAccess();
|
AccessRestriction getAccess();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* determine if a particular item is prioritized for this inventory handler, if it is, then it will be added to this
|
* determine if a particular item is prioritized for this inventory handler, if it is, then it will be added to this
|
||||||
@@ -50,7 +50,7 @@ public interface IMEInventoryHandler<StackType extends IAEStack> extends IMEInve
|
|||||||
* - item that might be added
|
* - item that might be added
|
||||||
* @return if its prioritized
|
* @return if its prioritized
|
||||||
*/
|
*/
|
||||||
public boolean isPrioritized(StackType input);
|
boolean isPrioritized( StackType input );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* determine if an item can be accepted and stored.
|
* determine if an item can be accepted and stored.
|
||||||
@@ -59,23 +59,23 @@ public interface IMEInventoryHandler<StackType extends IAEStack> extends IMEInve
|
|||||||
* - item that might be added
|
* - item that might be added
|
||||||
* @return if the item can be added
|
* @return if the item can be added
|
||||||
*/
|
*/
|
||||||
public boolean canAccept(StackType input);
|
boolean canAccept( StackType input );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* determine what the priority of the inventory is.
|
* determine what the priority of the inventory is.
|
||||||
*
|
*
|
||||||
* @return the priority, zero is default, positive and negative are supported.
|
* @return the priority, zero is default, positive and negative are supported.
|
||||||
*/
|
*/
|
||||||
public int getPriority();
|
int getPriority();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* pass back value for blinkCell.
|
* pass back value for blinkCell.
|
||||||
*
|
*
|
||||||
* @return the slot index for the cell that this represents in the storage unit, the method on the
|
* @return the slot index for the cell that this represents in the storage unit, the method on the
|
||||||
* {@link ICellContainer} will be called with this value, only trust the return value of this method if you
|
* {@link ICellContainer} will be called with this value, only trust the return value of this method if you
|
||||||
* are the implementer of the {@link IMEInventoryHandler}.
|
* are the implementer of this.
|
||||||
*/
|
*/
|
||||||
public int getSlot();
|
int getSlot();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AE Uses a two pass placement system, the first pass checks contents and tries to find a place where the item
|
* AE Uses a two pass placement system, the first pass checks contents and tries to find a place where the item
|
||||||
@@ -86,5 +86,5 @@ public interface IMEInventoryHandler<StackType extends IAEStack> extends IMEInve
|
|||||||
* - pass number ( 1 or 2 )
|
* - pass number ( 1 or 2 )
|
||||||
* @return true, if this inventory is valid for this pass.
|
* @return true, if this inventory is valid for this pass.
|
||||||
*/
|
*/
|
||||||
public boolean validForPass(int i);
|
boolean validForPass( int i );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,12 +30,12 @@ import appeng.api.storage.data.IItemList;
|
|||||||
public interface IMEMonitor<T extends IAEStack> extends IMEInventoryHandler<T>, IBaseMonitor<T>
|
public interface IMEMonitor<T extends IAEStack> extends IMEInventoryHandler<T>, IBaseMonitor<T>
|
||||||
{
|
{
|
||||||
|
|
||||||
@Override
|
|
||||||
@Deprecated
|
|
||||||
/**
|
/**
|
||||||
* This method is discouraged when accessing data via a IMEMonitor
|
* This method is discouraged when accessing data via a IMEMonitor
|
||||||
*/
|
*/
|
||||||
public IItemList<T> getAvailableItems(IItemList out);
|
@Override
|
||||||
|
@Deprecated
|
||||||
|
IItemList<T> getAvailableItems( IItemList out );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get access to the full item list of the network, preferred over {@link IMEInventory} .getAvailableItems(...)
|
* Get access to the full item list of the network, preferred over {@link IMEInventory} .getAvailableItems(...)
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public interface IStorageHelper
|
|||||||
* @param is
|
* @param is
|
||||||
* An ItemStack
|
* An ItemStack
|
||||||
*
|
*
|
||||||
* @return a new instance of {@link IAEItemStack} from a MC {@link ItemStack}
|
* @return a new INSTANCE of {@link IAEItemStack} from a MC {@link ItemStack}
|
||||||
*/
|
*/
|
||||||
IAEItemStack createItemStack(ItemStack is);
|
IAEItemStack createItemStack(ItemStack is);
|
||||||
|
|
||||||
@@ -60,17 +60,17 @@ public interface IStorageHelper
|
|||||||
* @param is
|
* @param is
|
||||||
* A FluidStack
|
* A FluidStack
|
||||||
*
|
*
|
||||||
* @return a new instance of {@link IAEFluidStack} from a Forge {@link FluidStack}
|
* @return a new INSTANCE of {@link IAEFluidStack} from a Forge {@link FluidStack}
|
||||||
*/
|
*/
|
||||||
IAEFluidStack createFluidStack(FluidStack is);
|
IAEFluidStack createFluidStack(FluidStack is);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return a new instance of {@link IItemList} for items
|
* @return a new INSTANCE of {@link IItemList} for items
|
||||||
*/
|
*/
|
||||||
IItemList<IAEItemStack> createItemList();
|
IItemList<IAEItemStack> createItemList();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return a new instance of {@link IItemList} for fluids
|
* @return a new INSTANCE of {@link IItemList} for fluids
|
||||||
*/
|
*/
|
||||||
IItemList<IAEFluidStack> createFluidList();
|
IItemList<IAEFluidStack> createFluidList();
|
||||||
|
|
||||||
|
|||||||
@@ -51,23 +51,23 @@ public class MEMonitorHandler<StackType extends IAEStack> implements IMEMonitor<
|
|||||||
|
|
||||||
protected IMEInventoryHandler<StackType> getHandler()
|
protected IMEInventoryHandler<StackType> getHandler()
|
||||||
{
|
{
|
||||||
return internalHandler;
|
return this.internalHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Iterator<Entry<IMEMonitorHandlerReceiver<StackType>, Object>> getListeners()
|
protected Iterator<Entry<IMEMonitorHandlerReceiver<StackType>, Object>> getListeners()
|
||||||
{
|
{
|
||||||
return listeners.entrySet().iterator();
|
return this.listeners.entrySet().iterator();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void postChangesToListeners( Iterable<StackType> changes, BaseActionSource src)
|
protected void postChangesToListeners( Iterable<StackType> changes, BaseActionSource src)
|
||||||
{
|
{
|
||||||
notifyListenersOfChange( changes, src );
|
this.notifyListenersOfChange( changes, src );
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void notifyListenersOfChange(Iterable<StackType> diff, BaseActionSource src)
|
protected void notifyListenersOfChange(Iterable<StackType> diff, BaseActionSource src)
|
||||||
{
|
{
|
||||||
hasChanged = true;// need to update the cache.
|
this.hasChanged = true;// need to update the cache.
|
||||||
Iterator<Entry<IMEMonitorHandlerReceiver<StackType>, Object>> i = getListeners();
|
Iterator<Entry<IMEMonitorHandlerReceiver<StackType>, Object>> i = this.getListeners();
|
||||||
while (i.hasNext())
|
while (i.hasNext())
|
||||||
{
|
{
|
||||||
Entry<IMEMonitorHandlerReceiver<StackType>, Object> o = i.next();
|
Entry<IMEMonitorHandlerReceiver<StackType>, Object> o = i.next();
|
||||||
@@ -89,108 +89,108 @@ public class MEMonitorHandler<StackType extends IAEStack> implements IMEMonitor<
|
|||||||
diff.decStackSize( leftOvers.getStackSize() );
|
diff.decStackSize( leftOvers.getStackSize() );
|
||||||
|
|
||||||
if ( diff.getStackSize() != 0 )
|
if ( diff.getStackSize() != 0 )
|
||||||
postChangesToListeners( ImmutableList.of( diff ), src );
|
this.postChangesToListeners( ImmutableList.of( diff ), src );
|
||||||
|
|
||||||
return leftOvers;
|
return leftOvers;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MEMonitorHandler(IMEInventoryHandler<StackType> t) {
|
public MEMonitorHandler(IMEInventoryHandler<StackType> t) {
|
||||||
internalHandler = t;
|
this.internalHandler = t;
|
||||||
cachedList = (IItemList<StackType>) t.getChannel().createList();
|
this.cachedList = (IItemList<StackType>) t.getChannel().createList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public MEMonitorHandler(IMEInventoryHandler<StackType> t, StorageChannel chan) {
|
public MEMonitorHandler(IMEInventoryHandler<StackType> t, StorageChannel chan) {
|
||||||
internalHandler = t;
|
this.internalHandler = t;
|
||||||
cachedList = (IItemList<StackType>) chan.createList();
|
this.cachedList = (IItemList<StackType>) chan.createList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addListener(IMEMonitorHandlerReceiver<StackType> l, Object verificationToken)
|
public void addListener(IMEMonitorHandlerReceiver<StackType> l, Object verificationToken)
|
||||||
{
|
{
|
||||||
listeners.put( l, verificationToken );
|
this.listeners.put( l, verificationToken );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void removeListener(IMEMonitorHandlerReceiver<StackType> l)
|
public void removeListener(IMEMonitorHandlerReceiver<StackType> l)
|
||||||
{
|
{
|
||||||
listeners.remove( l );
|
this.listeners.remove( l );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StackType injectItems(StackType input, Actionable mode, BaseActionSource src)
|
public StackType injectItems(StackType input, Actionable mode, BaseActionSource src)
|
||||||
{
|
{
|
||||||
if ( mode == Actionable.SIMULATE )
|
if ( mode == Actionable.SIMULATE )
|
||||||
return getHandler().injectItems( input, mode, src );
|
return this.getHandler().injectItems( input, mode, src );
|
||||||
return monitorDifference(input.copy(), getHandler().injectItems(input, mode, src), false, src);
|
return this.monitorDifference(input.copy(), this.getHandler().injectItems(input, mode, src), false, src);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StackType extractItems(StackType request, Actionable mode, BaseActionSource src)
|
public StackType extractItems(StackType request, Actionable mode, BaseActionSource src)
|
||||||
{
|
{
|
||||||
if ( mode == Actionable.SIMULATE )
|
if ( mode == Actionable.SIMULATE )
|
||||||
return getHandler().extractItems( request, mode, src );
|
return this.getHandler().extractItems( request, mode, src );
|
||||||
return monitorDifference(request.copy(), getHandler().extractItems(request, mode, src), true, src);
|
return this.monitorDifference(request.copy(), this.getHandler().extractItems(request, mode, src), true, src);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IItemList<StackType> getStorageList()
|
public IItemList<StackType> getStorageList()
|
||||||
{
|
{
|
||||||
if ( hasChanged )
|
if ( this.hasChanged )
|
||||||
{
|
{
|
||||||
hasChanged = false;
|
this.hasChanged = false;
|
||||||
cachedList.resetStatus();
|
this.cachedList.resetStatus();
|
||||||
return getAvailableItems( cachedList );
|
return this.getAvailableItems( this.cachedList );
|
||||||
}
|
}
|
||||||
|
|
||||||
return cachedList;
|
return this.cachedList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IItemList<StackType> getAvailableItems(IItemList out)
|
public IItemList<StackType> getAvailableItems(IItemList out)
|
||||||
{
|
{
|
||||||
return getHandler().getAvailableItems( out );
|
return this.getHandler().getAvailableItems( out );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StorageChannel getChannel()
|
public StorageChannel getChannel()
|
||||||
{
|
{
|
||||||
return getHandler().getChannel();
|
return this.getHandler().getChannel();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AccessRestriction getAccess()
|
public AccessRestriction getAccess()
|
||||||
{
|
{
|
||||||
return getHandler().getAccess();
|
return this.getHandler().getAccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isPrioritized(StackType input)
|
public boolean isPrioritized(StackType input)
|
||||||
{
|
{
|
||||||
return getHandler().isPrioritized( input );
|
return this.getHandler().isPrioritized( input );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canAccept(StackType input)
|
public boolean canAccept(StackType input)
|
||||||
{
|
{
|
||||||
return getHandler().canAccept( input );
|
return this.getHandler().canAccept( input );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getPriority()
|
public int getPriority()
|
||||||
{
|
{
|
||||||
return getHandler().getPriority();
|
return this.getHandler().getPriority();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getSlot()
|
public int getSlot()
|
||||||
{
|
{
|
||||||
return getHandler().getSlot();
|
return this.getHandler().getSlot();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean validForPass(int i)
|
public boolean validForPass(int i)
|
||||||
{
|
{
|
||||||
return getHandler().validForPass( i );
|
return this.getHandler().validForPass( i );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,8 +43,8 @@ public enum StorageChannel
|
|||||||
|
|
||||||
public final Class<? extends IAEStack> type;
|
public final Class<? extends IAEStack> type;
|
||||||
|
|
||||||
private StorageChannel( Class<? extends IAEStack> t ) {
|
StorageChannel( Class<? extends IAEStack> t ) {
|
||||||
type = t;
|
this.type = t;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IItemList createList() {
|
public IItemList createList() {
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public interface IAEFluidStack extends IAEStack<IAEFluidStack>
|
|||||||
* @return the copy.
|
* @return the copy.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public IAEFluidStack copy();
|
IAEFluidStack copy();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Combines two IAEItemStacks via addition.
|
* Combines two IAEItemStacks via addition.
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public interface IAEItemStack extends IAEStack<IAEItemStack>
|
|||||||
*
|
*
|
||||||
* @return new ItemStack
|
* @return new ItemStack
|
||||||
*/
|
*/
|
||||||
public ItemStack getItemStack();
|
ItemStack getItemStack();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* create a AE Item clone
|
* create a AE Item clone
|
||||||
@@ -52,7 +52,7 @@ public interface IAEItemStack extends IAEStack<IAEItemStack>
|
|||||||
* @return the copy
|
* @return the copy
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public IAEItemStack copy();
|
IAEItemStack copy();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* is there NBT Data for this item?
|
* is there NBT Data for this item?
|
||||||
|
|||||||
@@ -23,7 +23,9 @@
|
|||||||
|
|
||||||
package appeng.api.storage.data;
|
package appeng.api.storage.data;
|
||||||
|
|
||||||
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
|
||||||
import appeng.api.features.IItemComparison;
|
import appeng.api.features.IItemComparison;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -37,7 +39,7 @@ public interface IAETagCompound
|
|||||||
/**
|
/**
|
||||||
* @return a copy ( the copy will not be a IAETagCompound, it will be a NBTTagCompound )
|
* @return a copy ( the copy will not be a IAETagCompound, it will be a NBTTagCompound )
|
||||||
*/
|
*/
|
||||||
public NBTTagCompound getNBTTagCompoundCopy();
|
NBTTagCompound getNBTTagCompoundCopy();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* compare to other NBTTagCompounds or IAETagCompounds
|
* compare to other NBTTagCompounds or IAETagCompounds
|
||||||
|
|||||||
@@ -23,10 +23,11 @@
|
|||||||
|
|
||||||
package appeng.api.storage.data;
|
package appeng.api.storage.data;
|
||||||
|
|
||||||
import appeng.api.config.FuzzyMode;
|
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import appeng.api.config.FuzzyMode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a list of items in AE.
|
* Represents a list of items in AE.
|
||||||
*
|
*
|
||||||
@@ -42,7 +43,7 @@ public interface IItemContainer<StackType extends IAEStack>
|
|||||||
*
|
*
|
||||||
* @param option added stack
|
* @param option added stack
|
||||||
*/
|
*/
|
||||||
public void add(StackType option); // adds stack as is
|
void add( StackType option ); // adds stack as is
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param i compared item
|
* @param i compared item
|
||||||
@@ -55,11 +56,11 @@ public interface IItemContainer<StackType extends IAEStack>
|
|||||||
* @param input compared item
|
* @param input compared item
|
||||||
* @return a list of relevant fuzzy matched stacks
|
* @return a list of relevant fuzzy matched stacks
|
||||||
*/
|
*/
|
||||||
public Collection<StackType> findFuzzy(StackType input, FuzzyMode fuzzy);
|
Collection<StackType> findFuzzy( StackType input, FuzzyMode fuzzy );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return true if there are no items in the list
|
* @return true if there are no items in the list
|
||||||
*/
|
*/
|
||||||
public boolean isEmpty();
|
boolean isEmpty();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -41,14 +41,14 @@ public interface IItemList<StackType extends IAEStack> extends IItemContainer<St
|
|||||||
*
|
*
|
||||||
* @param option stacktype option
|
* @param option stacktype option
|
||||||
*/
|
*/
|
||||||
public void addStorage(StackType option); // adds a stack as stored
|
void addStorage( StackType option ); // adds a stack as stored
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* add a stack to the list as craftable, this will merge the stack with an item already in the list if found.
|
* add a stack to the list as craftable, this will merge the stack with an item already in the list if found.
|
||||||
*
|
*
|
||||||
* @param option stacktype option
|
* @param option stacktype option
|
||||||
*/
|
*/
|
||||||
public void addCrafting(StackType option);
|
void addCrafting( StackType option );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* add a stack to the list, stack size is used to add to requestable, this will merge the stack with an item already
|
* add a stack to the list, stack size is used to add to requestable, this will merge the stack with an item already
|
||||||
@@ -56,7 +56,7 @@ public interface IItemList<StackType extends IAEStack> extends IItemContainer<St
|
|||||||
*
|
*
|
||||||
* @param option stacktype option
|
* @param option stacktype option
|
||||||
*/
|
*/
|
||||||
public void addRequestable(StackType option); // adds a stack as requestable
|
void addRequestable( StackType option ); // adds a stack as requestable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the first item in the list
|
* @return the first item in the list
|
||||||
@@ -72,7 +72,7 @@ public interface IItemList<StackType extends IAEStack> extends IItemContainer<St
|
|||||||
* allows you to iterate the list.
|
* allows you to iterate the list.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Iterator<StackType> iterator();
|
Iterator<StackType> iterator();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* resets stack sizes to 0.
|
* resets stack sizes to 0.
|
||||||
|
|||||||
@@ -89,9 +89,9 @@ public enum AEColor
|
|||||||
|
|
||||||
AEColor(String unlocalizedName, int blackHex, int medHex, int whiteHex) {
|
AEColor(String unlocalizedName, int blackHex, int medHex, int whiteHex) {
|
||||||
this.unlocalizedName = unlocalizedName;
|
this.unlocalizedName = unlocalizedName;
|
||||||
blackVariant = blackHex;
|
this.blackVariant = blackHex;
|
||||||
mediumVariant = medHex;
|
this.mediumVariant = medHex;
|
||||||
whiteVariant = whiteHex;
|
this.whiteVariant = whiteHex;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -99,13 +99,13 @@ public enum AEColor
|
|||||||
*/
|
*/
|
||||||
public boolean matches(AEColor color)
|
public boolean matches(AEColor color)
|
||||||
{
|
{
|
||||||
return equals(Transparent) || color.equals(Transparent) || equals(color);
|
return this == Transparent || color == Transparent || this == color;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
return StatCollector.translateToLocal( unlocalizedName );
|
return StatCollector.translateToLocal( this.unlocalizedName );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public interface AEItemDefinition
|
|||||||
ItemStack stack(int stackSize);
|
ItemStack stack(int stackSize);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compare {@link ItemStack} with this {@link AEItemDefinition}
|
* Compare {@link ItemStack} with this
|
||||||
*
|
*
|
||||||
* @param comparableItem compared item
|
* @param comparableItem compared item
|
||||||
* @return true if the item stack is a matching item.
|
* @return true if the item stack is a matching item.
|
||||||
|
|||||||
@@ -37,20 +37,20 @@ public class DimensionalCoord extends WorldCoord
|
|||||||
|
|
||||||
public DimensionalCoord(DimensionalCoord s) {
|
public DimensionalCoord(DimensionalCoord s) {
|
||||||
super( s.x, s.y, s.z );
|
super( s.x, s.y, s.z );
|
||||||
w = s.w;
|
this.w = s.w;
|
||||||
dimId = s.dimId;
|
this.dimId = s.dimId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DimensionalCoord(TileEntity s) {
|
public DimensionalCoord(TileEntity s) {
|
||||||
super( s );
|
super( s );
|
||||||
w = s.getWorldObj();
|
this.w = s.getWorldObj();
|
||||||
dimId = w.provider.dimensionId;
|
this.dimId = this.w.provider.dimensionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DimensionalCoord(World _w, int _x, int _y, int _z) {
|
public DimensionalCoord(World _w, int _x, int _y, int _z) {
|
||||||
super( _x, _y, _z );
|
super( _x, _y, _z );
|
||||||
w = _w;
|
this.w = _w;
|
||||||
dimId = _w.provider.dimensionId;
|
this.dimId = _w.provider.dimensionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -61,34 +61,34 @@ public class DimensionalCoord extends WorldCoord
|
|||||||
|
|
||||||
public boolean isEqual(DimensionalCoord c)
|
public boolean isEqual(DimensionalCoord c)
|
||||||
{
|
{
|
||||||
return x == c.x && y == c.y && z == c.z && c.w == this.w;
|
return this.x == c.x && this.y == c.y && this.z == c.z && c.w == this.w;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object obj)
|
public boolean equals(Object obj)
|
||||||
{
|
{
|
||||||
return obj instanceof DimensionalCoord && isEqual((DimensionalCoord) obj);
|
return obj instanceof DimensionalCoord && this.isEqual((DimensionalCoord) obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode()
|
public int hashCode()
|
||||||
{
|
{
|
||||||
return super.hashCode() ^ dimId;
|
return super.hashCode() ^ this.dimId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isInWorld(World world)
|
public boolean isInWorld(World world)
|
||||||
{
|
{
|
||||||
return w == world;
|
return this.w == world;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
return dimId + "," + super.toString();
|
return "dimension=" + this.dimId + ", " + super.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public World getWorld()
|
public World getWorld()
|
||||||
{
|
{
|
||||||
return w;
|
return this.w;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,10 +23,10 @@
|
|||||||
|
|
||||||
package appeng.api.util;
|
package appeng.api.util;
|
||||||
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to adjust settings on an object,
|
* Used to adjust settings on an object,
|
||||||
*
|
*
|
||||||
@@ -70,9 +70,9 @@ public interface IConfigManager
|
|||||||
/**
|
/**
|
||||||
* write all settings to the NBT Tag so they can be read later.
|
* write all settings to the NBT Tag so they can be read later.
|
||||||
*
|
*
|
||||||
* @param dest to be written nbt tag
|
* @param destination to be written nbt tag
|
||||||
*/
|
*/
|
||||||
void writeToNBT(NBTTagCompound dest);
|
void writeToNBT(NBTTagCompound destination);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Only works after settings have been registered
|
* Only works after settings have been registered
|
||||||
|
|||||||
@@ -39,56 +39,56 @@ public class WorldCoord
|
|||||||
|
|
||||||
public WorldCoord add(ForgeDirection direction, int length)
|
public WorldCoord add(ForgeDirection direction, int length)
|
||||||
{
|
{
|
||||||
x += direction.offsetX * length;
|
this.x += direction.offsetX * length;
|
||||||
y += direction.offsetY * length;
|
this.y += direction.offsetY * length;
|
||||||
z += direction.offsetZ * length;
|
this.z += direction.offsetZ * length;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public WorldCoord subtract(ForgeDirection direction, int length)
|
public WorldCoord subtract(ForgeDirection direction, int length)
|
||||||
{
|
{
|
||||||
x -= direction.offsetX * length;
|
this.x -= direction.offsetX * length;
|
||||||
y -= direction.offsetY * length;
|
this.y -= direction.offsetY * length;
|
||||||
z -= direction.offsetZ * length;
|
this.z -= direction.offsetZ * length;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public WorldCoord add(int _x, int _y, int _z)
|
public WorldCoord add(int _x, int _y, int _z)
|
||||||
{
|
{
|
||||||
x += _x;
|
this.x += _x;
|
||||||
y += _y;
|
this.y += _y;
|
||||||
z += _z;
|
this.z += _z;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public WorldCoord subtract(int _x, int _y, int _z)
|
public WorldCoord subtract(int _x, int _y, int _z)
|
||||||
{
|
{
|
||||||
x -= _x;
|
this.x -= _x;
|
||||||
y -= _y;
|
this.y -= _y;
|
||||||
z -= _z;
|
this.z -= _z;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public WorldCoord multiple(int _x, int _y, int _z)
|
public WorldCoord multiple(int _x, int _y, int _z)
|
||||||
{
|
{
|
||||||
x *= _x;
|
this.x *= _x;
|
||||||
y *= _y;
|
this.y *= _y;
|
||||||
z *= _z;
|
this.z *= _z;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public WorldCoord divide(int _x, int _y, int _z)
|
public WorldCoord divide(int _x, int _y, int _z)
|
||||||
{
|
{
|
||||||
x /= _x;
|
this.x /= _x;
|
||||||
y /= _y;
|
this.y /= _y;
|
||||||
z /= _z;
|
this.z /= _z;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public WorldCoord(int _x, int _y, int _z) {
|
public WorldCoord(int _x, int _y, int _z) {
|
||||||
x = _x;
|
this.x = _x;
|
||||||
y = _y;
|
this.y = _y;
|
||||||
z = _z;
|
this.z = _z;
|
||||||
}
|
}
|
||||||
|
|
||||||
public WorldCoord(TileEntity s) {
|
public WorldCoord(TileEntity s) {
|
||||||
@@ -100,9 +100,9 @@ public class WorldCoord
|
|||||||
*/
|
*/
|
||||||
public ForgeDirection directionTo(WorldCoord loc)
|
public ForgeDirection directionTo(WorldCoord loc)
|
||||||
{
|
{
|
||||||
int ox = x - loc.x;
|
int ox = this.x - loc.x;
|
||||||
int oy = y - loc.y;
|
int oy = this.y - loc.y;
|
||||||
int oz = z - loc.z;
|
int oz = this.z - loc.z;
|
||||||
|
|
||||||
int xlen = Math.abs( ox );
|
int xlen = Math.abs( ox );
|
||||||
int ylen = Math.abs( oy );
|
int ylen = Math.abs( oy );
|
||||||
@@ -131,29 +131,29 @@ public class WorldCoord
|
|||||||
|
|
||||||
public boolean isEqual(WorldCoord c)
|
public boolean isEqual(WorldCoord c)
|
||||||
{
|
{
|
||||||
return x == c.x && y == c.y && z == c.z;
|
return this.x == c.x && this.y == c.y && this.z == c.z;
|
||||||
}
|
}
|
||||||
|
|
||||||
public WorldCoord copy()
|
public WorldCoord copy()
|
||||||
{
|
{
|
||||||
return new WorldCoord( x, y, z );
|
return new WorldCoord( this.x, this.y, this.z );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object obj)
|
public boolean equals(Object obj)
|
||||||
{
|
{
|
||||||
return obj instanceof WorldCoord && isEqual((WorldCoord) obj);
|
return obj instanceof WorldCoord && this.isEqual((WorldCoord) obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
return "" + x + "," + y + "," + z;
|
return "x=" + this.x + ", y=" + this.y + ", z=" + this.z;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode()
|
public int hashCode()
|
||||||
{
|
{
|
||||||
return (y << 24) ^ x ^ z;
|
return ( this.y << 24) ^ this.x ^ this.z;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
{
|
{
|
||||||
super( mat );
|
super( mat );
|
||||||
|
|
||||||
if ( mat == AEGlassMaterial.instance || mat == Material.glass )
|
if ( mat == AEGlassMaterial.INSTANCE || mat == Material.glass )
|
||||||
this.setStepSound( Block.soundTypeGlass );
|
this.setStepSound( Block.soundTypeGlass );
|
||||||
else if ( mat == Material.rock )
|
else if ( mat == Material.rock )
|
||||||
this.setStepSound( Block.soundTypeStone );
|
this.setStepSound( Block.soundTypeStone );
|
||||||
@@ -190,7 +190,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
@SideOnly( Side.CLIENT )
|
@SideOnly( Side.CLIENT )
|
||||||
public int getRenderType()
|
public int getRenderType()
|
||||||
{
|
{
|
||||||
return WorldRender.instance.getRenderId();
|
return WorldRender.INSTANCE.getRenderId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -752,19 +752,19 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
if ( dx.offsetX == west_x && dx.offsetY == west_y && dx.offsetZ == west_z )
|
if ( dx.offsetX == west_x && dx.offsetY == west_y && dx.offsetZ == west_z )
|
||||||
west = dx;
|
west = dx;
|
||||||
|
|
||||||
if ( dir.equals( forward ) )
|
if ( dir == forward )
|
||||||
return ForgeDirection.SOUTH;
|
return ForgeDirection.SOUTH;
|
||||||
if ( dir.equals( forward.getOpposite() ) )
|
if ( dir == forward.getOpposite() )
|
||||||
return ForgeDirection.NORTH;
|
return ForgeDirection.NORTH;
|
||||||
|
|
||||||
if ( dir.equals( up ) )
|
if ( dir == up )
|
||||||
return ForgeDirection.UP;
|
return ForgeDirection.UP;
|
||||||
if ( dir.equals( up.getOpposite() ) )
|
if ( dir == up.getOpposite() )
|
||||||
return ForgeDirection.DOWN;
|
return ForgeDirection.DOWN;
|
||||||
|
|
||||||
if ( dir.equals( west ) )
|
if ( dir == west )
|
||||||
return ForgeDirection.WEST;
|
return ForgeDirection.WEST;
|
||||||
if ( dir.equals( west.getOpposite() ) )
|
if ( dir == west.getOpposite() )
|
||||||
return ForgeDirection.EAST;
|
return ForgeDirection.EAST;
|
||||||
|
|
||||||
return ForgeDirection.UNKNOWN;
|
return ForgeDirection.UNKNOWN;
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public class AEBaseItemBlock extends ItemBlock
|
|||||||
this.hasSubtypes = this.blockType.hasSubtypes;
|
this.hasSubtypes = this.blockType.hasSubtypes;
|
||||||
|
|
||||||
if ( Platform.isClient() )
|
if ( Platform.isClient() )
|
||||||
MinecraftForgeClient.registerItemRenderer( this, ItemRenderer.instance );
|
MinecraftForgeClient.registerItemRenderer( this, ItemRenderer.INSTANCE );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ public class BlockCrank extends AEBaseBlock
|
|||||||
this.setFeature( EnumSet.of( AEFeature.GrindStone ) );
|
this.setFeature( EnumSet.of( AEFeature.GrindStone ) );
|
||||||
this.setTileEntity( TileCrank.class );
|
this.setTileEntity( TileCrank.class );
|
||||||
this.setLightOpacity( 0 );
|
this.setLightOpacity( 0 );
|
||||||
|
this.setHarvestLevel( "axe", 0 );
|
||||||
this.isFullSize = this.isOpaque = false;
|
this.isFullSize = this.isOpaque = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ public class BlockPaint extends AEBaseBlock
|
|||||||
public void fillWithRain(World w, int x, int y, int z)
|
public void fillWithRain(World w, int x, int y, int z)
|
||||||
{
|
{
|
||||||
if ( Platform.isServer() )
|
if ( Platform.isServer() )
|
||||||
w.setBlock( x, y, z, Platform.air, 0, 3 );
|
w.setBlock( x, y, z, Platform.AIR, 0, 3 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -70,15 +70,15 @@ import appeng.parts.NullCableBusContainer;
|
|||||||
import appeng.tile.AEBaseTile;
|
import appeng.tile.AEBaseTile;
|
||||||
import appeng.tile.networking.TileCableBus;
|
import appeng.tile.networking.TileCableBus;
|
||||||
import appeng.tile.networking.TileCableBusTESR;
|
import appeng.tile.networking.TileCableBusTESR;
|
||||||
import appeng.transformer.annotations.integration.Interface;
|
import appeng.transformer.annotations.Integration.Interface;
|
||||||
import appeng.transformer.annotations.integration.Method;
|
import appeng.transformer.annotations.Integration.Method;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
|
|
||||||
@Interface(iface = "powercrystals.minefactoryreloaded.api.rednet.connectivity.IRedNetConnection", iname = "MFR")
|
@Interface(iface = "powercrystals.minefactoryreloaded.api.rednet.connectivity.IRedNetConnection", iname = "MFR")
|
||||||
public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
||||||
{
|
{
|
||||||
|
|
||||||
static private final ICableBusContainer nullCB = new NullCableBusContainer();
|
private static final ICableBusContainer NULL_CABLE_BUS = new NullCableBusContainer();
|
||||||
static public Class<? extends TileEntity> noTesrTile;
|
static public Class<? extends TileEntity> noTesrTile;
|
||||||
static public Class<? extends TileEntity> tesrTile;
|
static public Class<? extends TileEntity> tesrTile;
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
|||||||
}
|
}
|
||||||
|
|
||||||
public BlockCableBus() {
|
public BlockCableBus() {
|
||||||
super( BlockCableBus.class, AEGlassMaterial.instance );
|
super( BlockCableBus.class, AEGlassMaterial.INSTANCE );
|
||||||
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
||||||
this.setLightOpacity( 0 );
|
this.setLightOpacity( 0 );
|
||||||
this.isFullSize = this.isOpaque = false;
|
this.isFullSize = this.isOpaque = false;
|
||||||
@@ -227,7 +227,7 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
|||||||
@Override
|
@Override
|
||||||
public boolean canRenderInPass(int pass)
|
public boolean canRenderInPass(int pass)
|
||||||
{
|
{
|
||||||
BusRenderHelper.instance.setPass( pass );
|
BusRenderHelper.INSTANCE.setPass( pass );
|
||||||
|
|
||||||
if ( AEConfig.instance.isFeatureEnabled( AEFeature.AlphaPass ) )
|
if ( AEConfig.instance.isFeatureEnabled( AEFeature.AlphaPass ) )
|
||||||
return true;
|
return true;
|
||||||
@@ -424,10 +424,10 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
|||||||
|
|
||||||
public void setupTile()
|
public void setupTile()
|
||||||
{
|
{
|
||||||
this.setTileEntity( noTesrTile = Api.instance.partHelper.getCombinedInstance( TileCableBus.class.getName() ) );
|
this.setTileEntity( noTesrTile = Api.INSTANCE.partHelper.getCombinedInstance( TileCableBus.class.getName() ) );
|
||||||
if ( Platform.isClient() )
|
if ( Platform.isClient() )
|
||||||
{
|
{
|
||||||
tesrTile = Api.instance.partHelper.getCombinedInstance( TileCableBusTESR.class.getName() );
|
tesrTile = Api.INSTANCE.partHelper.getCombinedInstance( TileCableBusTESR.class.getName() );
|
||||||
GameRegistry.registerTileEntity( tesrTile, "ClientOnly_TESR_CableBus" );
|
GameRegistry.registerTileEntity( tesrTile, "ClientOnly_TESR_CableBus" );
|
||||||
CommonHelper.proxy.bindTileEntitySpecialRenderer( tesrTile, this );
|
CommonHelper.proxy.bindTileEntitySpecialRenderer( tesrTile, this );
|
||||||
}
|
}
|
||||||
@@ -444,7 +444,7 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
|||||||
else if ( AppEng.instance.isIntegrationEnabled( IntegrationType.FMP ) )
|
else if ( AppEng.instance.isIntegrationEnabled( IntegrationType.FMP ) )
|
||||||
out = ((IFMP) AppEng.instance.getIntegration( IntegrationType.FMP )).getCableContainer( te );
|
out = ((IFMP) AppEng.instance.getIntegration( IntegrationType.FMP )).getCableContainer( te );
|
||||||
|
|
||||||
return out == null ? nullCB : out;
|
return out == null ? NULL_CABLE_BUS : out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public class BlockCreativeEnergyCell extends AEBaseBlock
|
|||||||
{
|
{
|
||||||
|
|
||||||
public BlockCreativeEnergyCell() {
|
public BlockCreativeEnergyCell() {
|
||||||
super( BlockCreativeEnergyCell.class, AEGlassMaterial.instance );
|
super( BlockCreativeEnergyCell.class, AEGlassMaterial.INSTANCE );
|
||||||
this.setFeature( EnumSet.of( AEFeature.Creative ) );
|
this.setFeature( EnumSet.of( AEFeature.Creative ) );
|
||||||
this.setTileEntity( TileCreativeEnergyCell.class );
|
this.setTileEntity( TileCreativeEnergyCell.class );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public class BlockEnergyCell extends AEBaseBlock
|
|||||||
}
|
}
|
||||||
|
|
||||||
public BlockEnergyCell(Class c) {
|
public BlockEnergyCell(Class c) {
|
||||||
super( c, AEGlassMaterial.instance );
|
super( c, AEGlassMaterial.INSTANCE );
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockEnergyCell() {
|
public BlockEnergyCell() {
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class BlockWireless extends AEBaseBlock implements ICustomCollision
|
|||||||
{
|
{
|
||||||
|
|
||||||
public BlockWireless() {
|
public BlockWireless() {
|
||||||
super( BlockWireless.class, AEGlassMaterial.instance );
|
super( BlockWireless.class, AEGlassMaterial.INSTANCE );
|
||||||
this.setFeature( EnumSet.of( AEFeature.Core, AEFeature.WirelessAccessTerminal ) );
|
this.setFeature( EnumSet.of( AEFeature.Core, AEFeature.WirelessAccessTerminal ) );
|
||||||
this.setTileEntity( TileWireless.class );
|
this.setTileEntity( TileWireless.class );
|
||||||
this.setLightOpacity( 0 );
|
this.setLightOpacity( 0 );
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public class BlockQuantumLinkChamber extends AEBaseBlock implements ICustomColli
|
|||||||
{
|
{
|
||||||
|
|
||||||
public BlockQuantumLinkChamber() {
|
public BlockQuantumLinkChamber() {
|
||||||
super( BlockQuantumLinkChamber.class, AEGlassMaterial.instance );
|
super( BlockQuantumLinkChamber.class, AEGlassMaterial.INSTANCE );
|
||||||
this.setFeature( EnumSet.of( AEFeature.QuantumNetworkBridge ) );
|
this.setFeature( EnumSet.of( AEFeature.QuantumNetworkBridge ) );
|
||||||
this.setTileEntity( TileQuantumBridge.class );
|
this.setTileEntity( TileQuantumBridge.class );
|
||||||
float shave = 2.0f / 16.0f;
|
float shave = 2.0f / 16.0f;
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public class BlockQuartzGlass extends AEBaseBlock
|
|||||||
public boolean shouldSideBeRendered(IBlockAccess w, int x, int y, int z, int side)
|
public boolean shouldSideBeRendered(IBlockAccess w, int x, int y, int z, int side)
|
||||||
{
|
{
|
||||||
Material mat = w.getBlock( x, y, z ).getMaterial();
|
Material mat = w.getBlock( x, y, z ).getMaterial();
|
||||||
if ( mat == Material.glass || mat == AEGlassMaterial.instance )
|
if ( mat == Material.glass || mat == AEGlassMaterial.INSTANCE )
|
||||||
{
|
{
|
||||||
if ( w.getBlock( x, y, z ).getRenderType() == this.getRenderType() )
|
if ( w.getBlock( x, y, z ).getRenderType() == this.getRenderType() )
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import net.minecraft.block.Block;
|
|||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
@@ -163,10 +164,11 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z)
|
public ItemStack getPickBlock( MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player )
|
||||||
{
|
{
|
||||||
ItemStack is = super.getPickBlock( target, world, x, y, z );
|
final ItemStack is = super.getPickBlock( target, world, x, y, z, player );
|
||||||
is.setItemDamage( world.getBlockMetadata( x, y, z ) );
|
is.setItemDamage( world.getBlockMetadata( x, y, z ) );
|
||||||
|
|
||||||
return is;
|
return is;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class BlockSpatialPylon extends AEBaseBlock
|
|||||||
{
|
{
|
||||||
|
|
||||||
public BlockSpatialPylon() {
|
public BlockSpatialPylon() {
|
||||||
super( BlockSpatialPylon.class, AEGlassMaterial.instance );
|
super( BlockSpatialPylon.class, AEGlassMaterial.INSTANCE );
|
||||||
this.setFeature( EnumSet.of( AEFeature.SpatialIO ) );
|
this.setFeature( EnumSet.of( AEFeature.SpatialIO ) );
|
||||||
this.setTileEntity( TileSpatialPylon.class );
|
this.setTileEntity( TileSpatialPylon.class );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,10 +87,11 @@ public class BlockSkyChest extends AEBaseBlock implements ICustomCollision
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z)
|
public ItemStack getPickBlock( MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player )
|
||||||
{
|
{
|
||||||
ItemStack is = super.getPickBlock( target, world, x, y, z );
|
final ItemStack is = super.getPickBlock( target, world, x, y, z, player );
|
||||||
is.setItemDamage( world.getBlockMetadata( x, y, z ) );
|
is.setItemDamage( world.getBlockMetadata( x, y, z ) );
|
||||||
|
|
||||||
return is;
|
return is;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -89,8 +89,8 @@ import appeng.util.Platform;
|
|||||||
public class ClientHelper extends ServerHelper
|
public class ClientHelper extends ServerHelper
|
||||||
{
|
{
|
||||||
|
|
||||||
private static final RenderItem itemRenderer = new RenderItem();
|
private static final RenderItem ITEM_RENDERER = new RenderItem();
|
||||||
private static final RenderBlocks blockRenderer = new RenderBlocks();
|
private static final RenderBlocks BLOCK_RENDERER = new RenderBlocks();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CableRenderMode getRenderMode()
|
public CableRenderMode getRenderMode()
|
||||||
@@ -128,7 +128,7 @@ public class ClientHelper extends ServerHelper
|
|||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void postPlayerRender(RenderLivingEvent.Pre p)
|
public void postPlayerRender(RenderLivingEvent.Pre p)
|
||||||
{
|
{
|
||||||
PlayerColor player = TickHandler.instance.getPlayerColors().get( p.entity.getEntityId() );
|
PlayerColor player = TickHandler.INSTANCE.getPlayerColors().get( p.entity.getEntityId() );
|
||||||
if ( player != null )
|
if ( player != null )
|
||||||
{
|
{
|
||||||
AEColor col = player.myColor;
|
AEColor col = player.myColor;
|
||||||
@@ -210,9 +210,9 @@ public class ClientHelper extends ServerHelper
|
|||||||
|
|
||||||
RenderItem.renderInFrame = false;
|
RenderItem.renderInFrame = false;
|
||||||
FontRenderer fr = Minecraft.getMinecraft().fontRenderer;
|
FontRenderer fr = Minecraft.getMinecraft().fontRenderer;
|
||||||
if ( !ForgeHooksClient.renderInventoryItem( blockRenderer, Minecraft.getMinecraft().renderEngine, itemstack, true, 0, 0, 0 ) )
|
if ( !ForgeHooksClient.renderInventoryItem( BLOCK_RENDERER, Minecraft.getMinecraft().renderEngine, itemstack, true, 0, 0, 0 ) )
|
||||||
{
|
{
|
||||||
itemRenderer.renderItemIntoGUI( fr, Minecraft.getMinecraft().renderEngine, itemstack, 0, 0, false );
|
ITEM_RENDERER.renderItemIntoGUI( fr, Minecraft.getMinecraft().renderEngine, itemstack, 0, 0, false );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -229,7 +229,7 @@ public class ClientHelper extends ServerHelper
|
|||||||
@Override
|
@Override
|
||||||
public void postInit()
|
public void postInit()
|
||||||
{
|
{
|
||||||
RenderingRegistry.registerBlockHandler( WorldRender.instance );
|
RenderingRegistry.registerBlockHandler( WorldRender.INSTANCE );
|
||||||
RenderManager.instance.entityRenderMap.put( EntityTinyTNTPrimed.class, new RenderTinyTNTPrimed() );
|
RenderManager.instance.entityRenderMap.put( EntityTinyTNTPrimed.class, new RenderTinyTNTPrimed() );
|
||||||
RenderManager.instance.entityRenderMap.put( EntityFloatingItem.class, new RenderFloatingItem() );
|
RenderManager.instance.entityRenderMap.put( EntityFloatingItem.class, new RenderFloatingItem() );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,8 +48,14 @@ public class GuiCraftAmount extends AEBaseGui
|
|||||||
|
|
||||||
GuiButton next;
|
GuiButton next;
|
||||||
|
|
||||||
GuiButton plus1, plus10, plus100, plus1000;
|
GuiButton plus1;
|
||||||
GuiButton minus1, minus10, minus100, minus1000;
|
GuiButton plus10;
|
||||||
|
GuiButton plus100;
|
||||||
|
GuiButton plus1000;
|
||||||
|
GuiButton minus1;
|
||||||
|
GuiButton minus10;
|
||||||
|
GuiButton minus100;
|
||||||
|
GuiButton minus1000;
|
||||||
|
|
||||||
GuiBridge OriginalGui;
|
GuiBridge OriginalGui;
|
||||||
|
|
||||||
|
|||||||
@@ -25,24 +25,26 @@ import java.util.Iterator;
|
|||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.google.common.base.Joiner;
|
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
import com.google.common.base.Joiner;
|
||||||
|
|
||||||
import appeng.api.AEApi;
|
import appeng.api.AEApi;
|
||||||
import appeng.api.config.SortDir;
|
import appeng.api.config.SortDir;
|
||||||
import appeng.api.config.SortOrder;
|
import appeng.api.config.SortOrder;
|
||||||
import appeng.api.config.ViewItems;
|
import appeng.api.config.ViewItems;
|
||||||
import appeng.api.storage.data.IAEItemStack;
|
import appeng.api.storage.data.IAEItemStack;
|
||||||
import appeng.api.storage.data.IItemList;
|
import appeng.api.storage.data.IItemList;
|
||||||
|
import appeng.api.util.AEColor;
|
||||||
import appeng.client.gui.AEBaseGui;
|
import appeng.client.gui.AEBaseGui;
|
||||||
import appeng.client.gui.widgets.GuiScrollbar;
|
import appeng.client.gui.widgets.GuiScrollbar;
|
||||||
import appeng.client.gui.widgets.ISortSource;
|
import appeng.client.gui.widgets.ISortSource;
|
||||||
import appeng.container.implementations.ContainerCraftingCPU;
|
import appeng.container.implementations.ContainerCraftingCPU;
|
||||||
|
import appeng.core.AEConfig;
|
||||||
import appeng.core.AELog;
|
import appeng.core.AELog;
|
||||||
import appeng.core.localization.GuiText;
|
import appeng.core.localization.GuiText;
|
||||||
import appeng.core.sync.network.NetworkHandler;
|
import appeng.core.sync.network.NetworkHandler;
|
||||||
@@ -307,13 +309,31 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
|||||||
IAEItemStack pendingStack = this.pending.findPrecise( refStack );
|
IAEItemStack pendingStack = this.pending.findPrecise( refStack );
|
||||||
|
|
||||||
int lines = 0;
|
int lines = 0;
|
||||||
|
boolean active = false;
|
||||||
|
boolean scheduled = false;
|
||||||
|
|
||||||
if ( stored != null && stored.getStackSize() > 0 )
|
if ( stored != null && stored.getStackSize() > 0 )
|
||||||
|
{
|
||||||
lines++;
|
lines++;
|
||||||
|
}
|
||||||
if ( activeStack != null && activeStack.getStackSize() > 0 )
|
if ( activeStack != null && activeStack.getStackSize() > 0 )
|
||||||
|
{
|
||||||
lines++;
|
lines++;
|
||||||
|
active = true;
|
||||||
|
}
|
||||||
if ( pendingStack != null && pendingStack.getStackSize() > 0 )
|
if ( pendingStack != null && pendingStack.getStackSize() > 0 )
|
||||||
|
{
|
||||||
lines++;
|
lines++;
|
||||||
|
scheduled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( AEConfig.instance.useColoredCraftingStatus && ( active || scheduled ) )
|
||||||
|
{
|
||||||
|
int bgColor = ( active ? AEColor.Green.blackVariant : AEColor.Yellow.blackVariant ) | 0x5A000000;
|
||||||
|
int startX = (x * (1 + sectionLength) + xo) * 2;
|
||||||
|
int startY = ((y * offY + yo) - 3) * 2;
|
||||||
|
drawRect( startX, startY, startX + (sectionLength * 2), startY + (offY * 2) - 2, bgColor);
|
||||||
|
}
|
||||||
|
|
||||||
int negY = ((lines - 1) * 5) / 2;
|
int negY = ((lines - 1) * 5) / 2;
|
||||||
int downY = 0;
|
int downY = 0;
|
||||||
|
|||||||
@@ -18,59 +18,79 @@
|
|||||||
|
|
||||||
package appeng.client.gui.implementations;
|
package appeng.client.gui.implementations;
|
||||||
|
|
||||||
|
|
||||||
|
import org.lwjgl.input.Mouse;
|
||||||
|
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
|
||||||
import appeng.api.config.FuzzyMode;
|
import appeng.api.config.FuzzyMode;
|
||||||
import appeng.api.config.Settings;
|
import appeng.api.config.Settings;
|
||||||
|
import appeng.api.config.YesNo;
|
||||||
import appeng.client.gui.widgets.GuiImgButton;
|
import appeng.client.gui.widgets.GuiImgButton;
|
||||||
import appeng.client.gui.widgets.GuiTabButton;
|
import appeng.client.gui.widgets.GuiTabButton;
|
||||||
import appeng.container.implementations.ContainerFormationPlane;
|
import appeng.container.implementations.ContainerFormationPlane;
|
||||||
import appeng.core.localization.GuiText;
|
import appeng.core.localization.GuiText;
|
||||||
import appeng.core.sync.GuiBridge;
|
import appeng.core.sync.GuiBridge;
|
||||||
import appeng.core.sync.network.NetworkHandler;
|
import appeng.core.sync.network.NetworkHandler;
|
||||||
|
import appeng.core.sync.packets.PacketConfigButton;
|
||||||
import appeng.core.sync.packets.PacketSwitchGuis;
|
import appeng.core.sync.packets.PacketSwitchGuis;
|
||||||
import appeng.parts.automation.PartFormationPlane;
|
import appeng.parts.automation.PartFormationPlane;
|
||||||
|
|
||||||
|
|
||||||
public class GuiFormationPlane extends GuiUpgradeable
|
public class GuiFormationPlane extends GuiUpgradeable
|
||||||
{
|
{
|
||||||
|
|
||||||
GuiTabButton priority;
|
GuiTabButton priority;
|
||||||
|
GuiImgButton placeMode;
|
||||||
|
|
||||||
public GuiFormationPlane(InventoryPlayer inventoryPlayer, PartFormationPlane te) {
|
public GuiFormationPlane( InventoryPlayer inventoryPlayer, PartFormationPlane te )
|
||||||
|
{
|
||||||
super( new ContainerFormationPlane( inventoryPlayer, te ) );
|
super( new ContainerFormationPlane( inventoryPlayer, te ) );
|
||||||
this.ySize = 251;
|
this.ySize = 251;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||||
{
|
{
|
||||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.FormationPlane.getLocal() ), 8, 6, 4210752 );
|
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.FormationPlane.getLocal() ), 8, 6, 4210752 );
|
||||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||||
|
|
||||||
if ( this.fuzzyMode != null )
|
if ( this.fuzzyMode != null )
|
||||||
this.fuzzyMode.set( this.cvb.fzMode );
|
this.fuzzyMode.set( this.cvb.fzMode );
|
||||||
|
|
||||||
|
if ( this.placeMode != null )
|
||||||
|
this.placeMode.set( ( ( ContainerFormationPlane ) this.cvb ).placeMode );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addButtons()
|
protected void addButtons()
|
||||||
{
|
{
|
||||||
this.fuzzyMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 28, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
|
this.placeMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 28, Settings.PLACE_BLOCK, YesNo.YES );
|
||||||
|
this.fuzzyMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 48, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
|
||||||
|
|
||||||
this.buttonList.add( this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), itemRender ) );
|
this.buttonList.add( this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), itemRender ) );
|
||||||
|
|
||||||
|
this.buttonList.add( this.placeMode );
|
||||||
this.buttonList.add( this.fuzzyMode );
|
this.buttonList.add( this.fuzzyMode );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void actionPerformed(GuiButton btn)
|
protected void actionPerformed( GuiButton btn )
|
||||||
{
|
{
|
||||||
super.actionPerformed( btn );
|
super.actionPerformed( btn );
|
||||||
|
|
||||||
|
boolean backwards = Mouse.isButtonDown( 1 );
|
||||||
|
|
||||||
if ( btn == this.priority )
|
if ( btn == this.priority )
|
||||||
{
|
{
|
||||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
|
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
|
||||||
}
|
}
|
||||||
|
else if ( btn == this.placeMode )
|
||||||
|
{
|
||||||
|
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.placeMode.getSetting(), backwards ) );
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -47,8 +47,14 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
|||||||
|
|
||||||
GuiNumberBox level;
|
GuiNumberBox level;
|
||||||
|
|
||||||
GuiButton plus1, plus10, plus100, plus1000;
|
GuiButton plus1;
|
||||||
GuiButton minus1, minus10, minus100, minus1000;
|
GuiButton plus10;
|
||||||
|
GuiButton plus100;
|
||||||
|
GuiButton plus1000;
|
||||||
|
GuiButton minus1;
|
||||||
|
GuiButton minus10;
|
||||||
|
GuiButton minus100;
|
||||||
|
GuiButton minus1000;
|
||||||
|
|
||||||
GuiImgButton levelMode;
|
GuiImgButton levelMode;
|
||||||
GuiImgButton craftingMode;
|
GuiImgButton craftingMode;
|
||||||
|
|||||||
@@ -97,7 +97,8 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
|||||||
GuiImgButton SortByBox;
|
GuiImgButton SortByBox;
|
||||||
GuiImgButton SortDirBox;
|
GuiImgButton SortDirBox;
|
||||||
|
|
||||||
GuiImgButton searchBoxSettings, terminalStyleBox;
|
GuiImgButton searchBoxSettings;
|
||||||
|
GuiImgButton terminalStyleBox;
|
||||||
final boolean viewCell;
|
final boolean viewCell;
|
||||||
|
|
||||||
final ItemStack[] myCurrentViewCells = new ItemStack[5];
|
final ItemStack[] myCurrentViewCells = new ItemStack[5];
|
||||||
@@ -257,7 +258,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
|||||||
this.craftingStatusBtn.hideEdge = 13;
|
this.craftingStatusBtn.hideEdge = 13;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Enum setting = AEConfig.instance.getSetting( "Terminal", SearchBoxMode.class, SearchBoxMode.AUTOSEARCH );
|
// Enum setting = AEConfig.INSTANCE.getSetting( "Terminal", SearchBoxMode.class, SearchBoxMode.AUTOSEARCH );
|
||||||
Enum setting = AEConfig.instance.settings.getSetting( Settings.SEARCH_MODE );
|
Enum setting = AEConfig.instance.settings.getSetting( Settings.SEARCH_MODE );
|
||||||
this.searchField.setFocused( SearchBoxMode.AUTOSEARCH == setting || SearchBoxMode.NEI_AUTOSEARCH == setting );
|
this.searchField.setFocused( SearchBoxMode.AUTOSEARCH == setting || SearchBoxMode.NEI_AUTOSEARCH == setting );
|
||||||
|
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
|||||||
int viewStart = 0;// myScrollBar.getCurrentScroll() * 5;
|
int viewStart = 0;// myScrollBar.getCurrentScroll() * 5;
|
||||||
int viewEnd = viewStart + 5 * 4;
|
int viewEnd = viewStart + 5 * 4;
|
||||||
|
|
||||||
String ToolTip = "";
|
String toolTip = "";
|
||||||
int toolPosX = 0;
|
int toolPosX = 0;
|
||||||
int toolPosY = 0;
|
int toolPosY = 0;
|
||||||
|
|
||||||
@@ -199,11 +199,11 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
|||||||
|
|
||||||
if ( this.tooltip == z - viewStart )
|
if ( this.tooltip == z - viewStart )
|
||||||
{
|
{
|
||||||
ToolTip = Platform.getItemDisplayName( this.repo.getItem( z ) );
|
toolTip = Platform.getItemDisplayName( this.repo.getItem( z ) );
|
||||||
|
|
||||||
ToolTip = ToolTip + ( '\n' + GuiText.Installed.getLocal() + ": " + (refStack.getStackSize()));
|
toolTip += ( '\n' + GuiText.Installed.getLocal() + ": " + ( refStack.getStackSize() ) );
|
||||||
if ( refStack.getCountRequestable() > 0 )
|
if ( refStack.getCountRequestable() > 0 )
|
||||||
ToolTip = ToolTip + ( '\n' + GuiText.EnergyDrain.getLocal() + ": " + Platform.formatPowerLong( refStack.getCountRequestable(), true ));
|
toolTip += ( '\n' + GuiText.EnergyDrain.getLocal() + ": " + Platform.formatPowerLong( refStack.getCountRequestable(), true ) );
|
||||||
|
|
||||||
toolPosX = x * sectionLength + xo + sectionLength - 8;
|
toolPosX = x * sectionLength + xo + sectionLength - 8;
|
||||||
toolPosY = y * 18 + yo;
|
toolPosY = y * 18 + yo;
|
||||||
@@ -222,10 +222,10 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( this.tooltip >= 0 && ToolTip.length() > 0 )
|
if ( this.tooltip >= 0 && toolTip.length() > 0 )
|
||||||
{
|
{
|
||||||
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
||||||
this.drawTooltip( toolPosX, toolPosY + 10, 0, ToolTip );
|
this.drawTooltip( toolPosX, toolPosY + 10, 0, toolTip );
|
||||||
GL11.glPopAttrib();
|
GL11.glPopAttrib();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,8 +51,14 @@ public class GuiPriority extends AEBaseGui
|
|||||||
GuiNumberBox priority;
|
GuiNumberBox priority;
|
||||||
GuiTabButton originalGuiBtn;
|
GuiTabButton originalGuiBtn;
|
||||||
|
|
||||||
GuiButton plus1, plus10, plus100, plus1000;
|
GuiButton plus1;
|
||||||
GuiButton minus1, minus10, minus100, minus1000;
|
GuiButton plus10;
|
||||||
|
GuiButton plus100;
|
||||||
|
GuiButton plus1000;
|
||||||
|
GuiButton minus1;
|
||||||
|
GuiButton minus10;
|
||||||
|
GuiButton minus100;
|
||||||
|
GuiButton minus1000;
|
||||||
|
|
||||||
GuiBridge OriginalGui;
|
GuiBridge OriginalGui;
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,11 @@ public class GuiSecurity extends GuiMEMonitorable
|
|||||||
this.standardSize = this.xSize;
|
this.standardSize = this.xSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
GuiToggleButton inject, extract, craft, build, security;
|
GuiToggleButton inject;
|
||||||
|
GuiToggleButton extract;
|
||||||
|
GuiToggleButton craft;
|
||||||
|
GuiToggleButton build;
|
||||||
|
GuiToggleButton security;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui()
|
public void initGui()
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ import appeng.core.localization.ButtonToolTips;
|
|||||||
public class GuiImgButton extends GuiButton implements ITooltip
|
public class GuiImgButton extends GuiButton implements ITooltip
|
||||||
{
|
{
|
||||||
private static final Pattern COMPILE = Pattern.compile( "%s" );
|
private static final Pattern COMPILE = Pattern.compile( "%s" );
|
||||||
|
private static final Pattern PATTERN_NEW_LINE = Pattern.compile( "\\n", Pattern.LITERAL );
|
||||||
private static Map<EnumPair, ButtonAppearance> appearances;
|
private static Map<EnumPair, ButtonAppearance> appearances;
|
||||||
private final Enum buttonSetting;
|
private final Enum buttonSetting;
|
||||||
public boolean halfSize = false;
|
public boolean halfSize = false;
|
||||||
@@ -155,6 +156,9 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
|||||||
|
|
||||||
this.registerApp( 16 * 3 + 5, Settings.STORAGE_FILTER, StorageFilter.EXTRACTABLE_ONLY, ButtonToolTips.ReportInaccessibleItems, ButtonToolTips.ReportInaccessibleItemsNo );
|
this.registerApp( 16 * 3 + 5, Settings.STORAGE_FILTER, StorageFilter.EXTRACTABLE_ONLY, ButtonToolTips.ReportInaccessibleItems, ButtonToolTips.ReportInaccessibleItemsNo );
|
||||||
this.registerApp( 16 * 3 + 6, Settings.STORAGE_FILTER, StorageFilter.NONE, ButtonToolTips.ReportInaccessibleItems, ButtonToolTips.ReportInaccessibleItemsYes );
|
this.registerApp( 16 * 3 + 6, Settings.STORAGE_FILTER, StorageFilter.NONE, ButtonToolTips.ReportInaccessibleItems, ButtonToolTips.ReportInaccessibleItemsYes );
|
||||||
|
|
||||||
|
this.registerApp( 16 * 14, Settings.PLACE_BLOCK, YesNo.YES, ButtonToolTips.BlockPlacement, ButtonToolTips.BlockPlacementYes );
|
||||||
|
this.registerApp( 16 * 14 + 1, Settings.PLACE_BLOCK, YesNo.NO, ButtonToolTips.BlockPlacement, ButtonToolTips.BlockPlacementNo );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -278,7 +282,7 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
|||||||
if ( this.fillVar != null )
|
if ( this.fillVar != null )
|
||||||
value = COMPILE.matcher( value ).replaceFirst( this.fillVar );
|
value = COMPILE.matcher( value ).replaceFirst( this.fillVar );
|
||||||
|
|
||||||
value = value.replace( "\\n", "\n" );
|
value = PATTERN_NEW_LINE.matcher( value ).replaceAll( "\n" );
|
||||||
StringBuilder sb = new StringBuilder( value );
|
StringBuilder sb = new StringBuilder( value );
|
||||||
|
|
||||||
int i = sb.lastIndexOf( "\n" );
|
int i = sb.lastIndexOf( "\n" );
|
||||||
@@ -362,7 +366,6 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static class ButtonAppearance
|
private static class ButtonAppearance
|
||||||
{
|
{
|
||||||
public int index;
|
public int index;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user