-
Notifications
You must be signed in to change notification settings - Fork 755
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/mDiyo/TinkersConstruct
- Loading branch information
Showing
6 changed files
with
152 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package tconstruct.plugins.fmp; | ||
|
||
import tconstruct.common.TContent; | ||
import tconstruct.plugins.fmp.register.RegisterWithFMP; | ||
import cpw.mods.fml.common.FMLLog; | ||
import cpw.mods.fml.common.Loader; | ||
import cpw.mods.fml.common.Mod; | ||
import cpw.mods.fml.common.Mod.EventHandler; | ||
import cpw.mods.fml.common.event.FMLInitializationEvent; | ||
import cpw.mods.fml.common.network.NetworkMod; | ||
|
||
@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."); | ||
RegisterWithFMP.registerBlock(TContent.clearGlass); | ||
RegisterWithFMP.registerBlock(TContent.stainedGlassClear, 0, 15); | ||
RegisterWithFMP.registerBlock(TContent.multiBrick, 0, 13); | ||
RegisterWithFMP.registerBlock(TContent.metalBlock, 0, 10); | ||
RegisterWithFMP.registerBlock(TContent.multiBrickFancy, 0, 15); | ||
|
||
} | ||
catch (Exception e) | ||
{ | ||
e.printStackTrace(); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package tconstruct.plugins.fmp.register; | ||
|
||
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); | ||
} | ||
} |