mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 19:59:55 +00:00
added in FMP plugin , tested code with and without fmp installed
This commit is contained in:
1 parent
abdd27c235
commit
df6eaf4dfc
4 files changed
+149
-4
No files matched your search
@@ -0,0 +1,50 @@
|
||||
package tconstruct.plugins.fmp;
|
||||
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import cpw.mods.fml.common.*;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.network.NetworkMod;
|
||||
import tconstruct.common.TContent;
|
||||
import tconstruct.plugins.fmp.register.RegisterWithFMP;
|
||||
|
||||
|
||||
@Mod(modid = "TConstruct|ForgeMuliPart", name = "TConstruct Compat: FMP", version = "0.1", dependencies = "after:ForgeMultipart;after:TConstruct")
|
||||
@NetworkMod(clientSideRequired = false, serverSideRequired = false)
|
||||
public class ForgeMultiPart {
|
||||
@EventHandler
|
||||
public static void load (FMLInitializationEvent ev)
|
||||
{
|
||||
if (!Loader.isModLoaded("ForgeMultipart"))
|
||||
{
|
||||
FMLLog.warning("Forgemultipart missing - TConstruct Compat: FMP not loading.");
|
||||
|
||||
return;
|
||||
}
|
||||
try
|
||||
{
|
||||
FMLLog.fine("ForgeMultipart detected. Registering TConstruct decorative blocks with FMP.");
|
||||
//register blocks without metadata here
|
||||
RegisterWithFMP.registerBlock(TContent.clearGlass);
|
||||
RegisterWithFMP.registerBlock(TContent.searedBlock);
|
||||
//register blocks w/ metadata here
|
||||
for (int x =0;x<=15;x++)
|
||||
{
|
||||
RegisterWithFMP.registerBlock(TContent.stainedGlassClear, x);
|
||||
RegisterWithFMP.registerBlock(TContent.multiBrick,x);
|
||||
RegisterWithFMP.registerBlock(TContent.metalBlock ,x);
|
||||
RegisterWithFMP.registerBlock(TContent.multiBrickFancy, x);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user