Skip to content

Commit

Permalink
clean up formatting, tweak build.xml more
Browse files Browse the repository at this point in the history
  • Loading branch information
progwml6 committed Oct 1, 2013
1 parent d791b11 commit 2bc58d4
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 22 deletions.
15 changes: 13 additions & 2 deletions build.xml
Expand Up @@ -19,8 +19,9 @@

<property name="mc.version" value="1.6.4"/>
<property name="forge.version" value="9.11.0.880"/>

<!-- FMP stuff - copied from projectred w/ CB's permission -->
<property name="build.dependencies.file" value="${build.dir}/dependencies.properties" />
<property name="ccl.version" value="1.0.0.36" />
<property name="fmp.version" value="1.0.0.182" />
<property name="ccl.name" value="CodeChickenLib-dev-${mc.version}-${ccl.version}.jar" />
Expand Down Expand Up @@ -71,6 +72,11 @@
<echo message="Installing CodeChickenLib" />
<copy file="${download.dir}/${ccl.name}" todir="${mcp.dir}/lib" />

<echo message="Updating build.dependencies" />
<propertyfile file="${build.dependencies.file}">
<entry key="ccl" value="${ccl.version}" />
<entry key="ccl.name" value="${ccl.name}" />
</propertyfile>
</target>
<target name="install-fmp" depends="setup,download-fmp" unless="fmp-installed">
<echo message="Deleting old ForgeMultipart" />
Expand All @@ -79,6 +85,11 @@
<echo message="Installing ForgeMultipart" />
<copy file="${download.dir}/${fmp.name}" todir="${mcp.dir}/lib" />

<echo message="Updating build.dependencies" />
<propertyfile file="${build.dependencies.file}">
<entry key="fmp" value="${fmp.version}" />
<entry key="fmp.name" value="${fmp.name}" />
</propertyfile>
</target>
<target name="install-deps" depends="install-ccl,install-fmp" />

Expand Down Expand Up @@ -197,7 +208,7 @@
<copy todir="${classes.dir}">
<fileset dir="${mcp.dir}/reobf/minecraft"/>
</copy>

<!-- Copy resources -->
<copy todir="${classes.dir}" outputencoding="UTF-8">
<fileset dir="${classes.dir}">
Expand Down
24 changes: 11 additions & 13 deletions src/tconstruct/plugins/fmp/ForgeMultiPart.java
@@ -1,19 +1,18 @@
package tconstruct.plugins.fmp;


import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import cpw.mods.fml.common.*;
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;
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 {
public class ForgeMultiPart
{
@EventHandler
public static void load (FMLInitializationEvent ev)
{
Expand All @@ -30,13 +29,13 @@ public static void load (FMLInitializationEvent ev)
RegisterWithFMP.registerBlock(TContent.clearGlass);
RegisterWithFMP.registerBlock(TContent.searedBlock);
//register blocks w/ metadata here
for (int x =0;x<=15;x++)
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.multiBrick, x);
RegisterWithFMP.registerBlock(TContent.metalBlock, x);
RegisterWithFMP.registerBlock(TContent.multiBrickFancy, x);

}

}
Expand All @@ -45,6 +44,5 @@ public static void load (FMLInitializationEvent ev)
e.printStackTrace();
}
}


}
16 changes: 9 additions & 7 deletions src/tconstruct/plugins/fmp/register/RegisterWithFMP.java
Expand Up @@ -4,22 +4,24 @@
import codechicken.microblock.BlockMicroMaterial;
import codechicken.microblock.MicroMaterialRegistry;

public class RegisterWithFMP {
public static void registerBlock (Block block,int meta)
public class RegisterWithFMP
{
public static void registerBlock (Block block, int meta)
{
// meta = number 0->15
String identifier = new String( block.getUnlocalizedName());
String identifier = new String(block.getUnlocalizedName());
MicroMaterialRegistry.registerMaterial(new BlockMicroMaterial(block, meta), identifier + meta);
// BlockMicroMaterial.createAndRegister(block);
// BlockMicroMaterial.createAndRegister(block);

//MicroMaterialRegistry.registerMaterial((IMicroMaterial) block.blockMaterial, "tinkers:" + identifier + meta);
}
public static void registerBlock (Block block )

public static void registerBlock (Block block)
{
//s = string identifier for meta ex: brick...
//MicroMaterialRegistry.registerMaterial(material, s + meta);
String identifier = new String( block.getUnlocalizedName());
String identifier = new String(block.getUnlocalizedName());

//MicroMaterialRegistry.registerMaterial(new BlockMicroMaterial(block, 0), identifier );

//MicroMaterialRegistry.registerMaterial((IMicroMaterial) block.blockMaterial,"tinkers:" + identifier);
Expand Down

0 comments on commit 2bc58d4

Please sign in to comment.