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