mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-21 12:42:57 +00:00
43 lines
1.5 KiB
Java
43 lines
1.5 KiB
Java
package tconstruct.plugins.fmp;
|
|
|
|
import codechicken.microblock.MicroMaterialRegistry.IMicroMaterial;
|
|
|
|
import net.minecraft.block.Block;
|
|
import codechicken.microblock.BlockMicroMaterial;
|
|
import codechicken.microblock.MicroMaterialRegistry;
|
|
|
|
public class RegisterWithFMP
|
|
{
|
|
//For blocks with metadata values only
|
|
public static void registerBlock (Block block, int metastart, int metaend)
|
|
{
|
|
for (int meta = metastart; meta <= metaend; 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)
|
|
{
|
|
BlockMicroMaterial.createAndRegister(block);
|
|
}
|
|
|
|
//For blocks with metadata values and special MicroMaterial only
|
|
public static void registerBlock (Block block, int metastart, int metaend, IMicroMaterial material)
|
|
{
|
|
for (int meta = metastart; meta <= metaend; meta++)
|
|
{
|
|
String identifier = new String(block.getUnlocalizedName());
|
|
MicroMaterialRegistry.registerMaterial(material, identifier + meta);
|
|
}
|
|
}
|
|
|
|
//For blocks without metadata values and special MicroMaterial only.
|
|
public static void registerBlock (Block block, IMicroMaterial material)
|
|
{
|
|
MicroMaterialRegistry.registerMaterial(material, new String(block.getUnlocalizedName()));
|
|
}
|
|
}
|