Bug: #0386 - Memory Card not detect flat ME Interface

Interface parts can share Settings with bocks.
This commit is contained in:
AlgorithmX2 2014-05-01 00:41:19 -05:00
parent 9238a530bb
commit 6b87e36bb3
2 changed files with 22 additions and 1 deletions

View file

@ -19,6 +19,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.AEApi;
import appeng.api.config.Upgrades;
import appeng.api.implementations.IUpgradeableHost;
import appeng.api.implementations.items.IMemoryCard;
@ -370,7 +371,14 @@ public class AEBasePart implements IPart, IGridProxyable, IActionHost, IUpgradea
if ( memCardIS != null && useStandardMemoryCard() && memCardIS.getItem() instanceof IMemoryCard )
{
IMemoryCard memc = (IMemoryCard) memCardIS.getItem();
String name = getItemStack( PartItemStack.Network ).getUnlocalizedName();
ItemStack is = getItemStack( PartItemStack.Network );
// Blocks and parts share the same soul!
if ( AEApi.instance().parts().partInterface.sameAs( is ) )
is = AEApi.instance().blocks().blockInterface.stack( 1 );
String name = is.getUnlocalizedName();
if ( player.isSneaking() )
{

View file

@ -24,6 +24,7 @@ import appeng.api.storage.IMEMonitor;
import appeng.api.storage.IStorageMonitorable;
import appeng.api.storage.data.IAEFluidStack;
import appeng.api.storage.data.IAEItemStack;
import appeng.api.util.IConfigManager;
import appeng.client.texture.CableBusTextures;
import appeng.core.sync.GuiBridge;
import appeng.helpers.DualityInterface;
@ -223,6 +224,18 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISeg
return duality.getStorage().getInventoryStackLimit();
}
@Override
public IConfigManager getConfigManager()
{
return duality.getConfigManager();
}
@Override
public IInventory getInventoryByName(String name)
{
return duality.getInventoryByName( name );
}
@Override
public void markDirty()
{