Compare commits
59 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bcba2329b7 | |||
| 597e17b52b | |||
| 4b055a7f21 | |||
| 759b6daa59 | |||
| e1f03db7b3 | |||
| 72518ad977 | |||
| 21fa2718f8 | |||
| 777bec184a | |||
| b9d615c4ba | |||
| 40d339e173 | |||
| 20c1c4529a | |||
| 72399e5789 | |||
| f303c17ae0 | |||
| 26f13d4109 | |||
| 0df445c6a8 | |||
| 8c817b2f85 | |||
| 7bd8cf3f59 | |||
| 3ab6758e6c | |||
| 3dd948e4a4 | |||
| 3bb9e4df97 | |||
| d17f045339 | |||
| 5817cde56b | |||
| 45d94d4c2c | |||
| d893e52eb0 | |||
| 464a56ffc5 | |||
| 40dcf711f6 | |||
| 5dfca5eb93 | |||
| 26daaf2232 | |||
| c2022a7208 | |||
| 74c2e1fab9 | |||
| 0de7a2d83a | |||
| 517a832ac1 | |||
| 1ecc811559 | |||
| 7dd283cf9f | |||
| a12ef1e534 | |||
| a567dcc026 | |||
| 7f72ba97f0 | |||
| c3db5ef9e4 | |||
| f955febb5d | |||
| 3115147edf | |||
| 1cec5922a0 | |||
| 322b296639 | |||
| d1244f59ed | |||
| 6a18102ea0 | |||
| 300a9618b6 | |||
| dfb435ae7d | |||
| 1728f683c3 | |||
| c0b62fd519 | |||
| 67c901966e | |||
| a5287f6779 | |||
| 8234c6dbb5 | |||
| 9c8deac9de | |||
| c21a44d8c0 | |||
| 3c62734c87 | |||
| 5b6b14cde7 | |||
| 51c92d3dfb | |||
| 37295745cf | |||
| c3ce9d9542 | |||
| 6d42032738 |
+29
-16
@@ -11,20 +11,32 @@ top of things.
|
||||
|
||||
Applied Energistics 2 crashing, have a suggestion, found a bug? Create an issue now!
|
||||
|
||||
1. Make sure your issue hasn't already been answered or fixed. Also think about whether your issue is a valid one before submitting it.
|
||||
2. Go to [the issues page](https://github.com/AppliedEnergistics/Applied-Energistics-2/issues)
|
||||
3. Click new issue
|
||||
4. Enter your Issue's title (something that summarizes your issue), and then create a detailed description of the issue.
|
||||
* To help in resolving your issues please try to include the follow if applicable:
|
||||
* The problem that is happening?
|
||||
* What was expected?
|
||||
* How to reproduce the problem?
|
||||
* Server or Single Player?
|
||||
* Mod Pack using and version?
|
||||
* Crash log (Please make sure to use [pastebin](http://pastebin.com/) for the log file)
|
||||
* Screen shots or Pictures of the problem
|
||||
1. Make sure your issue has not already been answered or fixed and you are using the latest version. Also think about whether your issue is a valid one before submitting it.
|
||||
2. Go to [the issues page](https://github.com/AppliedEnergistics/Applied-Energistics-2/issues) and click [new issue](https://github.com/AppliedEnergistics/Applied-Energistics-2/issues/new)
|
||||
3. Enter your a title of your issue (something that summarizes your issue), and then create a detailed description of the issue.
|
||||
* Do not tag it with something like `[Feature]` or `[Bug]`. When it is applicable, we will take care of it.
|
||||
* The following details are required. Not including them can cause the issue to be closed.
|
||||
* Forge version
|
||||
* AE2 version
|
||||
* Crash log, when reporting a crash (Please make sure to use [pastebin](http://pastebin.com/))
|
||||
* Do not post an excerpt of what you consider important, instead:
|
||||
* Post the full log
|
||||
* Other mods and their version, when reporting an issue between AE and another mod
|
||||
* Also consider updating these before submitting a new issue, it might be already fixed
|
||||
* A detailed description of the bug or feature
|
||||
* To further help in resolving your issues please try to include the follow if applicable:
|
||||
* What was expected?
|
||||
* How to reproduce the problem?
|
||||
* This is usually a great detail and allows us to fix it way faster
|
||||
* Server or Single Player?
|
||||
* Screen shots or Pictures of the problem
|
||||
* Mod Pack using and version?
|
||||
* Keep in mind that some mods might use an outdated version of AE2
|
||||
* If so you should report it to your modpack
|
||||
5. Click `Submit New Issue`, and wait for feedback!
|
||||
|
||||
Providing as many details as possible does help us to find and resolve the issue faster and also you getting a fixed version as fast as possible.
|
||||
|
||||
### Submitting Changes
|
||||
|
||||
* Submit an issue to the github project, assuming one does not already exist.
|
||||
@@ -55,10 +67,8 @@ Applied Energistics 2 crashing, have a suggestion, found a bug? Create an issue
|
||||
from our issue tracker. The body describes the behavior without the patch,
|
||||
why this is a problem, and how the patch fixes the problem when applied.
|
||||
````
|
||||
* Always fully test your changes. If they are large engouh in scope, then fully
|
||||
test AE2.
|
||||
* Describing the process you used to test your changes in detail will help speed
|
||||
up this process.
|
||||
* Always fully test your changes. If they are large engouh in scope, then fully test AE2.
|
||||
* Describing the process you used to test your changes in detail will help speed up this process.
|
||||
|
||||
## Making Trivial Changes
|
||||
|
||||
@@ -97,6 +107,9 @@ the styling guidelines used by AE.
|
||||
|
||||
PRs that do not conform to these standards will be rejected.
|
||||
|
||||
You can find presets for Eclipse and IntelliJ IDEA in the `codeformat` folder.
|
||||
We try to keep them up to date, but in case you find them not formatting it correctly, then please report it
|
||||
|
||||
### Whitespace
|
||||
|
||||
#### Tabs or spaces
|
||||
|
||||
@@ -54,20 +54,32 @@ You install this mod by putting it into the `minecraft/mods/` folder. It has no
|
||||
|
||||
Applied Energistics 2 crashing, have a suggestion, found a bug? Create an issue now!
|
||||
|
||||
1. Make sure your issue hasn't already been answered or fixed. Also think about whether your issue is a valid one before submitting it.
|
||||
2. Go to [the issues page](https://github.com/AppliedEnergistics/Applied-Energistics-2/issues)
|
||||
3. Click new issue
|
||||
4. Enter your Issue's title (something that summarizes your issue), and then create a detailed description of the issue.
|
||||
* To help in resolving your issues please try to include the follow if applicable:
|
||||
* The problem that is happening?
|
||||
* What was expected?
|
||||
* How to reproduce the problem?
|
||||
* Server or Single Player?
|
||||
* Mod Pack using and version?
|
||||
* Crash log (Please make sure to use [pastebin](http://pastebin.com/) for the log file)
|
||||
* Screen shots or Pictures of the problem
|
||||
1. Make sure your issue has not already been answered or fixed and you are using the latest version. Also think about whether your issue is a valid one before submitting it.
|
||||
2. Go to [the issues page](https://github.com/AppliedEnergistics/Applied-Energistics-2/issues) and click [new issue](https://github.com/AppliedEnergistics/Applied-Energistics-2/issues/new)
|
||||
3. Enter your a title of your issue (something that summarizes your issue), and then create a detailed description of the issue.
|
||||
* Do not tag it with something like `[Feature]` or `[Bug]`. When it is applicable, we will take care of it.
|
||||
* The following details are required. Not including them can cause the issue to be closed.
|
||||
* Forge version
|
||||
* AE2 version
|
||||
* Crash log, when reporting a crash (Please make sure to use [pastebin](http://pastebin.com/))
|
||||
* Do not post an excerpt of what you consider important, instead:
|
||||
* Post the full log
|
||||
* Other mods and their version, when reporting an issue between AE and another mod
|
||||
* Also consider updating these before submitting a new issue, it might be already fixed
|
||||
* A detailed description of the bug or feature
|
||||
* To further help in resolving your issues please try to include the follow if applicable:
|
||||
* What was expected?
|
||||
* How to reproduce the problem?
|
||||
* This is usually a great detail and allows us to fix it way faster
|
||||
* Server or Single Player?
|
||||
* Screen shots or Pictures of the problem
|
||||
* Mod Pack using and version?
|
||||
* Keep in mind that some mods might use an outdated version of AE2
|
||||
* If so you should report it to your modpack
|
||||
5. Click `Submit New Issue`, and wait for feedback!
|
||||
|
||||
Providing as many details as possible does help us to find and resolve the issue faster and also you getting a fixed version as fast as possible.
|
||||
|
||||
## Building
|
||||
|
||||
1. Clone this repository via
|
||||
@@ -90,6 +102,8 @@ Applied Energistics 2 crashing, have a suggestion, found a bug? Create an issue
|
||||
Before you want to add major changes, you might want to discuss them with us first, before wasting your time.
|
||||
If you are still willing to contribute to this project, you can contribute via [Pull-Request](https://help.github.com/articles/creating-a-pull-request).
|
||||
|
||||
The [guidelines for contributing](https://github.com/AppliedEnergistics/Applied-Energistics-2/blob/master/CONTRIBUTING.md) contain more detailed information about topics like the used code style and should also be considered.
|
||||
|
||||
Here are a few things to keep in mind that will help get your PR approved.
|
||||
|
||||
* A PR should be focused on content. Any PRs where the changes are only syntax will be rejected.
|
||||
@@ -127,7 +141,7 @@ Development and standard builds can be obtained [Here](http://ae2.ae-mod.info/Do
|
||||
When compiling against the AE2 API you can use gradle dependencies, just add
|
||||
|
||||
dependencies {
|
||||
compile "appeng:appliedenergistics2:rv_-_____-__:dev"
|
||||
compile "appeng:appliedenergistics2:rv_-_____-__:dev"
|
||||
}
|
||||
|
||||
or add the compile line to your existing dependencies task to your build.gradle
|
||||
|
||||
+1
-2
@@ -98,9 +98,8 @@ sourceSets {
|
||||
|
||||
resources {
|
||||
srcDir "src/main/resources/"
|
||||
include "assets/appliedenergistics2/recipes/*.recipe",
|
||||
include "assets/appliedenergistics2/recipes/**/*.recipe",
|
||||
"assets/appliedenergistics2/recipes/README.html",
|
||||
"assets/appliedenergistics2/oredict/*.oredict",
|
||||
"assets/appliedenergistics2/lang/*.lang",
|
||||
"assets/appliedenergistics2/textures/blocks/*",
|
||||
"assets/appliedenergistics2/textures/guis/*",
|
||||
|
||||
@@ -35,6 +35,7 @@ code_chicken_core_version=1.0.7.46
|
||||
nei_version=1.0.5.111
|
||||
bc_version=7.0.9
|
||||
opencomputers_version=1.5.12.26
|
||||
pneumaticcraft_version=1.9.15-105
|
||||
|
||||
#########################################################
|
||||
# Self Compiled APIs #
|
||||
|
||||
@@ -56,6 +56,11 @@ repositories {
|
||||
url = "http://maven.cil.li/"
|
||||
}
|
||||
|
||||
maven {
|
||||
name = "MM repo"
|
||||
url = "http://maven.k-4u.nl/"
|
||||
}
|
||||
|
||||
ivy {
|
||||
name "BuildCraft"
|
||||
artifactPattern "http://www.mod-buildcraft.com/releases/BuildCraft/[revision]/[module]-[revision]-[classifier].[ext]"
|
||||
@@ -109,6 +114,7 @@ dependencies {
|
||||
compile "codechicken:CodeChickenCore:${minecraft_version}-${code_chicken_core_version}:dev"
|
||||
compile "codechicken:NotEnoughItems:${minecraft_version}-${nei_version}:dev"
|
||||
compile "com.mod-buildcraft:buildcraft:${bc_version}:dev"
|
||||
compile "pneumaticCraft:PneumaticCraft-${minecraft_version}:${pneumaticcraft_version}:api"
|
||||
|
||||
// provided APIs
|
||||
compile "li.cil.oc:OpenComputers:MC${minecraft_version}-${opencomputers_version}:api"
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
#Sat May 16 13:19:14 CEST 2015
|
||||
#Mon Aug 31 16:41:19 CEST 2015
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2013 AlgorithmX2
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package appeng.api.config;
|
||||
|
||||
|
||||
public enum SchedulingMode
|
||||
{
|
||||
DEFAULT, ROUNDROBIN, RANDOM
|
||||
}
|
||||
@@ -54,13 +54,15 @@ public enum Settings
|
||||
|
||||
INTERFACE_TERMINAL( EnumSet.of( YesNo.YES, YesNo.NO ) ), CRAFT_VIA_REDSTONE( EnumSet.of( YesNo.YES, YesNo.NO ) ),
|
||||
|
||||
STORAGE_FILTER( EnumSet.allOf( StorageFilter.class ) ), PLACE_BLOCK( EnumSet.of( YesNo.YES, YesNo.NO ) );
|
||||
STORAGE_FILTER( EnumSet.allOf( StorageFilter.class ) ), PLACE_BLOCK( EnumSet.of( YesNo.YES, YesNo.NO ) ),
|
||||
|
||||
SCHEDULING_MODE( EnumSet.allOf( SchedulingMode.class ) );
|
||||
|
||||
private final EnumSet<? extends Enum<?>> values;
|
||||
|
||||
Settings( @Nonnull EnumSet<? extends Enum<?>> possibleOptions )
|
||||
{
|
||||
if ( possibleOptions.isEmpty() )
|
||||
if( possibleOptions.isEmpty() )
|
||||
{
|
||||
throw new IllegalArgumentException( "Tried to instantiate an empty setting." );
|
||||
}
|
||||
|
||||
@@ -34,5 +34,6 @@ public enum TunnelType
|
||||
ITEM, // Item Tunnel
|
||||
LIGHT, // Light Tunnel
|
||||
BUNDLED_REDSTONE, // Bundled Redstone Tunnel
|
||||
COMPUTER_MESSAGE // Computer Message Tunnel
|
||||
COMPUTER_MESSAGE, // Computer Message Tunnel
|
||||
PRESSURE // PneumaticCraft Tunnel
|
||||
}
|
||||
|
||||
@@ -86,6 +86,8 @@ public interface IParts
|
||||
|
||||
IItemDefinition p2PTunnelOpenComputers();
|
||||
|
||||
IItemDefinition p2PTunnelPneumaticCraft();
|
||||
|
||||
IItemDefinition cableAnchor();
|
||||
|
||||
IItemDefinition monitor();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2013 AlgorithmX2
|
||||
* Copyright (c) 2013 - 2015 AlgorithmX2
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
@@ -24,11 +24,19 @@
|
||||
package appeng.api.features;
|
||||
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import appeng.api.recipes.ICraftHandler;
|
||||
import appeng.api.recipes.IRecipeHandler;
|
||||
import appeng.api.recipes.ISubItemResolver;
|
||||
|
||||
|
||||
/**
|
||||
* @author AlgorithmX2
|
||||
* @author thatsIch
|
||||
* @version rv3 - 10.08.2015
|
||||
* @since rv0
|
||||
*/
|
||||
public interface IRecipeHandlerRegistry
|
||||
{
|
||||
|
||||
@@ -37,7 +45,7 @@ public interface IRecipeHandlerRegistry
|
||||
*
|
||||
* MUST BE CALLED IN PRE-INIT
|
||||
*
|
||||
* @param name name of crafthandler
|
||||
* @param name name of crafthandler
|
||||
* @param handler class of crafthandler
|
||||
*/
|
||||
void addNewCraftHandler( String name, Class<? extends ICraftHandler> handler );
|
||||
@@ -56,6 +64,7 @@ public interface IRecipeHandlerRegistry
|
||||
*
|
||||
* @return A recipe handler by name, returns null on failure.
|
||||
*/
|
||||
@Nullable
|
||||
ICraftHandler getCraftHandlerFor( String name );
|
||||
|
||||
/**
|
||||
@@ -67,9 +76,10 @@ public interface IRecipeHandlerRegistry
|
||||
* resolve sub items by name.
|
||||
*
|
||||
* @param nameSpace namespace of item
|
||||
* @param itemName full name of item
|
||||
* @param itemName full name of item
|
||||
*
|
||||
* @return ResolverResult or ResolverResultSet
|
||||
* @return ResolverResult or ResolverResultSet or null if could not resolve
|
||||
*/
|
||||
@Nullable
|
||||
Object resolveItem( String nameSpace, String itemName );
|
||||
}
|
||||
|
||||
@@ -56,7 +56,6 @@ import appeng.client.texture.FlippableIcon;
|
||||
import appeng.client.texture.MissingIcon;
|
||||
import appeng.core.features.AEBlockFeatureHandler;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.core.features.ActivityState;
|
||||
import appeng.core.features.FeatureNameExtractor;
|
||||
import appeng.core.features.IAEFeature;
|
||||
import appeng.core.features.IFeatureHandler;
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
|
||||
package appeng.block;
|
||||
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemSlab;
|
||||
|
||||
public class AEBaseItemBlockSlab extends ItemSlab {
|
||||
|
||||
public AEBaseItemBlockSlab(Block block, AEBaseSlabBlock singleSlab, AEBaseSlabBlock doubleSlab, Boolean isDoubleSlab)
|
||||
public class AEBaseItemBlockSlab extends ItemSlab
|
||||
{
|
||||
|
||||
public AEBaseItemBlockSlab( Block block, AEBaseSlabBlock singleSlab, AEBaseSlabBlock doubleSlab, Boolean isDoubleSlab )
|
||||
{
|
||||
super( block, singleSlab, doubleSlab, isDoubleSlab );
|
||||
}
|
||||
|
||||
@@ -22,15 +22,14 @@ package appeng.block;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockSlab;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.core.features.IAEFeature;
|
||||
import appeng.core.features.IFeatureHandler;
|
||||
@@ -57,24 +56,27 @@ public class AEBaseSlabBlock extends BlockSlab implements IAEFeature
|
||||
this.setResistance( block.getExplosionResistance( null ) * 5.0F / 3.0F );
|
||||
this.setStepSound( block.stepSound );
|
||||
this.useNeighborBrightness = true;
|
||||
if (!field_150004_a) this.doubleSlabs = new AEBaseSlabBlock( block, meta, features, true, name + ".double" ).setSlabs(this);
|
||||
this.features = !field_150004_a ? new SlabBlockFeatureHandler( features, this ) : null;
|
||||
if( !this.field_150004_a )
|
||||
{
|
||||
this.doubleSlabs = new AEBaseSlabBlock( block, meta, features, true, name + ".double" ).setSlabs( this );
|
||||
}
|
||||
this.features = !this.field_150004_a ? new SlabBlockFeatureHandler( features, this ) : null;
|
||||
}
|
||||
|
||||
public AEBaseSlabBlock setSlabs(AEBaseSlabBlock slabs)
|
||||
public AEBaseSlabBlock setSlabs( AEBaseSlabBlock slabs )
|
||||
{
|
||||
this.slabs = slabs;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public AEBaseSlabBlock slabs()
|
||||
{
|
||||
return slabs;
|
||||
return this.slabs;
|
||||
}
|
||||
|
||||
|
||||
public AEBaseSlabBlock doubleSlabs()
|
||||
{
|
||||
return doubleSlabs;
|
||||
return this.doubleSlabs;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -90,40 +92,48 @@ public class AEBaseSlabBlock extends BlockSlab implements IAEFeature
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int dir, int meta)
|
||||
public IIcon getIcon( int dir, int meta )
|
||||
{
|
||||
return block.getIcon( dir, this.meta );
|
||||
return this.block.getIcon( dir, this.meta );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String func_150002_b(int p_150002_1_)
|
||||
public String func_150002_b( int p_150002_1_ )
|
||||
{
|
||||
return this.getUnlocalizedName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister reg) { }
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random rand, int fortune)
|
||||
public void registerBlockIcons( IIconRegister reg )
|
||||
{
|
||||
return this.field_150004_a ? Item.getItemFromBlock(this.slabs) : Item.getItemFromBlock(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z)
|
||||
public Item getItemDropped( int meta, Random rand, int fortune )
|
||||
{
|
||||
AEBaseSlabBlock block = (AEBaseSlabBlock) world.getBlock(x, y, z);
|
||||
return this.field_150004_a ? Item.getItemFromBlock( this.slabs ) : Item.getItemFromBlock( this );
|
||||
}
|
||||
|
||||
if (block == null) return null;
|
||||
if (block.field_150004_a) block = this.slabs;
|
||||
@Override
|
||||
public ItemStack getPickBlock( MovingObjectPosition target, World world, int x, int y, int z )
|
||||
{
|
||||
AEBaseSlabBlock block = (AEBaseSlabBlock) world.getBlock( x, y, z );
|
||||
|
||||
int meta = world.getBlockMetadata(x, y, z) & 7;
|
||||
return new ItemStack(block, 1, meta);
|
||||
if( block == null )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
if( block.field_150004_a )
|
||||
{
|
||||
block = this.slabs;
|
||||
}
|
||||
|
||||
int meta = world.getBlockMetadata( x, y, z ) & 7;
|
||||
return new ItemStack( block, 1, meta );
|
||||
}
|
||||
|
||||
public String name()
|
||||
{
|
||||
return name;
|
||||
return this.name;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,9 +53,7 @@ import appeng.api.util.IOrientable;
|
||||
import appeng.block.networking.BlockCableBus;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.core.features.AETileBlockFeatureHandler;
|
||||
import appeng.core.features.ActivityState;
|
||||
import appeng.core.features.IAEFeature;
|
||||
import appeng.core.features.ItemStackSrc;
|
||||
import appeng.helpers.ICustomCollision;
|
||||
import appeng.tile.AEBaseTile;
|
||||
import appeng.tile.networking.TileCableBus;
|
||||
|
||||
@@ -77,7 +77,7 @@ import appeng.transformer.annotations.Integration.Method;
|
||||
import appeng.util.Platform;
|
||||
|
||||
|
||||
@Interface( iface = "powercrystals.minefactoryreloaded.api.rednet.connectivity.IRedNetConnection", iname = "MFR" )
|
||||
@Interface( iface = "powercrystals.minefactoryreloaded.api.rednet.connectivity.IRedNetConnection", iname = IntegrationType.MFR )
|
||||
public class BlockCableBus extends AEBaseTileBlock implements IRedNetConnection
|
||||
{
|
||||
|
||||
@@ -455,7 +455,8 @@ public class BlockCableBus extends AEBaseTileBlock implements IRedNetConnection
|
||||
return this.cb( world, x, y, z ).recolourBlock( side, AEColor.values()[colour], who );
|
||||
}
|
||||
catch( Throwable ignored )
|
||||
{}
|
||||
{
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -505,7 +506,7 @@ public class BlockCableBus extends AEBaseTileBlock implements IRedNetConnection
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method( iname = "MFR" )
|
||||
@Method( iname = IntegrationType.MFR )
|
||||
public RedNetConnectionType getConnectionType( World world, int x, int y, int z, ForgeDirection side )
|
||||
{
|
||||
return this.cb( world, x, y, z ).canConnectRedstone( EnumSet.allOf( ForgeDirection.class ) ) ? RedNetConnectionType.CableSingle : RedNetConnectionType.None;
|
||||
|
||||
@@ -26,7 +26,6 @@ import net.minecraft.block.material.Material;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.client.render.BaseBlockRender;
|
||||
import appeng.client.render.blocks.RenderQNB;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.helpers.ICustomCollision;
|
||||
|
||||
@@ -20,7 +20,6 @@ package appeng.block.qnb;
|
||||
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
@@ -28,7 +27,6 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.tile.qnb.TileQuantumBridge;
|
||||
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ package appeng.block.solids;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.Random;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
|
||||
@@ -62,7 +62,7 @@ public class OreQuartzCharged extends OreQuartz
|
||||
@Override
|
||||
public int damageDropped( int id )
|
||||
{
|
||||
for ( ItemStack crystalStack : AEApi.instance().definitions().materials().certusQuartzCrystalCharged().maybeStack( 1 ).asSet() )
|
||||
for( ItemStack crystalStack : AEApi.instance().definitions().materials().certusQuartzCrystalCharged().maybeStack( 1 ).asSet() )
|
||||
{
|
||||
return crystalStack.getItemDamage();
|
||||
}
|
||||
@@ -74,7 +74,7 @@ public class OreQuartzCharged extends OreQuartz
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void randomDisplayTick( World w, int x, int y, int z, Random r )
|
||||
{
|
||||
if ( !AEConfig.instance.enableEffects )
|
||||
if( !AEConfig.instance.enableEffects )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -63,7 +63,6 @@ import appeng.helpers.WirelessTerminalGuiObject;
|
||||
import appeng.integration.IntegrationRegistry;
|
||||
import appeng.integration.IntegrationType;
|
||||
import appeng.parts.reporting.AbstractPartTerminal;
|
||||
import appeng.parts.reporting.PartTerminal;
|
||||
import appeng.tile.misc.TileSecurity;
|
||||
import appeng.util.IConfigManagerHost;
|
||||
import appeng.util.Platform;
|
||||
|
||||
@@ -26,6 +26,7 @@ import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.config.RedstoneMode;
|
||||
import appeng.api.config.SchedulingMode;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.Upgrades;
|
||||
import appeng.api.config.YesNo;
|
||||
@@ -36,6 +37,7 @@ import appeng.container.implementations.ContainerUpgradeable;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketConfigButton;
|
||||
import appeng.parts.automation.PartExportBus;
|
||||
import appeng.parts.automation.PartImportBus;
|
||||
|
||||
|
||||
@@ -48,6 +50,7 @@ public class GuiUpgradeable extends AEBaseGui
|
||||
GuiImgButton redstoneMode;
|
||||
GuiImgButton fuzzyMode;
|
||||
GuiImgButton craftMode;
|
||||
GuiImgButton schedulingMode;
|
||||
|
||||
public GuiUpgradeable( InventoryPlayer inventoryPlayer, IUpgradeableHost te )
|
||||
{
|
||||
@@ -81,10 +84,12 @@ public class GuiUpgradeable extends AEBaseGui
|
||||
this.redstoneMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 8, Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE );
|
||||
this.fuzzyMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 28, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
|
||||
this.craftMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 48, Settings.CRAFT_ONLY, YesNo.NO );
|
||||
this.schedulingMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 68, Settings.SCHEDULING_MODE, SchedulingMode.DEFAULT );
|
||||
|
||||
this.buttonList.add( this.craftMode );
|
||||
this.buttonList.add( this.redstoneMode );
|
||||
this.buttonList.add( this.fuzzyMode );
|
||||
this.buttonList.add( this.schedulingMode );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -107,6 +112,11 @@ public class GuiUpgradeable extends AEBaseGui
|
||||
{
|
||||
this.craftMode.set( this.cvb.cMode );
|
||||
}
|
||||
|
||||
if( this.schedulingMode != null )
|
||||
{
|
||||
this.schedulingMode.set( this.cvb.schedulingMode );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -140,6 +150,10 @@ public class GuiUpgradeable extends AEBaseGui
|
||||
{
|
||||
this.craftMode.setVisibility( this.bc.getInstalledUpgrades( Upgrades.CRAFTING ) > 0 );
|
||||
}
|
||||
if( this.schedulingMode != null )
|
||||
{
|
||||
this.schedulingMode.setVisibility(this.bc.getInstalledUpgrades( Upgrades.CAPACITY ) > 0 && this.bc instanceof PartExportBus );
|
||||
}
|
||||
}
|
||||
|
||||
protected String getBackground()
|
||||
@@ -178,5 +192,10 @@ public class GuiUpgradeable extends AEBaseGui
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.fuzzyMode.getSetting(), backwards ) );
|
||||
}
|
||||
|
||||
if( btn == this.schedulingMode )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.schedulingMode.getSetting(), backwards ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ import appeng.api.config.OperationMode;
|
||||
import appeng.api.config.PowerUnits;
|
||||
import appeng.api.config.RedstoneMode;
|
||||
import appeng.api.config.RelativeDirection;
|
||||
import appeng.api.config.SchedulingMode;
|
||||
import appeng.api.config.SearchBoxMode;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.SortDir;
|
||||
@@ -158,6 +159,10 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
|
||||
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 );
|
||||
|
||||
this.registerApp( 16 * 15, Settings.SCHEDULING_MODE, SchedulingMode.DEFAULT, ButtonToolTips.SchedulingMode, ButtonToolTips.SchedulingModeDefault );
|
||||
this.registerApp( 16 * 15 + 1, Settings.SCHEDULING_MODE, SchedulingMode.ROUNDROBIN, ButtonToolTips.SchedulingMode, ButtonToolTips.SchedulingModeRoundRobin );
|
||||
this.registerApp( 16 * 15 + 2, Settings.SCHEDULING_MODE, SchedulingMode.RANDOM, ButtonToolTips.SchedulingMode, ButtonToolTips.SchedulingModeRandom );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -389,7 +394,6 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static class ButtonAppearance
|
||||
{
|
||||
public int index;
|
||||
|
||||
@@ -56,11 +56,11 @@ public class GuiTabButton extends GuiButton implements ITooltip
|
||||
/**
|
||||
* Using itemstack as an icon
|
||||
*
|
||||
* @param x x pos of button
|
||||
* @param y y pos of button
|
||||
* @param ico used icon
|
||||
* @param x x pos of button
|
||||
* @param y y pos of button
|
||||
* @param ico used icon
|
||||
* @param message mouse over message
|
||||
* @param ir renderer
|
||||
* @param ir renderer
|
||||
*/
|
||||
public GuiTabButton( int x, int y, ItemStack ico, String message, RenderItem ir )
|
||||
{
|
||||
|
||||
@@ -45,10 +45,10 @@ public class MEGuiTextField extends GuiTextField
|
||||
* Pays attention to the '_' caret.
|
||||
*
|
||||
* @param fontRenderer renderer for the strings
|
||||
* @param xPos absolute left position
|
||||
* @param yPos absolute top position
|
||||
* @param width absolute width
|
||||
* @param height absolute height
|
||||
* @param xPos absolute left position
|
||||
* @param yPos absolute top position
|
||||
* @param width absolute width
|
||||
* @param height absolute height
|
||||
*/
|
||||
public MEGuiTextField( FontRenderer fontRenderer, int xPos, int yPos, int width, int height )
|
||||
{
|
||||
|
||||
@@ -20,6 +20,7 @@ package appeng.client.render;
|
||||
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
|
||||
@@ -24,7 +24,6 @@ import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.block.AEBaseBlock;
|
||||
import appeng.block.networking.BlockController;
|
||||
import appeng.client.render.BaseBlockRender;
|
||||
import appeng.client.texture.ExtraBlockTextures;
|
||||
|
||||
@@ -159,6 +159,7 @@ public class RenderBlockInscriber extends BaseBlockRender<BlockInscriber, TileIn
|
||||
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||
GL11.glDisable( GL11.GL_LIGHTING );
|
||||
GL11.glDisable( GL12.GL_RESCALE_NORMAL );
|
||||
GL11.glCullFace( GL11.GL_FRONT );
|
||||
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
mc.renderEngine.bindTexture( TextureMap.locationBlocksTexture );
|
||||
@@ -224,6 +225,9 @@ public class RenderBlockInscriber extends BaseBlockRender<BlockInscriber, TileIn
|
||||
|
||||
tess.draw();
|
||||
|
||||
GL11.glCullFace( GL11.GL_BACK );
|
||||
GL11.glEnable( GL11.GL_LIGHTING );
|
||||
GL11.glEnable( GL12.GL_RESCALE_NORMAL );
|
||||
GL11.glPopMatrix();
|
||||
|
||||
int items = 0;
|
||||
|
||||
@@ -29,7 +29,6 @@ import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.client.IItemRenderer.ItemRenderType;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.block.misc.BlockPaint;
|
||||
import appeng.client.render.BaseBlockRender;
|
||||
import appeng.client.texture.ExtraBlockTextures;
|
||||
|
||||
@@ -32,7 +32,6 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
import appeng.api.util.IOrientable;
|
||||
import appeng.api.util.IOrientableBlock;
|
||||
import appeng.block.AEBaseBlock;
|
||||
import appeng.block.misc.BlockQuartzTorch;
|
||||
import appeng.client.render.BaseBlockRender;
|
||||
import appeng.tile.AEBaseTile;
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
|
||||
@Override
|
||||
/**
|
||||
* Overridden super.setupConfig to prevent setting up the fake slots
|
||||
*/ protected void setupConfig()
|
||||
*/protected void setupConfig()
|
||||
{
|
||||
this.setupUpgrades();
|
||||
}
|
||||
@@ -127,10 +127,10 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
|
||||
for( IInscriberRecipe recipe : AEApi.instance().registries().inscriber().getRecipes() )
|
||||
{
|
||||
boolean matchA = ( top == null && !recipe.getTopOptional().isPresent() ) || ( Platform.isSameItemPrecise( top, recipe.getTopOptional().orNull() ) ) && // and...
|
||||
( bot == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( bot, recipe.getBottomOptional().orNull() ) );
|
||||
( bot == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( bot, recipe.getBottomOptional().orNull() ) );
|
||||
|
||||
boolean matchB = ( bot == null && !recipe.getTopOptional().isPresent() ) || ( Platform.isSameItemPrecise( bot, recipe.getTopOptional().orNull() ) ) && // and...
|
||||
( top == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( top, recipe.getBottomOptional().orNull() ) );
|
||||
( top == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( top, recipe.getBottomOptional().orNull() ) );
|
||||
|
||||
if( matchA || matchB )
|
||||
{
|
||||
|
||||
@@ -50,19 +50,19 @@ public class ContainerInterface extends ContainerUpgradeable
|
||||
|
||||
this.myDuality = te.getInterfaceDuality();
|
||||
|
||||
for( int x = 0; x < 9; x++ )
|
||||
for( int x = 0; x < DualityInterface.NUMBER_OF_PATTERN_SLOTS; x++ )
|
||||
{
|
||||
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODED_PATTERN, this.myDuality.getPatterns(), x, 8 + 18 * x, 90 + 7, this.invPlayer ) );
|
||||
}
|
||||
|
||||
for( int x = 0; x < 8; x++ )
|
||||
for( int x = 0; x < DualityInterface.NUMBER_OF_CONFIG_SLOTS; x++ )
|
||||
{
|
||||
this.addSlotToContainer( new SlotFake( this.myDuality.getConfig(), x, 17 + 18 * x, 35 ) );
|
||||
this.addSlotToContainer( new SlotFake( this.myDuality.getConfig(), x, 8 + 18 * x, 35 ) );
|
||||
}
|
||||
|
||||
for( int x = 0; x < 8; x++ )
|
||||
for( int x = 0; x < DualityInterface.NUMBER_OF_STORAGE_SLOTS; x++ )
|
||||
{
|
||||
this.addSlotToContainer( new SlotNormal( this.myDuality.getStorage(), x, 17 + 18 * x, 35 + 18 ) );
|
||||
this.addSlotToContainer( new SlotNormal( this.myDuality.getStorage(), x, 8 + 18 * x, 35 + 18 ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.config.RedstoneMode;
|
||||
import appeng.api.config.SchedulingMode;
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.Upgrades;
|
||||
@@ -58,6 +59,8 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
||||
public FuzzyMode fzMode = FuzzyMode.IGNORE_ALL;
|
||||
@GuiSync( 5 )
|
||||
public YesNo cMode = YesNo.NO;
|
||||
@GuiSync( 6 )
|
||||
public SchedulingMode schedulingMode = SchedulingMode.DEFAULT;
|
||||
int tbSlot;
|
||||
NetworkToolViewer tbInventory;
|
||||
|
||||
@@ -217,6 +220,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
||||
if( this.upgradeable instanceof PartExportBus )
|
||||
{
|
||||
this.cMode = (YesNo) cm.getSetting( Settings.CRAFT_ONLY );
|
||||
this.schedulingMode = (SchedulingMode) cm.getSetting( Settings.SCHEDULING_MODE );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ package appeng.container.slot;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
// there is nothing special about this slot, its simply used to represent the players inventory, vs a container slot.
|
||||
|
||||
// there is nothing special about this slot, its simply used to represent the players inventory, vs a container slot.
|
||||
|
||||
public class SlotPlayerInv extends AppEngSlot
|
||||
{
|
||||
|
||||
@@ -145,7 +145,8 @@ public class SlotRestrictedInput extends AppEngSlot
|
||||
{
|
||||
return true;
|
||||
}
|
||||
// ICraftingPatternDetails pattern = i.getItem() instanceof ICraftingPatternItem ? ((ICraftingPatternItem)
|
||||
// ICraftingPatternDetails pattern = i.getItem() instanceof ICraftingPatternItem ?
|
||||
// ((ICraftingPatternItem)
|
||||
// i.getItem()).getPatternForItem( i ) : null;
|
||||
return false;// pattern != null;
|
||||
}
|
||||
@@ -179,8 +180,8 @@ public class SlotRestrictedInput extends AppEngSlot
|
||||
|
||||
case INSCRIBER_INPUT:
|
||||
return true;/*
|
||||
* for (ItemStack is : Inscribe.inputs) if ( Platform.isSameItemPrecise( is, i ) ) return true;
|
||||
*
|
||||
* for (ItemStack is : Inscribe.inputs) if ( Platform.isSameItemPrecise( is, i ) ) return
|
||||
* true;
|
||||
* return false;
|
||||
*/
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ public final class Api implements IAppEngApi
|
||||
@Override
|
||||
public IGridNode createGridNode( IGridBlock blk )
|
||||
{
|
||||
if ( Platform.isClient() )
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
throw new IllegalStateException( "Grid features for " + blk + " are server side only." );
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ package appeng.core;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import com.google.common.base.Stopwatch;
|
||||
|
||||
@@ -20,6 +20,7 @@ package appeng.core;
|
||||
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
@@ -35,6 +36,10 @@ import appeng.core.api.imc.IMCSpatial;
|
||||
|
||||
/**
|
||||
* Handles the delegation of the corresponding IMC messages to the suitable IMC processors
|
||||
*
|
||||
* @author thatsIch
|
||||
* @version rv3 - 10.08.2015
|
||||
* @since rv1
|
||||
*/
|
||||
public class IMCHandler
|
||||
{
|
||||
@@ -43,8 +48,7 @@ public class IMCHandler
|
||||
/**
|
||||
* Contains the processors,
|
||||
*
|
||||
* is mutable,
|
||||
* but write access only by the constructor
|
||||
* is mutable, but write access only by the constructor
|
||||
*/
|
||||
private final Map<String, IIMCProcessor> processors;
|
||||
|
||||
@@ -62,13 +66,12 @@ public class IMCHandler
|
||||
|
||||
for( TunnelType type : TunnelType.values() )
|
||||
{
|
||||
this.processors.put( "add-p2p-attunement-" + type.name().replace( '_', '-' ).toLowerCase(), new IMCP2PAttunement() );
|
||||
this.processors.put( "add-p2p-attunement-" + type.name().replace( '_', '-' ).toLowerCase( Locale.ENGLISH ), new IMCP2PAttunement() );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Tries to find every message matching the internal IMC keys.
|
||||
* When found the corresponding handler will process the attached message.
|
||||
* Tries to find every message matching the internal IMC keys. When found the corresponding handler will process the attached message.
|
||||
*
|
||||
* @param event Event carrying the identifier and message for the handlers
|
||||
*/
|
||||
@@ -80,7 +83,7 @@ public class IMCHandler
|
||||
|
||||
try
|
||||
{
|
||||
IIMCProcessor handler = this.processors.get( key );
|
||||
final IIMCProcessor handler = this.processors.get( key );
|
||||
if( handler != null )
|
||||
{
|
||||
handler.process( message );
|
||||
@@ -90,7 +93,7 @@ public class IMCHandler
|
||||
throw new IllegalStateException( "Invalid IMC Called: " + key );
|
||||
}
|
||||
}
|
||||
catch( Throwable t )
|
||||
catch( Exception t )
|
||||
{
|
||||
AELog.warning( "Problem detected when processing IMC " + key + " from " + message.getSender() );
|
||||
AELog.error( t );
|
||||
|
||||
@@ -22,6 +22,7 @@ package appeng.core;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
@@ -29,7 +30,6 @@ import com.google.common.base.Preconditions;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
import appeng.api.recipes.IRecipeHandler;
|
||||
import appeng.api.recipes.IRecipeLoader;
|
||||
import appeng.recipes.loader.ConfigLoader;
|
||||
import appeng.recipes.loader.JarLoader;
|
||||
import appeng.recipes.loader.RecipeResourceCopier;
|
||||
@@ -69,10 +69,6 @@ public class RecipeLoader implements Runnable
|
||||
final File readmeGenDest = new File( generatedRecipesDir, "README.html" );
|
||||
final File readmeUserDest = new File( userRecipesDir, "README.html" );
|
||||
|
||||
final IRecipeLoader oreDictLoader = new JarLoader("/assets/appliedenergistics2/oredict/");
|
||||
this.handler.parseRecipes(oreDictLoader, "vanilla.oredict" );
|
||||
this.handler.parseRecipes(oreDictLoader, "ae2.oredict" );
|
||||
|
||||
// generates generated and user recipes dir
|
||||
// will clean the generated every time to keep it up to date
|
||||
// copies over the recipes in the jar over to the generated folder
|
||||
|
||||
@@ -343,10 +343,10 @@ public final class Registration
|
||||
target.partCableCovered = source.cableCovered();
|
||||
target.partCableGlass = source.cableGlass();
|
||||
target.partCableDense = source.cableDense();
|
||||
// target.partLumenCableSmart = source.lumenCableSmart();
|
||||
// target.partLumenCableCovered = source.lumenCableCovered();
|
||||
// target.partLumenCableGlass = source.lumenCableGlass();
|
||||
// target.partLumenCableDense = source.lumenCableDense();
|
||||
// target.partLumenCableSmart = source.lumenCableSmart();
|
||||
// target.partLumenCableCovered = source.lumenCableCovered();
|
||||
// target.partLumenCableGlass = source.lumenCableGlass();
|
||||
// target.partLumenCableDense = source.lumenCableDense();
|
||||
target.partQuartzFiber = this.converter.of( source.quartzFiber() );
|
||||
target.partToggleBus = this.converter.of( source.toggleBus() );
|
||||
target.partInvertedToggleBus = this.converter.of( source.invertedToggleBus() );
|
||||
@@ -521,22 +521,6 @@ public final class Registration
|
||||
partHelper.registerNewLayer( "appeng.parts.layers.LayerIFluidHandler", "net.minecraftforge.fluids.IFluidHandler" );
|
||||
partHelper.registerNewLayer( "appeng.parts.layers.LayerITileStorageMonitorable", "appeng.api.implementations.tiles.ITileStorageMonitorable" );
|
||||
|
||||
if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.IC2 ) )
|
||||
{
|
||||
partHelper.registerNewLayer( "appeng.parts.layers.LayerIEnergySink", "ic2.api.energy.tile.IEnergySink" );
|
||||
partHelper.registerNewLayer( "appeng.parts.layers.LayerIEnergySource", "ic2.api.energy.tile.IEnergySource" );
|
||||
}
|
||||
|
||||
if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.RF ) )
|
||||
{
|
||||
partHelper.registerNewLayer( "appeng.parts.layers.LayerIEnergyHandler", "cofh.api.energy.IEnergyReceiver" );
|
||||
}
|
||||
|
||||
if ( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.OpenComputers ) )
|
||||
{
|
||||
partHelper.registerNewLayer( "appeng.parts.layers.LayerSidedEnvironment", "li.cil.oc.api.network.SidedEnvironment" );
|
||||
}
|
||||
|
||||
FMLCommonHandler.instance().bus().register( TickHandler.INSTANCE );
|
||||
MinecraftForge.EVENT_BUS.register( TickHandler.INSTANCE );
|
||||
|
||||
|
||||
@@ -241,14 +241,15 @@ public final class ApiBlocks implements IBlocks
|
||||
|
||||
this.quartzPillarStair = constructor.registerBlockDefinition( new QuartzPillarStairBlock( quartzPillar ) );
|
||||
|
||||
this.skyStoneSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone, 0, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneSlabBlock" ) );
|
||||
this.skyStoneBlockSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone, 1, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneBlockSlabBlock" ) );
|
||||
this.skyStoneBrickSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone, 2, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneBrickSlabBlock" ) );
|
||||
this.skyStoneSmallBrickSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone, 3, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneSmallBrickSlabBlock" ) );
|
||||
this.fluixSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( fluixBlock, 0, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "FluixSlabBlock" ) );
|
||||
this.quartzSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( quartzBlock, 0, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "QuartzSlabBlock" ) );
|
||||
this.chiseledQuartzSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( chiseledQuartz, 0, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "ChiseledQuartzSlabBlock" ) );;
|
||||
this.quartzPillarSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( quartzPillar, 0, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "QuartzPillarSlabBlock" ) );
|
||||
this.skyStoneSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone, 0, EnumSet.of( AEFeature.DecorativeQuartzBlocks ), false, "SkyStoneSlabBlock" ) );
|
||||
this.skyStoneBlockSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone, 1, EnumSet.of( AEFeature.DecorativeQuartzBlocks ), false, "SkyStoneBlockSlabBlock" ) );
|
||||
this.skyStoneBrickSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone, 2, EnumSet.of( AEFeature.DecorativeQuartzBlocks ), false, "SkyStoneBrickSlabBlock" ) );
|
||||
this.skyStoneSmallBrickSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone, 3, EnumSet.of( AEFeature.DecorativeQuartzBlocks ), false, "SkyStoneSmallBrickSlabBlock" ) );
|
||||
this.fluixSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( fluixBlock, 0, EnumSet.of( AEFeature.DecorativeQuartzBlocks ), false, "FluixSlabBlock" ) );
|
||||
this.quartzSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( quartzBlock, 0, EnumSet.of( AEFeature.DecorativeQuartzBlocks ), false, "QuartzSlabBlock" ) );
|
||||
this.chiseledQuartzSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( chiseledQuartz, 0, EnumSet.of( AEFeature.DecorativeQuartzBlocks ), false, "ChiseledQuartzSlabBlock" ) );
|
||||
;
|
||||
this.quartzPillarSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( quartzPillar, 0, EnumSet.of( AEFeature.DecorativeQuartzBlocks ), false, "QuartzPillarSlabBlock" ) );
|
||||
|
||||
this.itemGen = constructor.registerBlockDefinition( new BlockItemGen() );
|
||||
this.chunkLoader = constructor.registerBlockDefinition( new BlockChunkloader() );
|
||||
|
||||
@@ -61,6 +61,7 @@ public final class ApiParts implements IParts
|
||||
private final IItemDefinition p2PTunnelRF;
|
||||
private final IItemDefinition p2PTunnelLight;
|
||||
private final IItemDefinition p2PTunnelOpenComputers;
|
||||
private final IItemDefinition p2PTunnelPneumaticCraft;
|
||||
private final IItemDefinition cableAnchor;
|
||||
private final IItemDefinition monitor;
|
||||
private final IItemDefinition semiDarkMonitor;
|
||||
@@ -104,6 +105,7 @@ public final class ApiParts implements IParts
|
||||
this.p2PTunnelRF = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelRF ) );
|
||||
this.p2PTunnelLight = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelLight ) );
|
||||
this.p2PTunnelOpenComputers = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelOpenComputers ) );
|
||||
this.p2PTunnelPneumaticCraft = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelPressure ) );
|
||||
this.cableAnchor = new DamagedItemDefinition( itemMultiPart.createPart( PartType.CableAnchor ) );
|
||||
this.monitor = new DamagedItemDefinition( itemMultiPart.createPart( PartType.Monitor ) );
|
||||
this.semiDarkMonitor = new DamagedItemDefinition( itemMultiPart.createPart( PartType.SemiDarkMonitor ) );
|
||||
@@ -282,6 +284,12 @@ public final class ApiParts implements IParts
|
||||
return this.p2PTunnelOpenComputers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemDefinition p2PTunnelPneumaticCraft()
|
||||
{
|
||||
return this.p2PTunnelPneumaticCraft;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemDefinition cableAnchor()
|
||||
{
|
||||
|
||||
@@ -54,7 +54,7 @@ public class DefinitionConstructor
|
||||
|
||||
if( definition instanceof ITileDefinition )
|
||||
{
|
||||
return ( (ITileDefinition) definition );
|
||||
return( (ITileDefinition) definition );
|
||||
}
|
||||
|
||||
throw new IllegalStateException( "No tile definition for " + feature );
|
||||
@@ -66,7 +66,7 @@ public class DefinitionConstructor
|
||||
|
||||
if( definition instanceof IBlockDefinition )
|
||||
{
|
||||
return ( (IBlockDefinition) definition );
|
||||
return( (IBlockDefinition) definition );
|
||||
}
|
||||
|
||||
throw new IllegalStateException( "No block definition for " + feature );
|
||||
|
||||
@@ -18,35 +18,35 @@
|
||||
|
||||
/* Example:
|
||||
|
||||
NBTTagCompound msg = new NBTTagCompound();
|
||||
NBTTagCompound in = new NBTTagCompound();
|
||||
NBTTagCompound out = new NBTTagCompound();
|
||||
NBTTagCompound msg = new NBTTagCompound();
|
||||
NBTTagCompound in = new NBTTagCompound();
|
||||
NBTTagCompound out = new NBTTagCompound();
|
||||
|
||||
new ItemStack( Blocks.iron_ore ).writeToNBT( in );
|
||||
new ItemStack( Items.iron_ingot ).writeToNBT( out );
|
||||
msg.setTag( "in", in );
|
||||
msg.setTag( "out", out );
|
||||
msg.setInteger( "turns", 8 );
|
||||
new ItemStack( Blocks.iron_ore ).writeToNBT( in );
|
||||
new ItemStack( Items.iron_ingot ).writeToNBT( out );
|
||||
msg.setTag( "in", in );
|
||||
msg.setTag( "out", out );
|
||||
msg.setInteger( "turns", 8 );
|
||||
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-grindable", msg );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-grindable", msg );
|
||||
|
||||
-- or --
|
||||
|
||||
NBTTagCompound msg = new NBTTagCompound();
|
||||
NBTTagCompound in = new NBTTagCompound();
|
||||
NBTTagCompound out = new NBTTagCompound();
|
||||
NBTTagCompound optional = new NBTTagCompound();
|
||||
NBTTagCompound msg = new NBTTagCompound();
|
||||
NBTTagCompound in = new NBTTagCompound();
|
||||
NBTTagCompound out = new NBTTagCompound();
|
||||
NBTTagCompound optional = new NBTTagCompound();
|
||||
|
||||
new ItemStack( Blocks.iron_ore ).writeToNBT( in );
|
||||
new ItemStack( Items.iron_ingot ).writeToNBT( out );
|
||||
new ItemStack( Blocks.gravel ).writeToNBT( optional );
|
||||
msg.setTag( "in", in );
|
||||
msg.setTag( "out", out );
|
||||
msg.setTag( "optional", optional );
|
||||
msg.setFloat( "chance", 0.5 );
|
||||
msg.setInteger( "turns", 8 );
|
||||
new ItemStack( Blocks.iron_ore ).writeToNBT( in );
|
||||
new ItemStack( Items.iron_ingot ).writeToNBT( out );
|
||||
new ItemStack( Blocks.gravel ).writeToNBT( optional );
|
||||
msg.setTag( "in", in );
|
||||
msg.setTag( "out", out );
|
||||
msg.setTag( "optional", optional );
|
||||
msg.setFloat( "chance", 0.5 );
|
||||
msg.setInteger( "turns", 8 );
|
||||
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-grindable", msg );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-grindable", msg );
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
|
||||
/* Example:
|
||||
|
||||
NBTTagCompound msg = new NBTTagCompound();
|
||||
NBTTagCompound item = new NBTTagCompound();
|
||||
NBTTagCompound msg = new NBTTagCompound();
|
||||
NBTTagCompound item = new NBTTagCompound();
|
||||
|
||||
new ItemStack( Blocks.anvil ).writeToNBT( item );
|
||||
msg.setTag( "item", item );
|
||||
msg.setDouble( "weight", 32.0 );
|
||||
new ItemStack( Blocks.anvil ).writeToNBT( item );
|
||||
msg.setTag( "item", item );
|
||||
msg.setDouble( "weight", 32.0 );
|
||||
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-mattercannon-ammo", msg );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-mattercannon-ammo", msg );
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of Applied Energistics 2.
|
||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
||||
*
|
||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
@@ -18,12 +18,12 @@
|
||||
|
||||
/* Example:
|
||||
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-me", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-bc-power", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-ic2-power", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-redstone", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-fluid", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-item", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-me", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-bc-power", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-ic2-power", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-redstone", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-fluid", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-item", new ItemStack( myBlockOrItem ) );
|
||||
|
||||
*/
|
||||
|
||||
@@ -31,6 +31,7 @@ package appeng.core.api.imc;
|
||||
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Locale;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@@ -47,7 +48,7 @@ public class IMCP2PAttunement implements IIMCProcessor
|
||||
@Override
|
||||
public void process( IMCMessage m )
|
||||
{
|
||||
String key = m.key.substring( "add-p2p-attunement-".length() ).replace( '-', '_' ).toUpperCase();
|
||||
String key = m.key.substring( "add-p2p-attunement-".length() ).replace( '-', '_' ).toUpperCase( Locale.ENGLISH );
|
||||
|
||||
TunnelType type = TunnelType.valueOf( key );
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
/* Example:
|
||||
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "whitelist-spatial", "mymod.tileentities.MyTileEntity" );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "whitelist-spatial", "mymod.tileentities.MyTileEntity" );
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.core.crash;
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.core.crash;
|
||||
|
||||
|
||||
@@ -7,7 +8,7 @@ import appeng.core.AEConfig;
|
||||
public class ModCrashEnhancement extends BaseCrashEnhancement
|
||||
{
|
||||
private static final String MOD_VERSION = AEConfig.CHANNEL + ' ' + AEConfig.VERSION + " for Forge " + // WHAT?
|
||||
net.minecraftforge.common.ForgeVersion.majorVersion + '.' // majorVersion
|
||||
net.minecraftforge.common.ForgeVersion.majorVersion + '.' // majorVersion
|
||||
+ net.minecraftforge.common.ForgeVersion.minorVersion + '.' // minorVersion
|
||||
+ net.minecraftforge.common.ForgeVersion.revisionVersion + '.' // revisionVersion
|
||||
+ net.minecraftforge.common.ForgeVersion.buildVersion;
|
||||
|
||||
@@ -27,9 +27,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
import appeng.api.definitions.IBlockDefinition;
|
||||
import appeng.block.AEBaseBlock;
|
||||
import appeng.core.CommonHelper;
|
||||
import appeng.core.CreativeTab;
|
||||
import appeng.util.Platform;
|
||||
|
||||
|
||||
public final class AEBlockFeatureHandler implements IFeatureHandler
|
||||
|
||||
@@ -57,7 +57,7 @@ public enum AEFeature
|
||||
|
||||
DenseEnergyCells( "HigherCapacity" ), DenseCables( "HigherCapacity" ),
|
||||
|
||||
P2PTunnelRF( "P2PTunnels" ), P2PTunnelME( "P2PTunnels" ), P2PTunnelItems( "P2PTunnels" ), P2PTunnelRedstone( "P2PTunnels" ), P2PTunnelEU( "P2PTunnels" ), P2PTunnelLiquids( "P2PTunnels" ), P2PTunnelLight( "P2PTunnels" ), P2PTunnelOpenComputers( "P2PTunnels" ),
|
||||
P2PTunnelRF( "P2PTunnels" ), P2PTunnelME( "P2PTunnels" ), P2PTunnelItems( "P2PTunnels" ), P2PTunnelRedstone( "P2PTunnels" ), P2PTunnelEU( "P2PTunnels" ), P2PTunnelLiquids( "P2PTunnels" ), P2PTunnelLight( "P2PTunnels" ), P2PTunnelOpenComputers( "P2PTunnels" ), P2PTunnelPressure( "P2PTunnels" ),
|
||||
|
||||
MassCannonBlockDamage( "BlockFeatures" ), TinyTNTBlockDamage( "BlockFeatures" ), Facades( "Facades" ),
|
||||
|
||||
@@ -79,7 +79,7 @@ public enum AEFeature
|
||||
|
||||
AEFeature( String cat )
|
||||
{
|
||||
this(cat, true);
|
||||
this( cat, true );
|
||||
}
|
||||
|
||||
AEFeature( String cat, boolean defaultValue )
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.core.features;
|
||||
|
||||
|
||||
@@ -92,7 +93,6 @@ public final class DefinitionConverter
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static class AEItem extends AEComparable
|
||||
{
|
||||
private final IItemDefinition definition;
|
||||
@@ -119,7 +119,6 @@ public final class DefinitionConverter
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static class AEBlock extends AEItem
|
||||
{
|
||||
private final IBlockDefinition definition;
|
||||
@@ -145,7 +144,6 @@ public final class DefinitionConverter
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static class AETile extends AEBlock
|
||||
{
|
||||
private final ITileDefinition definition;
|
||||
|
||||
@@ -21,17 +21,15 @@ package appeng.core.features;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockSlab;
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
import appeng.api.definitions.IBlockDefinition;
|
||||
import appeng.block.AEBaseItemBlockSlab;
|
||||
import appeng.block.AEBaseSlabBlock;
|
||||
import appeng.core.CreativeTab;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
|
||||
public class SlabBlockFeatureHandler implements IFeatureHandler
|
||||
{
|
||||
@@ -44,7 +42,7 @@ public class SlabBlockFeatureHandler implements IFeatureHandler
|
||||
{
|
||||
final ActivityState state = new FeaturedActiveChecker( features ).getActivityState();
|
||||
this.slabs = slabs;
|
||||
this.extractor = new FeatureNameExtractor( slabs.getClass(), Optional.<String>absent());
|
||||
this.extractor = new FeatureNameExtractor( slabs.getClass(), Optional.<String>absent() );
|
||||
this.enabled = state == ActivityState.Enabled;
|
||||
this.definition = new BlockDefinition( slabs, state );
|
||||
}
|
||||
@@ -67,8 +65,8 @@ public class SlabBlockFeatureHandler implements IFeatureHandler
|
||||
if( this.enabled )
|
||||
{
|
||||
this.slabs.setCreativeTab( CreativeTab.instance );
|
||||
GameRegistry.registerBlock( slabs, AEBaseItemBlockSlab.class, "tile." + slabs.name(), slabs, slabs.doubleSlabs(), false);
|
||||
GameRegistry.registerBlock( slabs.doubleSlabs(), AEBaseItemBlockSlab.class, "tile." + slabs.name() + ".double", slabs, slabs.doubleSlabs(), true);
|
||||
GameRegistry.registerBlock( this.slabs, AEBaseItemBlockSlab.class, "tile." + this.slabs.name(), this.slabs, this.slabs.doubleSlabs(), false );
|
||||
GameRegistry.registerBlock( this.slabs.doubleSlabs(), AEBaseItemBlockSlab.class, "tile." + this.slabs.name() + ".double", this.slabs, this.slabs.doubleSlabs(), true );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ public final class GrinderRecipeManager implements IGrinderRegistry, IOreListene
|
||||
}
|
||||
|
||||
this.log( "Allow Grinding of " + Platform.getItemDisplayName( in ) + " to " + Platform.getItemDisplayName( out ) + " with optional " + Platform.getItemDisplayName( optional ) + " for " + cost );
|
||||
this.injectRecipe( new AppEngGrinderRecipe( this.copy( in ), this.copy( out ), this.copy( optional ), chance, cost ) );
|
||||
this.injectRecipe( new AppEngGrinderRecipe( this.copy( in ), this.copy( out ), this.copy( optional ), this.copy( optional2 ), chance, chance2, cost ) );
|
||||
}
|
||||
|
||||
private void injectRecipe( AppEngGrinderRecipe appEngGrinderRecipe )
|
||||
|
||||
@@ -21,6 +21,7 @@ package appeng.core.features.registries;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of Applied Energistics 2.
|
||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
||||
*
|
||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
@@ -19,8 +19,12 @@
|
||||
package appeng.core.features.registries;
|
||||
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import appeng.api.features.IRecipeHandlerRegistry;
|
||||
import appeng.api.recipes.ICraftHandler;
|
||||
@@ -30,16 +34,21 @@ import appeng.core.AELog;
|
||||
import appeng.recipes.RecipeHandler;
|
||||
|
||||
|
||||
/**
|
||||
* @author AlgorithmX2
|
||||
* @author thatsIch
|
||||
* @version rv3 - 10.08.2015
|
||||
* @since rv0
|
||||
*/
|
||||
public class RecipeHandlerRegistry implements IRecipeHandlerRegistry
|
||||
{
|
||||
|
||||
final HashMap<String, Class<? extends ICraftHandler>> handlers = new HashMap<String, Class<? extends ICraftHandler>>();
|
||||
final LinkedList<ISubItemResolver> resolvers = new LinkedList<ISubItemResolver>();
|
||||
private final Map<String, Class<? extends ICraftHandler>> handlers = new HashMap<String, Class<? extends ICraftHandler>>( 20 );
|
||||
private final Collection<ISubItemResolver> resolvers = new LinkedList<ISubItemResolver>();
|
||||
|
||||
@Override
|
||||
public void addNewCraftHandler( String name, Class<? extends ICraftHandler> handler )
|
||||
{
|
||||
this.handlers.put( name.toLowerCase(), handler );
|
||||
this.handlers.put( name.toLowerCase( Locale.ENGLISH ), handler );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -48,6 +57,7 @@ public class RecipeHandlerRegistry implements IRecipeHandlerRegistry
|
||||
this.resolvers.add( sir );
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public ICraftHandler getCraftHandlerFor( String name )
|
||||
{
|
||||
@@ -64,7 +74,9 @@ public class RecipeHandlerRegistry implements IRecipeHandlerRegistry
|
||||
{
|
||||
AELog.severe( "Error Caused when trying to construct " + clz.getName() );
|
||||
AELog.error( e );
|
||||
|
||||
this.handlers.put( name, null ); // clear it..
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -75,6 +87,7 @@ public class RecipeHandlerRegistry implements IRecipeHandlerRegistry
|
||||
return new RecipeHandler();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Object resolveItem( String nameSpace, String itemName )
|
||||
{
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.core.features.registries.entries;
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.core.features.registries.entries;
|
||||
|
||||
|
||||
@@ -94,7 +95,7 @@ public class InscriberRecipe implements IInscriberRecipe
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if( !(o instanceof IInscriberRecipe) )
|
||||
if( !( o instanceof IInscriberRecipe ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -113,7 +114,7 @@ public class InscriberRecipe implements IInscriberRecipe
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if( !this.maybeBot.equals( that.getBottomOptional()) )
|
||||
if( !this.maybeBot.equals( that.getBottomOptional() ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,9 @@ public enum ButtonToolTips
|
||||
BlockPlacement, BlockPlacementYes, BlockPlacementNo,
|
||||
|
||||
// Used in the tooltips of the items in the terminal, when moused over
|
||||
ItemsStored, ItemsRequestable;
|
||||
ItemsStored, ItemsRequestable,
|
||||
|
||||
SchedulingMode, SchedulingModeDefault, SchedulingModeRoundRobin, SchedulingModeRandom;
|
||||
|
||||
final String root;
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ public enum GuiText
|
||||
CraftingTerminal, FormationPlane, Inscriber, QuartzCuttingKnife,
|
||||
|
||||
// tunnel names
|
||||
METunnel, ItemTunnel, RedstoneTunnel, EUTunnel, FluidTunnel, OCTunnel, LightTunnel, RFTunnel,
|
||||
METunnel, ItemTunnel, RedstoneTunnel, EUTunnel, FluidTunnel, OCTunnel, LightTunnel, RFTunnel, PressureTunnel,
|
||||
|
||||
StoredSize, CopyMode, CopyModeDesc, PatternTerminal, CraftingPattern,
|
||||
|
||||
@@ -55,9 +55,13 @@ public enum GuiText
|
||||
|
||||
inWorldFluix, inWorldPurificationCertus, inWorldPurificationNether,
|
||||
|
||||
inWorldPurificationFluix, inWorldSingularity, ChargedQuartz, OfSecondOutput,
|
||||
inWorldPurificationFluix, inWorldSingularity, ChargedQuartz,
|
||||
|
||||
NoSecondOutput, Stores, Next, SelectAmount, Lumen, Empty,
|
||||
NoSecondOutput,
|
||||
OfSecondOutput,
|
||||
MultipleOutputs,
|
||||
|
||||
Stores, Next, SelectAmount, Lumen, Empty,
|
||||
|
||||
ConfirmCrafting, Stored, Crafting, Scheduled, CraftingStatus, Cancel, ETA, ETAFormat,
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ public enum PlayerMessages
|
||||
isNowLocked, isNowUnlocked,
|
||||
AmmoDepleted,
|
||||
CommunicationError, OutOfRange, DeviceNotPowered, DeviceNotWirelessTerminal, DeviceNotLinked, StationCanNotBeLocated,
|
||||
SettingCleared,;
|
||||
SettingCleared, ;
|
||||
|
||||
public IChatComponent get()
|
||||
{
|
||||
|
||||
@@ -47,7 +47,9 @@ public enum TickRates
|
||||
|
||||
LightTunnel( 5, 120 ),
|
||||
|
||||
OpenComputersTunnel( 1, 5 );
|
||||
OpenComputersTunnel( 1, 5 ),
|
||||
|
||||
PressureTunnel( 1, 120 );
|
||||
|
||||
public int min;
|
||||
public int max;
|
||||
|
||||
@@ -38,20 +38,24 @@ import appeng.core.features.AEFeature;
|
||||
public class PlayerStatsRegistration
|
||||
{
|
||||
/**
|
||||
* {@link cpw.mods.fml.common.eventhandler.EventBus} to which the handlers might get posted to depending if the feature is enabled
|
||||
* {@link cpw.mods.fml.common.eventhandler.EventBus} to which the handlers might get posted to depending if the
|
||||
* feature is enabled
|
||||
*/
|
||||
private final EventBus bus;
|
||||
|
||||
/**
|
||||
* is true if the {@link appeng.core.features.AEFeature#Achievements} is enabled in the {@param config}
|
||||
* is true if the {@link appeng.core.features.AEFeature#Achievements} is enabled in the
|
||||
*
|
||||
* @param config}
|
||||
*/
|
||||
private final boolean isAchievementFeatureEnabled;
|
||||
|
||||
/**
|
||||
* Constructs this with an {@link cpw.mods.fml.common.eventhandler.EventBus} and {@link appeng.core.AEConfig}.
|
||||
*
|
||||
* @param bus {@see #bus}
|
||||
* @param config {@link appeng.core.AEConfig} which is used to determine if the {@link appeng.core.features.AEFeature#Achievements} is enabled
|
||||
* @param bus {@see #bus}
|
||||
* @param config {@link appeng.core.AEConfig} which is used to determine if the
|
||||
* {@link appeng.core.features.AEFeature#Achievements} is enabled
|
||||
*/
|
||||
public PlayerStatsRegistration( EventBus bus, AEConfig config )
|
||||
{
|
||||
@@ -60,7 +64,9 @@ public class PlayerStatsRegistration
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the {@link appeng.core.stats.AchievementCraftingHandler} and {@link appeng.core.stats.AchievementPickupHandler} to the {@link #bus} if {@link #isAchievementFeatureEnabled} is true.
|
||||
* Registers the {@link appeng.core.stats.AchievementCraftingHandler} and
|
||||
* {@link appeng.core.stats.AchievementPickupHandler} to the {@link #bus} if {@link #isAchievementFeatureEnabled} is
|
||||
* true.
|
||||
*/
|
||||
public void registerAchievementHandlers()
|
||||
{
|
||||
@@ -76,7 +82,8 @@ public class PlayerStatsRegistration
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the {@link appeng.core.stats.AchievementHierarchy} and adds all {@link appeng.core.stats.Achievements} to a new {@link net.minecraftforge.common.AchievementPage}.
|
||||
* Registers the {@link appeng.core.stats.AchievementHierarchy} and adds all {@link appeng.core.stats.Achievements}
|
||||
* to a new {@link net.minecraftforge.common.AchievementPage}.
|
||||
*/
|
||||
public void registerAchievements()
|
||||
{
|
||||
|
||||
@@ -56,7 +56,6 @@ public class AppEngPacketHandlerBase
|
||||
{
|
||||
private static final Map<Class<? extends AppEngPacket>, PacketTypes> REVERSE_LOOKUP = new HashMap<Class<? extends AppEngPacket>, AppEngPacketHandlerBase.PacketTypes>();
|
||||
|
||||
|
||||
public enum PacketTypes
|
||||
{
|
||||
PACKET_COMPASS_REQUEST( PacketCompassRequest.class ),
|
||||
|
||||
@@ -101,7 +101,6 @@ import appeng.parts.automation.PartLevelEmitter;
|
||||
import appeng.parts.misc.PartStorageBus;
|
||||
import appeng.parts.reporting.PartCraftingTerminal;
|
||||
import appeng.parts.reporting.PartInterfaceTerminal;
|
||||
import appeng.parts.reporting.PartPanel;
|
||||
import appeng.parts.reporting.PartPatternTerminal;
|
||||
import appeng.tile.crafting.TileCraftingTile;
|
||||
import appeng.tile.crafting.TileMolecularAssembler;
|
||||
|
||||
@@ -67,7 +67,7 @@ public final class PacketConfigButton extends AppEngPacket
|
||||
public void serverPacketData( INetworkInfo manager, AppEngPacket packet, EntityPlayer player )
|
||||
{
|
||||
EntityPlayerMP sender = (EntityPlayerMP) player;
|
||||
if ( sender.openContainer instanceof AEBaseContainer )
|
||||
if( sender.openContainer instanceof AEBaseContainer )
|
||||
{
|
||||
final AEBaseContainer baseContainer = (AEBaseContainer) sender.openContainer;
|
||||
if( baseContainer.getTarget() instanceof IConfigurableObject )
|
||||
|
||||
@@ -219,7 +219,7 @@ public class PacketNEIRecipe extends AppEngPacket
|
||||
// If that doesn't work, grab from the player's inventory
|
||||
if( whichItem == null && playerInventory != null )
|
||||
{
|
||||
whichItem = extractItemFromPlayerInventory( player, realForFake, patternItem );
|
||||
whichItem = this.extractItemFromPlayerInventory( player, realForFake, patternItem );
|
||||
}
|
||||
|
||||
craftMatrix.setInventorySlotContents( x, whichItem );
|
||||
|
||||
@@ -20,6 +20,7 @@ package appeng.core.worlddata;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
package appeng.core.worlddata;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@@ -63,13 +63,11 @@ final class DimensionData implements IWorldDimensionData, IOnWorldStartable, IOn
|
||||
private final Configuration config;
|
||||
private final List<Integer> storageCellDimensionIDs;
|
||||
|
||||
DimensionData( @Nonnull final File parentFile, @Nonnull final String configVersion )
|
||||
DimensionData( @Nonnull final Configuration parentFile )
|
||||
{
|
||||
Preconditions.checkNotNull( parentFile );
|
||||
Preconditions.checkNotNull( configVersion );
|
||||
Preconditions.checkArgument( !configVersion.isEmpty() );
|
||||
|
||||
this.config = new Configuration( parentFile, configVersion );
|
||||
this.config = parentFile;
|
||||
|
||||
final int[] storageCellIDs = this.storageCellIDsProperty().getIntList();
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ package appeng.core.worlddata;
|
||||
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
@@ -47,7 +48,7 @@ public interface IWorldPlayerMapping
|
||||
/**
|
||||
* Put in new players when they join the server
|
||||
*
|
||||
* @param id id of new player
|
||||
* @param id id of new player
|
||||
* @param uuid UUID of new player
|
||||
*/
|
||||
void put( int id, @Nonnull UUID uuid );
|
||||
|
||||
@@ -65,10 +65,11 @@ public class MeteorDataNameEncoder
|
||||
|
||||
/**
|
||||
* @param dimension ID of the processed dimension. Can be any integer
|
||||
* @param chunkX X coordinate of the chunk. Can be any integer
|
||||
* @param chunkZ Z coordinate of the chunk. Can be any integer
|
||||
* @param chunkX X coordinate of the chunk. Can be any integer
|
||||
* @param chunkZ Z coordinate of the chunk. Can be any integer
|
||||
*
|
||||
* @return encoded file name suggestion in form of <tt>dim_x_y.dat</tt> where <tt>x</tt> and <tt>y</tt> will be shifted to stay conform with the vanilla chunk system
|
||||
* @return encoded file name suggestion in form of <tt>dim_x_y.dat</tt> where <tt>x</tt> and <tt>y</tt> will be
|
||||
* shifted to stay conform with the vanilla chunk system
|
||||
*
|
||||
* @since rv3 05.06.2015
|
||||
*/
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
package appeng.core.worlddata;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@@ -57,13 +57,11 @@ final class PlayerData implements IWorldPlayerData, IOnWorldStartable, IOnWorldS
|
||||
|
||||
private int lastPlayerID;
|
||||
|
||||
public PlayerData( @Nonnull final File configFile, @Nonnull final String configVersion )
|
||||
public PlayerData( @Nonnull final Configuration configFile )
|
||||
{
|
||||
Preconditions.checkNotNull( configFile );
|
||||
Preconditions.checkNotNull( configVersion );
|
||||
Preconditions.checkArgument( !configVersion.isEmpty() );
|
||||
|
||||
this.config = new Configuration( configFile, configVersion );
|
||||
this.config = configFile;
|
||||
|
||||
final ConfigCategory playerList = this.config.getCategory( "players" );
|
||||
this.playerMapping = new PlayerMapping( playerList, AELog.INSTANCE );
|
||||
|
||||
@@ -21,6 +21,7 @@ package appeng.core.worlddata;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
@@ -51,7 +51,7 @@ class PlayerMappingsInitializer
|
||||
* where the UUIDs were introduced.
|
||||
*
|
||||
* @param playerList the category for the player list, generally extracted using the "players" tag
|
||||
* @param log the logger used to warn the server or user of faulty entries
|
||||
* @param log the logger used to warn the server or user of faulty entries
|
||||
*/
|
||||
PlayerMappingsInitializer( ConfigCategory playerList, FMLRelaunchLog log )
|
||||
{
|
||||
|
||||
@@ -25,6 +25,7 @@ import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedList;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
@@ -56,7 +57,8 @@ final class SpawnData implements IWorldSpawnData
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setGenerated( int dim, int chunkX, int chunkZ ) {
|
||||
public void setGenerated( int dim, int chunkX, int chunkZ )
|
||||
{
|
||||
synchronized( SpawnData.class )
|
||||
{
|
||||
NBTTagCompound data = this.loadSpawnData( dim, chunkX, chunkZ );
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
package appeng.core.worlddata;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.Map;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@@ -54,13 +54,11 @@ final class StorageData implements IWorldGridStorageData, IOnWorldStartable, IOn
|
||||
|
||||
private long lastGridStorage;
|
||||
|
||||
public StorageData( @Nonnull final File settingsFile, @Nonnull final String version )
|
||||
public StorageData( @Nonnull final Configuration settingsFile )
|
||||
{
|
||||
Preconditions.checkNotNull( settingsFile );
|
||||
Preconditions.checkNotNull( version );
|
||||
Preconditions.checkArgument( !version.isEmpty() );
|
||||
|
||||
this.config = new Configuration( settingsFile, version );
|
||||
this.config = settingsFile;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,6 +22,7 @@ package appeng.core.worlddata;
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@@ -29,6 +30,7 @@ import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.services.CompassService;
|
||||
@@ -38,7 +40,8 @@ import appeng.services.compass.CompassThreadFactory;
|
||||
/**
|
||||
* Singleton access to anything related to world-based data.
|
||||
*
|
||||
* Data will change depending which world is loaded. Will probably not affect SMP at all since only one world is loaded, but SSP more, cause they play on
|
||||
* Data will change depending which world is loaded. Will probably not affect SMP at all since only one world is loaded,
|
||||
* but SSP more, cause they play on
|
||||
* different worlds.
|
||||
*
|
||||
* @author thatsIch
|
||||
@@ -68,6 +71,8 @@ public final class WorldData implements IWorldData
|
||||
private final File spawnDirectory;
|
||||
private final File compassDirectory;
|
||||
|
||||
private final Configuration sharedConfig;
|
||||
|
||||
private WorldData( @Nonnull final File worldDirectory )
|
||||
{
|
||||
Preconditions.checkNotNull( worldDirectory );
|
||||
@@ -78,10 +83,11 @@ public final class WorldData implements IWorldData
|
||||
this.compassDirectory = new File( this.ae2directory, COMPASS_DIR_NAME );
|
||||
|
||||
final File settingsFile = new File( this.ae2directory, SETTING_FILE_NAME );
|
||||
this.sharedConfig = new Configuration( settingsFile, AEConfig.VERSION );
|
||||
|
||||
final PlayerData playerData = new PlayerData( settingsFile, AEConfig.VERSION );
|
||||
final DimensionData dimensionData = new DimensionData( settingsFile, AEConfig.VERSION );
|
||||
final StorageData storageData = new StorageData( settingsFile, AEConfig.VERSION );
|
||||
final PlayerData playerData = new PlayerData( this.sharedConfig );
|
||||
final DimensionData dimensionData = new DimensionData( this.sharedConfig );
|
||||
final StorageData storageData = new StorageData( this.sharedConfig );
|
||||
|
||||
final ThreadFactory compassThreadFactory = new CompassThreadFactory();
|
||||
final CompassService compassService = new CompassService( this.compassDirectory, compassThreadFactory );
|
||||
|
||||
@@ -20,6 +20,7 @@ package appeng.facade;
|
||||
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -535,23 +536,18 @@ public class FacadePart implements IFacadePart, IBoxProvider
|
||||
* if ( out.contains( ForgeDirection.EAST ) && (side.offsetZ != 0) ) { IFacadePart fp = fc.getFacade(
|
||||
* ForgeDirection.EAST ); if ( fp != null && (fp.isTransparent() == facade.isTransparent()) ) out.remove(
|
||||
* ForgeDirection.EAST ); }
|
||||
*
|
||||
* if ( out.contains( ForgeDirection.WEST ) && (side.offsetZ != 0) ) { IFacadePart fp = fc.getFacade(
|
||||
* ForgeDirection.WEST ); if ( fp != null && (fp.isTransparent() == facade.isTransparent()) ) out.remove(
|
||||
* ForgeDirection.WEST ); }
|
||||
*
|
||||
* if ( out.contains( ForgeDirection.NORTH ) && (side.offsetY != 0) ) { IFacadePart fp = fc.getFacade(
|
||||
* ForgeDirection.NORTH ); if ( fp != null && (fp.isTransparent() == facade.isTransparent()) ) out.remove(
|
||||
* ForgeDirection.NORTH ); }
|
||||
*
|
||||
* if ( out.contains( ForgeDirection.SOUTH ) && (side.offsetY != 0) ) { IFacadePart fp = fc.getFacade(
|
||||
* ForgeDirection.SOUTH ); if ( fp != null && (fp.isTransparent() == facade.isTransparent()) ) out.remove(
|
||||
* ForgeDirection.SOUTH ); }
|
||||
*
|
||||
* if ( out.contains( ForgeDirection.EAST ) && (side.offsetY != 0) ) { IFacadePart fp = fc.getFacade(
|
||||
* ForgeDirection.EAST ); if ( fp != null && (fp.isTransparent() == facade.isTransparent()) ) out.remove(
|
||||
* ForgeDirection.EAST ); }
|
||||
*
|
||||
* if ( out.contains( ForgeDirection.WEST ) && (side.offsetY != 0) ) { IFacadePart fp = fc.getFacade(
|
||||
* ForgeDirection.WEST ); if ( fp != null && (fp.isTransparent() == facade.isTransparent()) ) out.remove(
|
||||
* ForgeDirection.WEST ); }
|
||||
|
||||
@@ -453,7 +453,7 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IMask
|
||||
double r = Math.abs( a - 0.5 );
|
||||
r = Math.max( Math.abs( b - 0.5 ), r );
|
||||
r = Math.max( Math.abs( c - 0.5 ), r );
|
||||
return ( 8 * (int) Math.max( Math.abs( d - 0.5 ), r ) );
|
||||
return( 8 * (int) Math.max( Math.abs( d - 0.5 ), r ) );
|
||||
}
|
||||
|
||||
// @Override
|
||||
|
||||
@@ -100,18 +100,22 @@ import appeng.util.item.AEItemStack;
|
||||
public class DualityInterface implements IGridTickable, IStorageMonitorable, IInventoryDestination, IAEAppEngInventory, IConfigManagerHost, ICraftingProvider, IUpgradeableHost, IPriorityHost
|
||||
{
|
||||
|
||||
public static final int NUMBER_OF_STORAGE_SLOTS = 9;
|
||||
public static final int NUMBER_OF_CONFIG_SLOTS = 9;
|
||||
public static final int NUMBER_OF_PATTERN_SLOTS = 9;
|
||||
|
||||
private static final Collection<Block> BAD_BLOCKS = new HashSet<Block>( 100 );
|
||||
final int[] sides = new int[] { 0, 1, 2, 3, 4, 5, 6, 7 };
|
||||
final IAEItemStack[] requireWork = new IAEItemStack[] { null, null, null, null, null, null, null, null };
|
||||
final int[] sides = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 };
|
||||
final IAEItemStack[] requireWork = new IAEItemStack[] { null, null, null, null, null, null, null, null, null };
|
||||
final MultiCraftingTracker craftingTracker;
|
||||
final AENetworkProxy gridProxy;
|
||||
final IInterfaceHost iHost;
|
||||
final BaseActionSource mySource;
|
||||
final BaseActionSource interfaceRequestSource;
|
||||
final ConfigManager cm = new ConfigManager( this );
|
||||
final AppEngInternalAEInventory config = new AppEngInternalAEInventory( this, 8 );
|
||||
final AppEngInternalInventory storage = new AppEngInternalInventory( this, 8 );
|
||||
final AppEngInternalInventory patterns = new AppEngInternalInventory( this, 9 );
|
||||
final AppEngInternalAEInventory config = new AppEngInternalAEInventory( this, NUMBER_OF_CONFIG_SLOTS );
|
||||
final AppEngInternalInventory storage = new AppEngInternalInventory( this, NUMBER_OF_STORAGE_SLOTS );
|
||||
final AppEngInternalInventory patterns = new AppEngInternalInventory( this, NUMBER_OF_PATTERN_SLOTS );
|
||||
final WrapperInvSlot slotInv = new WrapperInvSlot( this.storage );
|
||||
final MEMonitorPassThrough<IAEItemStack> items = new MEMonitorPassThrough<IAEItemStack>( new NullInventory<IAEItemStack>(), StorageChannel.ITEMS );
|
||||
final MEMonitorPassThrough<IAEFluidStack> fluids = new MEMonitorPassThrough<IAEFluidStack>( new NullInventory<IAEFluidStack>(), StorageChannel.FLUIDS );
|
||||
@@ -279,7 +283,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
|
||||
boolean had = this.hasWorkToDo();
|
||||
|
||||
for( int x = 0; x < 8; x++ )
|
||||
for( int x = 0; x < NUMBER_OF_CONFIG_SLOTS; x++ )
|
||||
{
|
||||
this.updatePlan( x );
|
||||
}
|
||||
@@ -616,7 +620,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
{
|
||||
boolean didSomething = false;
|
||||
|
||||
for( int x = 0; x < 8; x++ )
|
||||
for( int x = 0; x < NUMBER_OF_STORAGE_SLOTS; x++ )
|
||||
{
|
||||
if( this.requireWork[x] != null )
|
||||
{
|
||||
|
||||
@@ -373,7 +373,6 @@ public class PatternHelper implements ICraftingPatternDetails, Comparable<Patter
|
||||
ACCEPT, DECLINE, TEST
|
||||
}
|
||||
|
||||
|
||||
static class TestLookup
|
||||
{
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.helpers;
|
||||
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Queue;
|
||||
import java.util.WeakHashMap;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import com.google.common.base.Stopwatch;
|
||||
@@ -55,6 +54,7 @@ import appeng.entity.EntityFloatingItem;
|
||||
import appeng.me.Grid;
|
||||
import appeng.me.NetworkList;
|
||||
import appeng.tile.AEBaseTile;
|
||||
import appeng.util.IWorldCallable;
|
||||
import appeng.util.Platform;
|
||||
|
||||
|
||||
@@ -62,9 +62,9 @@ public class TickHandler
|
||||
{
|
||||
|
||||
public static final TickHandler INSTANCE = new TickHandler();
|
||||
final Queue<Callable> serverQueue = new LinkedList<Callable>();
|
||||
final Queue<IWorldCallable<?>> serverQueue = new LinkedList<IWorldCallable<?>>();
|
||||
final Multimap<World, CraftingJob> craftingJobs = LinkedListMultimap.create();
|
||||
private final WeakHashMap<World, Queue<Callable>> callQueue = new WeakHashMap<World, Queue<Callable>>();
|
||||
private final WeakHashMap<World, Queue<IWorldCallable<?>>> callQueue = new WeakHashMap<World, Queue<IWorldCallable<?>>>();
|
||||
private final HandlerRep server = new HandlerRep();
|
||||
private final HandlerRep client = new HandlerRep();
|
||||
private final HashMap<Integer, PlayerColor> cliPlayerColors = new HashMap<Integer, PlayerColor>();
|
||||
@@ -80,7 +80,7 @@ public class TickHandler
|
||||
return this.cliPlayerColors;
|
||||
}
|
||||
|
||||
public void addCallable( World w, Callable c )
|
||||
public void addCallable( World w, IWorldCallable<?> c )
|
||||
{
|
||||
if( w == null )
|
||||
{
|
||||
@@ -88,11 +88,12 @@ public class TickHandler
|
||||
}
|
||||
else
|
||||
{
|
||||
Queue<Callable> queue = this.callQueue.get( w );
|
||||
Queue<IWorldCallable<?>> queue = this.callQueue.get( w );
|
||||
|
||||
if( queue == null )
|
||||
{
|
||||
this.callQueue.put( w, queue = new LinkedList<Callable>() );
|
||||
queue = new LinkedList<IWorldCallable<?>>();
|
||||
this.callQueue.put( w, queue );
|
||||
}
|
||||
|
||||
queue.add( c );
|
||||
@@ -239,13 +240,15 @@ public class TickHandler
|
||||
}
|
||||
|
||||
// cross world queue.
|
||||
this.processQueue( this.serverQueue );
|
||||
this.processQueue( this.serverQueue, null );
|
||||
}
|
||||
|
||||
// world synced queue(s)
|
||||
if( ev.type == Type.WORLD && ev.phase == Phase.START )
|
||||
{
|
||||
this.processQueue( this.callQueue.get( ( (WorldTickEvent) ev ).world ) );
|
||||
final World world = ( (WorldTickEvent) ev ).world;
|
||||
final Queue<IWorldCallable<?>> queue = this.callQueue.get( world );
|
||||
this.processQueue( queue, world );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,7 +266,7 @@ public class TickHandler
|
||||
}
|
||||
}
|
||||
|
||||
private void processQueue( Queue<Callable> queue )
|
||||
private void processQueue( Queue<IWorldCallable<?>> queue, World world )
|
||||
{
|
||||
if( queue == null )
|
||||
{
|
||||
@@ -272,12 +275,12 @@ public class TickHandler
|
||||
|
||||
Stopwatch sw = Stopwatch.createStarted();
|
||||
|
||||
Callable c = null;
|
||||
IWorldCallable<?> c = null;
|
||||
while( ( c = queue.poll() ) != null )
|
||||
{
|
||||
try
|
||||
{
|
||||
c.call();
|
||||
c.call( world );
|
||||
|
||||
if( sw.elapsed( TimeUnit.MILLISECONDS ) > 50 )
|
||||
{
|
||||
@@ -317,7 +320,6 @@ public class TickHandler
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static class PlayerColor
|
||||
{
|
||||
|
||||
|
||||
@@ -21,12 +21,6 @@ package appeng.integration;
|
||||
|
||||
public abstract class BaseModule implements IIntegrationModule
|
||||
{
|
||||
|
||||
protected void testClassExistence( Class<?> clz )
|
||||
{
|
||||
clz.isInstance( this );
|
||||
}
|
||||
|
||||
@Override
|
||||
public abstract void init() throws Throwable;
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This file is part of Applied Energistics 2.
|
||||
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
||||
*
|
||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||
*/
|
||||
|
||||
package appeng.integration;
|
||||
|
||||
|
||||
public class IntegrationHelper
|
||||
{
|
||||
|
||||
public static void testClassExistence( Object o, Class<?> clz )
|
||||
{
|
||||
clz.isInstance( o );
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,7 @@ public final class IntegrationNode
|
||||
IntegrationStage failedStage = IntegrationStage.PRE_INIT;
|
||||
Throwable exception = null;
|
||||
String name = null;
|
||||
Class classValue = null;
|
||||
Class<?> classValue = null;
|
||||
Object instance;
|
||||
IIntegrationModule mod = null;
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ package appeng.integration;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedList;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import cpw.mods.fml.relauncher.FMLLaunchHandler;
|
||||
@@ -31,6 +32,8 @@ public enum IntegrationRegistry
|
||||
{
|
||||
INSTANCE;
|
||||
|
||||
private static final String PACKAGE_PREFIX = "appeng.integration.modules.";
|
||||
|
||||
private final Collection<IntegrationNode> modules = new LinkedList<IntegrationNode>();
|
||||
|
||||
public void add( IntegrationType type )
|
||||
@@ -45,7 +48,7 @@ public enum IntegrationRegistry
|
||||
return;
|
||||
}
|
||||
|
||||
this.modules.add( new IntegrationNode( type.dspName, type.modID, type, "appeng.integration.modules." + type.name() ) );
|
||||
this.modules.add( new IntegrationNode( type.dspName, type.modID, type, PACKAGE_PREFIX + type.name() ) );
|
||||
}
|
||||
|
||||
public void init()
|
||||
|
||||
@@ -29,9 +29,9 @@ public enum IntegrationType
|
||||
|
||||
BuildCraftCore( IntegrationSide.BOTH, "BuildCraft Core", "BuildCraft|Core" ),
|
||||
|
||||
BuildCraftTransport( IntegrationSide.BOTH, "BuildCraft Transport", "BuildCraft|Transport"),
|
||||
BuildCraftTransport( IntegrationSide.BOTH, "BuildCraft Transport", "BuildCraft|Transport" ),
|
||||
|
||||
BuildCraftBuilder( IntegrationSide.BOTH, "BuildCraft Builders", "BuildCraft|Builders"),
|
||||
BuildCraftBuilder( IntegrationSide.BOTH, "BuildCraft Builders", "BuildCraft|Builders" ),
|
||||
|
||||
RF( IntegrationSide.BOTH, "RedstoneFlux Power - Tiles", "CoFHAPI" ),
|
||||
|
||||
@@ -63,7 +63,9 @@ public enum IntegrationType
|
||||
|
||||
BetterStorage( IntegrationSide.BOTH, "BetterStorage", "betterstorage" ),
|
||||
|
||||
OpenComputers( IntegrationSide.BOTH, "OpenComputers", "OpenComputers" );
|
||||
OpenComputers( IntegrationSide.BOTH, "OpenComputers", "OpenComputers" ),
|
||||
|
||||
PneumaticCraft( IntegrationSide.BOTH, "PneumaticCraft", "PneumaticCraft" );
|
||||
|
||||
public final IntegrationSide side;
|
||||
public final String dspName;
|
||||
|
||||
@@ -90,7 +90,7 @@ public interface IBuildCraftTransport
|
||||
IIcon getCobbleStructurePipeTexture();
|
||||
|
||||
/**
|
||||
* @param te the to be checked {@link TileEntity}
|
||||
* @param te the to be checked {@link TileEntity}
|
||||
* @param dir direction of the {@link TileEntity}
|
||||
*
|
||||
* @return {@code true} if {@code te} is a buildcraft pipe, but not plugged
|
||||
|
||||
@@ -37,7 +37,7 @@ public class BCPipeHandler implements IExternalStorageHandler
|
||||
@Override
|
||||
public boolean canHandle( TileEntity te, ForgeDirection d, StorageChannel chan, BaseActionSource mySrc )
|
||||
{
|
||||
if ( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.BuildCraftTransport ) )
|
||||
if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.BuildCraftTransport ) )
|
||||
{
|
||||
final IBuildCraftTransport bc = (IBuildCraftTransport) IntegrationRegistry.INSTANCE.getInstance( IntegrationType.BuildCraftTransport );
|
||||
|
||||
|
||||
@@ -23,8 +23,10 @@ import net.mcft.copy.betterstorage.api.crate.ICrateStorage;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.helpers.Reflected;
|
||||
import appeng.integration.BaseModule;
|
||||
import appeng.integration.IIntegrationModule;
|
||||
import appeng.integration.IntegrationHelper;
|
||||
import appeng.integration.abstraction.IBetterStorage;
|
||||
import appeng.integration.modules.helpers.BSCrateHandler;
|
||||
import appeng.integration.modules.helpers.BSCrateStorageAdaptor;
|
||||
@@ -33,12 +35,13 @@ import appeng.util.InventoryAdaptor;
|
||||
|
||||
public class BetterStorage extends BaseModule implements IIntegrationModule, IBetterStorage
|
||||
{
|
||||
|
||||
@Reflected
|
||||
public static BetterStorage instance;
|
||||
|
||||
@Reflected
|
||||
public BetterStorage()
|
||||
{
|
||||
this.testClassExistence( net.mcft.copy.betterstorage.api.crate.ICrateStorage.class );
|
||||
IntegrationHelper.testClassExistence( this, net.mcft.copy.betterstorage.api.crate.ICrateStorage.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -60,7 +63,6 @@ public class BetterStorage extends BaseModule implements IIntegrationModule, IBe
|
||||
@Override
|
||||
public void init()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -28,10 +28,7 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import buildcraft.api.blueprints.BuilderAPI;
|
||||
import buildcraft.api.blueprints.IBuilderContext;
|
||||
import buildcraft.api.blueprints.ISchematicRegistry;
|
||||
import buildcraft.api.blueprints.SchematicBlock;
|
||||
import buildcraft.api.blueprints.SchematicTile;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.definitions.IBlockDefinition;
|
||||
@@ -41,6 +38,7 @@ import appeng.api.util.IOrientableBlock;
|
||||
import appeng.core.AELog;
|
||||
import appeng.helpers.Reflected;
|
||||
import appeng.integration.BaseModule;
|
||||
import appeng.integration.IntegrationHelper;
|
||||
import appeng.integration.modules.BCHelpers.AECableSchematicTile;
|
||||
import appeng.integration.modules.BCHelpers.AEGenericSchematicTile;
|
||||
import appeng.integration.modules.BCHelpers.AERotatableBlockSchematic;
|
||||
@@ -62,11 +60,11 @@ public class BuildCraftBuilder extends BaseModule
|
||||
@Reflected
|
||||
public BuildCraftBuilder()
|
||||
{
|
||||
this.testClassExistence( BuilderAPI.class );
|
||||
this.testClassExistence( IBuilderContext.class );
|
||||
this.testClassExistence( ISchematicRegistry.class );
|
||||
this.testClassExistence( SchematicTile.class );
|
||||
this.testClassExistence( SchematicBlock.class );
|
||||
IntegrationHelper.testClassExistence( this, buildcraft.api.blueprints.BuilderAPI.class );
|
||||
IntegrationHelper.testClassExistence( this, buildcraft.api.blueprints.IBuilderContext.class );
|
||||
IntegrationHelper.testClassExistence( this, buildcraft.api.blueprints.ISchematicRegistry.class );
|
||||
IntegrationHelper.testClassExistence( this, buildcraft.api.blueprints.SchematicTile.class );
|
||||
IntegrationHelper.testClassExistence( this, buildcraft.api.blueprints.SchematicBlock.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -85,7 +83,6 @@ public class BuildCraftBuilder extends BaseModule
|
||||
@Override
|
||||
public void postInit()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void initBuilderSupport()
|
||||
|
||||
@@ -25,7 +25,6 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import buildcraft.BuildCraftTransport;
|
||||
import buildcraft.api.tools.IToolWrench;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
@@ -33,6 +32,7 @@ import appeng.api.config.TunnelType;
|
||||
import appeng.api.features.IP2PTunnelRegistry;
|
||||
import appeng.helpers.Reflected;
|
||||
import appeng.integration.BaseModule;
|
||||
import appeng.integration.IntegrationHelper;
|
||||
import appeng.integration.abstraction.IBuildCraftCore;
|
||||
|
||||
|
||||
@@ -45,9 +45,9 @@ public final class BuildCraftCore extends BaseModule implements IBuildCraftCore
|
||||
@Reflected
|
||||
public BuildCraftCore()
|
||||
{
|
||||
this.testClassExistence( buildcraft.BuildCraftCore.class );
|
||||
this.testClassExistence( BuildCraftTransport.class );
|
||||
this.testClassExistence( IToolWrench.class );
|
||||
IntegrationHelper.testClassExistence( this, buildcraft.BuildCraftCore.class );
|
||||
IntegrationHelper.testClassExistence( this, buildcraft.BuildCraftTransport.class );
|
||||
IntegrationHelper.testClassExistence( this, buildcraft.api.tools.IToolWrench.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -71,7 +71,6 @@ public final class BuildCraftCore extends BaseModule implements IBuildCraftCore
|
||||
@Override
|
||||
public void init()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -33,7 +33,6 @@ import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
|
||||
import buildcraft.api.facades.IFacadeItem;
|
||||
import buildcraft.api.transport.IInjectable;
|
||||
import buildcraft.api.transport.IPipeConnection;
|
||||
import buildcraft.api.transport.IPipeTile;
|
||||
import buildcraft.transport.ItemFacade;
|
||||
import buildcraft.transport.PipeIconProvider;
|
||||
@@ -48,6 +47,7 @@ import appeng.api.parts.IFacadePart;
|
||||
import appeng.facade.FacadePart;
|
||||
import appeng.helpers.Reflected;
|
||||
import appeng.integration.BaseModule;
|
||||
import appeng.integration.IntegrationHelper;
|
||||
import appeng.integration.abstraction.IBuildCraftTransport;
|
||||
import appeng.integration.modules.BCHelpers.BCPipeHandler;
|
||||
|
||||
@@ -66,14 +66,14 @@ public class BuildCraftTransport extends BaseModule implements IBuildCraftTransp
|
||||
@Reflected
|
||||
public BuildCraftTransport()
|
||||
{
|
||||
this.testClassExistence( buildcraft.BuildCraftTransport.class );
|
||||
this.testClassExistence( IFacadeItem.class );
|
||||
this.testClassExistence( IInjectable.class );
|
||||
this.testClassExistence( IPipeConnection.class );
|
||||
this.testClassExistence( IPipeTile.class );
|
||||
this.testClassExistence( ItemFacade.class );
|
||||
this.testClassExistence( PipeIconProvider.class );
|
||||
this.testClassExistence( IPipeTile.PipeType.class );
|
||||
IntegrationHelper.testClassExistence( this, buildcraft.BuildCraftTransport.class );
|
||||
IntegrationHelper.testClassExistence( this, buildcraft.api.facades.IFacadeItem.class );
|
||||
IntegrationHelper.testClassExistence( this, buildcraft.api.transport.IInjectable.class );
|
||||
IntegrationHelper.testClassExistence( this, buildcraft.api.transport.IPipeConnection.class );
|
||||
IntegrationHelper.testClassExistence( this, buildcraft.api.transport.IPipeTile.class );
|
||||
IntegrationHelper.testClassExistence( this, buildcraft.api.transport.IPipeTile.PipeType.class );
|
||||
IntegrationHelper.testClassExistence( this, buildcraft.transport.ItemFacade.class );
|
||||
IntegrationHelper.testClassExistence( this, buildcraft.transport.PipeIconProvider.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -20,19 +20,26 @@ package appeng.integration.modules;
|
||||
|
||||
|
||||
import appeng.api.util.AEColor;
|
||||
import appeng.helpers.Reflected;
|
||||
import appeng.integration.BaseModule;
|
||||
import appeng.integration.IntegrationHelper;
|
||||
import appeng.integration.abstraction.ICLApi;
|
||||
|
||||
|
||||
public class CLApi extends BaseModule implements ICLApi
|
||||
{
|
||||
|
||||
@Reflected
|
||||
public static CLApi instance;
|
||||
|
||||
@Reflected
|
||||
public CLApi()
|
||||
{
|
||||
IntegrationHelper.testClassExistence( this, coloredlightscore.src.api.CLApi.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() throws Throwable
|
||||
{
|
||||
this.testClassExistence( coloredlightscore.src.api.CLApi.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -21,6 +21,7 @@ package appeng.integration.modules;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
@@ -55,6 +56,7 @@ import appeng.api.features.IInscriberRecipe;
|
||||
import appeng.api.recipes.IIngredient;
|
||||
import appeng.helpers.Reflected;
|
||||
import appeng.integration.IIntegrationModule;
|
||||
import appeng.integration.IntegrationHelper;
|
||||
import appeng.recipes.game.ShapedRecipe;
|
||||
import appeng.recipes.game.ShapelessRecipe;
|
||||
|
||||
@@ -135,6 +137,33 @@ public final class CraftGuide extends CraftGuideAPIObject implements IIntegratio
|
||||
@Reflected
|
||||
public static CraftGuide instance;
|
||||
|
||||
public CraftGuide()
|
||||
{
|
||||
IntegrationHelper.testClassExistence( this, uristqwerty.CraftGuide.CraftGuideLog.class );
|
||||
IntegrationHelper.testClassExistence( this, uristqwerty.CraftGuide.DefaultRecipeTemplate.class );
|
||||
IntegrationHelper.testClassExistence( this, uristqwerty.CraftGuide.RecipeGeneratorImplementation.class );
|
||||
IntegrationHelper.testClassExistence( this, uristqwerty.CraftGuide.api.ChanceSlot.class );
|
||||
IntegrationHelper.testClassExistence( this, uristqwerty.CraftGuide.api.CraftGuideAPIObject.class );
|
||||
IntegrationHelper.testClassExistence( this, uristqwerty.CraftGuide.api.ItemSlot.class );
|
||||
IntegrationHelper.testClassExistence( this, uristqwerty.CraftGuide.api.RecipeGenerator.class );
|
||||
IntegrationHelper.testClassExistence( this, uristqwerty.CraftGuide.api.RecipeProvider.class );
|
||||
IntegrationHelper.testClassExistence( this, uristqwerty.CraftGuide.api.RecipeTemplate.class );
|
||||
IntegrationHelper.testClassExistence( this, uristqwerty.CraftGuide.api.Slot.class );
|
||||
IntegrationHelper.testClassExistence( this, uristqwerty.CraftGuide.api.SlotType.class );
|
||||
IntegrationHelper.testClassExistence( this, uristqwerty.gui_craftguide.texture.DynamicTexture.class );
|
||||
IntegrationHelper.testClassExistence( this, uristqwerty.gui_craftguide.texture.TextureClip.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() throws Throwable
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generateRecipes( RecipeGenerator generator )
|
||||
{
|
||||
@@ -427,15 +456,4 @@ public final class CraftGuide extends CraftGuideAPIObject implements IIntegratio
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() throws Throwable
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,9 @@ import powercrystals.minefactoryreloaded.api.IDeepStorageUnit;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.storage.IMEInventory;
|
||||
import appeng.helpers.Reflected;
|
||||
import appeng.integration.BaseModule;
|
||||
import appeng.integration.IntegrationHelper;
|
||||
import appeng.integration.abstraction.IDSU;
|
||||
import appeng.integration.modules.helpers.MFRDSUHandler;
|
||||
import appeng.integration.modules.helpers.MinefactoryReloadedDeepStorageUnit;
|
||||
@@ -33,8 +35,15 @@ import appeng.integration.modules.helpers.MinefactoryReloadedDeepStorageUnit;
|
||||
|
||||
public class DSU extends BaseModule implements IDSU
|
||||
{
|
||||
@Reflected
|
||||
public static DSU instance;
|
||||
|
||||
@Reflected
|
||||
public DSU()
|
||||
{
|
||||
IntegrationHelper.testClassExistence( this, powercrystals.minefactoryreloaded.api.IDeepStorageUnit.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMEInventory getDSU( TileEntity te )
|
||||
{
|
||||
@@ -50,7 +59,6 @@ public class DSU extends BaseModule implements IDSU
|
||||
@Override
|
||||
public void init()
|
||||
{
|
||||
this.testClassExistence( IDeepStorageUnit.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -50,6 +50,7 @@ import appeng.fmp.CableBusPart;
|
||||
import appeng.fmp.FMPEvent;
|
||||
import appeng.fmp.FMPPlacementHelper;
|
||||
import appeng.fmp.PartRegistry;
|
||||
import appeng.helpers.Reflected;
|
||||
import appeng.integration.IIntegrationModule;
|
||||
import appeng.integration.abstraction.IFMP;
|
||||
import appeng.integration.modules.helpers.FMPPacketEvent;
|
||||
@@ -58,7 +59,7 @@ import appeng.parts.CableBusContainer;
|
||||
|
||||
public class FMP implements IIntegrationModule, IPartFactory, IPartConverter, IFMP
|
||||
{
|
||||
|
||||
@Reflected
|
||||
public static FMP instance;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -28,6 +28,8 @@ import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.storage.IMEInventory;
|
||||
import appeng.helpers.Reflected;
|
||||
import appeng.integration.BaseModule;
|
||||
import appeng.integration.IIntegrationModule;
|
||||
import appeng.integration.abstraction.IFZ;
|
||||
import appeng.integration.modules.helpers.FactorizationBarrel;
|
||||
@@ -38,9 +40,9 @@ import appeng.util.Platform;
|
||||
/**
|
||||
* 100% Hacks.
|
||||
*/
|
||||
public class FZ implements IFZ, IIntegrationModule
|
||||
public class FZ extends BaseModule implements IFZ, IIntegrationModule
|
||||
{
|
||||
|
||||
@Reflected
|
||||
public static FZ instance;
|
||||
|
||||
private static Class<?> day_BarrelClass;
|
||||
|
||||
@@ -27,25 +27,41 @@ import ic2.api.energy.tile.IEnergyTile;
|
||||
import ic2.api.recipe.RecipeInputItemStack;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.IAppEngApi;
|
||||
import appeng.api.config.TunnelType;
|
||||
import appeng.api.features.IP2PTunnelRegistry;
|
||||
import appeng.api.parts.IPartHelper;
|
||||
import appeng.helpers.Reflected;
|
||||
import appeng.integration.BaseModule;
|
||||
import appeng.integration.IntegrationHelper;
|
||||
import appeng.integration.IntegrationRegistry;
|
||||
import appeng.integration.IntegrationType;
|
||||
import appeng.integration.abstraction.IIC2;
|
||||
|
||||
|
||||
public class IC2 extends BaseModule implements IIC2
|
||||
{
|
||||
|
||||
@Reflected
|
||||
public static IC2 instance;
|
||||
|
||||
@Reflected
|
||||
public IC2()
|
||||
{
|
||||
this.testClassExistence( IEnergyTile.class );
|
||||
IntegrationHelper.testClassExistence( this, ic2.api.energy.tile.IEnergyTile.class );
|
||||
IntegrationHelper.testClassExistence( this, ic2.api.recipe.RecipeInputItemStack.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init()
|
||||
{
|
||||
final IAppEngApi api = AEApi.instance();
|
||||
final IPartHelper partHelper = api.partHelper();
|
||||
|
||||
if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.IC2 ) )
|
||||
{
|
||||
partHelper.registerNewLayer( "appeng.parts.layers.LayerIEnergySink", "ic2.api.energy.tile.IEnergySink" );
|
||||
partHelper.registerNewLayer( "appeng.parts.layers.LayerIEnergySource", "ic2.api.energy.tile.IEnergySource" );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user