Added Feature: #1048 - [API] Support of own implementation of CGA's

This commit is contained in:
AlgorithmX2 2014-09-09 19:44:30 -05:00
parent 0b8269d559
commit 78802420f7
2 changed files with 5 additions and 4 deletions

View file

@ -9,11 +9,11 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import appeng.api.implementations.items.IGrowableCrystal;
import appeng.api.implementations.tiles.ICrystalGrowthAccelerator;
import appeng.client.EffectType;
import appeng.core.AEConfig;
import appeng.core.CommonHelper;
import appeng.core.features.AEFeature;
import appeng.tile.misc.TileQuartzGrowthAccelerator;
import appeng.util.Platform;
final public class EntityGrowingCrystal extends EntityItem
@ -145,8 +145,8 @@ final public class EntityGrowingCrystal extends EntityItem
private boolean isAccel(int x, int y, int z)
{
TileEntity te = worldObj.getTileEntity( x, y, z );
if ( te instanceof TileQuartzGrowthAccelerator )
return ((TileQuartzGrowthAccelerator) te).isPowered();
if ( te instanceof ICrystalGrowthAccelerator )
return ((ICrystalGrowthAccelerator) te).isPowered();
return false;
}

View file

@ -7,6 +7,7 @@ import java.util.EnumSet;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.implementations.IPowerChannelState;
import appeng.api.implementations.tiles.ICrystalGrowthAccelerator;
import appeng.api.networking.events.MENetworkEventSubscribe;
import appeng.api.networking.events.MENetworkPowerStatusChange;
import appeng.api.util.AECableType;
@ -16,7 +17,7 @@ import appeng.tile.events.TileEventType;
import appeng.tile.grid.AENetworkTile;
import appeng.util.Platform;
public class TileQuartzGrowthAccelerator extends AENetworkTile implements IPowerChannelState
public class TileQuartzGrowthAccelerator extends AENetworkTile implements IPowerChannelState, ICrystalGrowthAccelerator
{
public boolean hasPower = false;