Show only Export Bus on Crafting Card instead of Import/Exprot Bus.
This commit is contained in:
@@ -107,7 +107,7 @@ public class ItemMultiMaterial extends AEBaseItem implements IStorageComponent,
|
||||
if ( j.getKey().getItem() instanceof IItemGroup )
|
||||
{
|
||||
IItemGroup ig = (IItemGroup) j.getKey().getItem();
|
||||
String str = ig.getUnlocalizedGroupName( j.getKey() );
|
||||
String str = ig.getUnlocalizedGroupName( u.getSupported().keySet(), j.getKey() );
|
||||
if ( str != null )
|
||||
name = Platform.gui_localize( str ) + (limit > 1 ? " (" + limit + ")" : "");
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import java.util.EnumSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
@@ -226,15 +227,37 @@ public class ItemMultiPart extends AEBaseItem implements IPartItem, IItemGroup
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedGroupName(ItemStack is)
|
||||
public String getUnlocalizedGroupName(Set<ItemStack> others, ItemStack is)
|
||||
{
|
||||
switch (getTypeByStack( is ))
|
||||
boolean importBus = false, exportBus = false, group = false;
|
||||
|
||||
PartType u = getTypeByStack( is );
|
||||
|
||||
for (ItemStack stack : others)
|
||||
{
|
||||
case ImportBus:
|
||||
case ExportBus:
|
||||
return GuiText.IOBuses.getUnlocalized();
|
||||
default:
|
||||
if ( stack.getItem() == this )
|
||||
{
|
||||
PartType pt = getTypeByStack( stack );
|
||||
switch (pt)
|
||||
{
|
||||
case ImportBus:
|
||||
importBus = true;
|
||||
if ( u == pt )
|
||||
group = true;
|
||||
break;
|
||||
case ExportBus:
|
||||
exportBus = true;
|
||||
if ( u == pt )
|
||||
group = true;
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( group && importBus && exportBus )
|
||||
return GuiText.IOBuses.getUnlocalized();
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package appeng.items.storage;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
@@ -167,7 +168,7 @@ public class ItemBasicStorageCell extends AEBaseItem implements IStorageCell, II
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedGroupName(ItemStack is)
|
||||
public String getUnlocalizedGroupName(Set<ItemStack> others, ItemStack is)
|
||||
{
|
||||
return GuiText.StorageCells.getUnlocalized();
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.util.Collections;
|
||||
import java.util.EnumSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockDispenser;
|
||||
@@ -316,7 +317,7 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedGroupName(ItemStack is)
|
||||
public String getUnlocalizedGroupName(Set<ItemStack> others, ItemStack is)
|
||||
{
|
||||
return GuiText.StorageCells.getUnlocalized();
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package appeng.items.tools.powered;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
@@ -133,7 +134,7 @@ public class ToolPortableCell extends AEBasePoweredItem implements IStorageCell,
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedGroupName(ItemStack is)
|
||||
public String getUnlocalizedGroupName(Set<ItemStack> others, ItemStack is)
|
||||
{
|
||||
return GuiText.StorageCells.getUnlocalized();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user