neaten up code, document the purpose of the 2 registration methods

This commit is contained in:
progwml6 committed 2013-10-01 02:37:32 -04:00
1 parent 5a75f66e3f
commit 2b48c2fe88
2 files changed
+6 -9

No files matched your search

@@ -25,15 +25,12 @@ public class ForgeMultiPart
try
{
FMLLog.fine("ForgeMultipart detected. Registering TConstruct decorative blocks with FMP.");
//register blocks without metadata here
RegisterWithFMP.registerBlock(TContent.clearGlass);
//register blocks w/ metadata here
RegisterWithFMP.registerBlock(TContent.stainedGlassClear, 0, 15);
RegisterWithFMP.registerBlock(TContent.multiBrick, 0,13);
RegisterWithFMP.registerBlock(TContent.multiBrick, 0, 13);
RegisterWithFMP.registerBlock(TContent.metalBlock, 0, 10);
RegisterWithFMP.registerBlock(TContent.multiBrickFancy, 0, 15);
}
catch (Exception e)
{
@@ -6,19 +6,19 @@ import codechicken.microblock.MicroMaterialRegistry;
public class RegisterWithFMP
{
//For blocks with metadata values only
public static void registerBlock (Block block, int metastart, int metaend)
{
// meta = number 0->15
for (int meta = metastart; meta <= metaend; meta++)
{
String identifier = new String(block.getUnlocalizedName());
MicroMaterialRegistry.registerMaterial(new BlockMicroMaterial(block, meta), identifier + meta);
String identifier = new String(block.getUnlocalizedName());
MicroMaterialRegistry.registerMaterial(new BlockMicroMaterial(block, meta), identifier + meta);
}
}
//For blocks without metadata values only.
public static void registerBlock (Block block)
{
String identifier = new String(block.getUnlocalizedName());
new String(block.getUnlocalizedName());
BlockMicroMaterial.createAndRegister(block);
}
}