Added proper names for facades
This commit is contained in:
parent
b0a2d574f1
commit
59da220fb1
4 changed files with 27 additions and 12 deletions
|
@ -137,4 +137,10 @@ public class CoreProxy {
|
|||
|
||||
return CoreProxy.buildCraftPlayer;
|
||||
}
|
||||
|
||||
public static String getItemDisplayName(ItemStack stack){
|
||||
if (Item.itemsList[stack.itemID] == null) return "";
|
||||
|
||||
return Item.itemsList[stack.itemID].getItemDisplayName(stack);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,6 +67,7 @@ item.PipeItemsVoid=Void Transport Pipe
|
|||
item.PipeLiquidsVoid=Void Waterproof Pipe
|
||||
item.PipeItemsSandstone=Sandstone Transport Pipe
|
||||
item.PipeLiquidsSandstone=Sandstone Waterproof Pipe
|
||||
item.Facade=Facade
|
||||
tile.miningWellBlock=Mining Well
|
||||
tile.plainPipeBlock=Mining Pipe
|
||||
tile.autoWorkbenchBlock=Autocrafting Table
|
||||
|
|
|
@ -133,4 +133,8 @@ public class CoreProxy {
|
|||
return CoreProxy.buildCraftPlayer;
|
||||
}
|
||||
|
||||
public static String getItemDisplayName(ItemStack newStack) {
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import buildcraft.BuildCraftCore;
|
|||
import buildcraft.BuildCraftTransport;
|
||||
import buildcraft.api.core.Orientations;
|
||||
import buildcraft.api.recipes.AssemblyRecipe;
|
||||
import buildcraft.core.CoreProxy;
|
||||
import buildcraft.core.ItemBuildCraft;
|
||||
|
||||
import net.minecraft.src.Block;
|
||||
|
@ -29,21 +30,24 @@ public class ItemFacade extends ItemBuildCraft {
|
|||
setHasSubtypes(true);
|
||||
setMaxDamage(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemDisplayName(ItemStack itemstack) {
|
||||
String name = super.getItemDisplayName(itemstack);
|
||||
int decodedBlockId = ItemFacade.getBlockId(itemstack.getItemDamage());
|
||||
int decodedMeta = ItemFacade.getMetaData(itemstack.getItemDamage());
|
||||
ItemStack newStack = new ItemStack(decodedBlockId, 1, decodedMeta);
|
||||
if (Item.itemsList[decodedBlockId] != null){
|
||||
name += ": " + CoreProxy.getItemDisplayName(newStack);
|
||||
} else {
|
||||
name += " < BROKEN >";
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemNameIS(ItemStack itemstack) {
|
||||
|
||||
|
||||
//FIXME PROPER NAMES
|
||||
int decodedBlockId = ItemFacade.getBlockId(itemstack.getItemDamage());
|
||||
int decodedMeta = ItemFacade.getMetaData(itemstack.getItemDamage());
|
||||
|
||||
if (Block.blocksList[decodedBlockId] == null) return "<BROKEN>";
|
||||
|
||||
return "Block: " + decodedBlockId + "- Meta: " + decodedMeta;
|
||||
|
||||
|
||||
//return (new StringBuilder()).append(super.getItemName()).append(".").append(itemstack.getItemDamage()).toString();
|
||||
return "item.Facade";
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
|
|
Loading…
Reference in a new issue