Fix for name format. Closes #1258

This commit is contained in:
drcrazy 2017-09-01 18:40:33 +03:00
parent 207ac79b77
commit 021a6b0077
2 changed files with 17 additions and 1 deletions

View file

@ -77,6 +77,10 @@ public class BlockStorage2 extends BaseBlock {
}
throw new InvalidParameterException("The storage block " + name + " could not be found.");
}
public static ItemStack getStorageBlockByName(String name) {
return getStorageBlockByName(name, 1);
}
@Override
public Item getItemDropped(IBlockState state, Random rand, int fortune) {

View file

@ -284,7 +284,7 @@ public class CraftingTableRecipes extends RecipeMethods {
}
static void registerCompressionRecipes() {
for (String name : ArrayUtils.addAll(BlockStorage.types, BlockStorage2.types)) {
for (String name : BlockStorage.types) {
if (OreUtil.hasIngot(name)) {
registerShaped(BlockStorage.getStorageBlockByName(name), "AAA", "AAA", "AAA", 'A',
"ingot" + StringUtils.toFirstCapital(name));
@ -293,6 +293,18 @@ public class CraftingTableRecipes extends RecipeMethods {
"gem" + StringUtils.toFirstCapital(name));
}
}
for (String block : BlockStorage2.types){
block = CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, block);
if (OreUtil.hasIngot(block)) {
registerShaped(BlockStorage2.getStorageBlockByName(block), "AAA", "AAA", "AAA", 'A',
"ingot" + StringUtils.toFirstCapital(block));
} else if (OreUtil.hasGem(block)) {
registerShaped(BlockStorage2.getStorageBlockByName(block), "AAA", "AAA", "AAA", 'A',
"gem" + StringUtils.toFirstCapital(block));
}
}
for (String name : ItemDustsSmall.types) {
if (name.equals(ModItems.META_PLACEHOLDER)) {