use of net.mcft.copy.betterstorage.tile.ContainerMaterial in project BetterStorage by copygirl.
the class ItemLockable method getItemStackDisplayName.
@Override
public String getItemStackDisplayName(ItemStack stack) {
if (!((TileLockable) Block.getBlockFromItem(stack.getItem())).hasMaterial())
return super.getItemStackDisplayName(stack);
ContainerMaterial material = ContainerMaterial.getMaterial(stack, ContainerMaterial.iron);
String name = StatCollector.translateToLocal(getUnlocalizedName(stack) + ".name.full");
String materialName = StatCollector.translateToLocal("material." + Constants.modId + "." + material.name);
return name.replace("%MATERIAL%", materialName);
}
use of net.mcft.copy.betterstorage.tile.ContainerMaterial in project BetterStorage by copygirl.
the class Recipes method addTileRecipes.
private static void addTileRecipes() {
// Crate recipe
if (BetterStorageTiles.crate != null)
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BetterStorageTiles.crate), "o/o", "/ /", "o/o", 'o', "plankWood", '/', "stickWood"));
// Reinforced chest recipes
if (BetterStorageTiles.reinforcedChest != null)
for (ContainerMaterial material : ContainerMaterial.getMaterials()) {
IRecipe recipe = material.getReinforcedRecipe(Blocks.chest, BetterStorageTiles.reinforcedChest);
if (recipe != null)
GameRegistry.addRecipe(recipe);
}
// Locker recipe
if (BetterStorageTiles.locker != null) {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BetterStorageTiles.locker), "ooo", "o |", "ooo", 'o', "plankWood", '|', Blocks.trapdoor));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BetterStorageTiles.locker), "ooo", "| o", "ooo", 'o', "plankWood", '|', Blocks.trapdoor));
// Reinforced locker recipes
if (BetterStorageTiles.reinforcedLocker != null)
for (ContainerMaterial material : ContainerMaterial.getMaterials()) {
IRecipe recipe = material.getReinforcedRecipe(BetterStorageTiles.locker, BetterStorageTiles.reinforcedLocker);
if (recipe != null)
GameRegistry.addRecipe(recipe);
}
}
// Armor stand recipe
if (BetterStorageTiles.armorStand != null)
GameRegistry.addShapedRecipe(new ItemStack(BetterStorageTiles.armorStand), " i ", "/i/", " s ", 's', new ItemStack(Blocks.stone_slab, 1, 0), 'i', Items.iron_ingot, '/', Items.stick);
// Backpack recipe
if (BetterStorageTiles.backpack != null)
GameRegistry.addShapedRecipe(new ItemStack(BetterStorageItems.itemBackpack), "#i#", "#O#", "###", '#', Items.leather, 'O', Blocks.wool, 'i', Items.gold_ingot);
// Cardboard box recipe
if ((BetterStorageTiles.cardboardBox != null) && (BetterStorageItems.cardboardSheet != null))
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BetterStorageTiles.cardboardBox), "ooo", "o o", "ooo", 'o', "sheetCardboard"));
// Crafting Station recipe
if (BetterStorageTiles.craftingStation != null)
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BetterStorageTiles.craftingStation), "B-B", "PTP", "WCW", 'B', Blocks.stonebrick, '-', Blocks.light_weighted_pressure_plate, 'P', Blocks.piston, 'T', Blocks.crafting_table, 'W', "plankWood", 'C', ((BetterStorageTiles.crate != null) ? BetterStorageTiles.crate : Blocks.chest)));
// Present recipe
if ((BetterStorageTiles.present != null) && (BetterStorageTiles.cardboardBox != null)) {
GameRegistry.addRecipe(new PresentRecipe());
BetterStorageCrafting.addStationRecipe(new PresentRemoveNametagRecipe());
}
// Flint Block recipe
if (BetterStorageTiles.flintBlock != null) {
GameRegistry.addShapedRecipe(new ItemStack(BetterStorageTiles.flintBlock), "ooo", "ooo", "ooo", 'o', Items.flint);
GameRegistry.addShapelessRecipe(new ItemStack(Items.flint, 9), BetterStorageTiles.flintBlock);
}
}
Aggregations