Fixup build script
This commit is contained in:
parent
2735d04de2
commit
8a3852513a
|
@ -27,9 +27,6 @@
|
||||||
<property environment="env" />
|
<property environment="env" />
|
||||||
<property file="build.properties" />
|
<property file="build.properties" />
|
||||||
<property name="modname" value="ironchest" />
|
<property name="modname" value="ironchest" />
|
||||||
<condition property="dev.home" value="${env.WORKSPACE}" else="${default.dev.home}">
|
|
||||||
<isset property="env.WORKSPACE" />
|
|
||||||
</condition>
|
|
||||||
<condition property="mcp.home" value="${env.WORKSPACE}/mcpworkspace" else="${default.mcp.home}">
|
<condition property="mcp.home" value="${env.WORKSPACE}/mcpworkspace" else="${default.mcp.home}">
|
||||||
<isset property="env.WORKSPACE" />
|
<isset property="env.WORKSPACE" />
|
||||||
</condition>
|
</condition>
|
||||||
|
@ -40,9 +37,7 @@
|
||||||
<property name="mcp.obfoutput.classes" location="${mcp.obfoutput}/minecraft" />
|
<property name="mcp.obfoutput.classes" location="${mcp.obfoutput}/minecraft" />
|
||||||
<property name="mcp.srcdir" location="${mcp.home}/src" />
|
<property name="mcp.srcdir" location="${mcp.home}/src" />
|
||||||
<property name="client.mcp.srcdir" location="${mcp.srcdir}/minecraft" />
|
<property name="client.mcp.srcdir" location="${mcp.srcdir}/minecraft" />
|
||||||
<property name="common.mcp.srcdir" location="${mcp.srcdir}/common" />
|
|
||||||
<property name="common.src.dir" location="${basedir}/common" />
|
<property name="common.src.dir" location="${basedir}/common" />
|
||||||
<property name="client.src.dir" location="${basedir}/client" />
|
|
||||||
<property name="deploy.dir" location="${user.home}/.minecraft/mods" />
|
<property name="deploy.dir" location="${user.home}/.minecraft/mods" />
|
||||||
<property name="resource.dir" location="${basedir}/resources" />
|
<property name="resource.dir" location="${basedir}/resources" />
|
||||||
<condition property="version.build" value="${env.BUILD_NUMBER}" else="1">
|
<condition property="version.build" value="${env.BUILD_NUMBER}" else="1">
|
||||||
|
@ -84,9 +79,6 @@
|
||||||
|
|
||||||
<target name="merge" depends="init">
|
<target name="merge" depends="init">
|
||||||
<copy todir="${client.mcp.srcdir}" overwrite="true" verbose="true">
|
<copy todir="${client.mcp.srcdir}" overwrite="true" verbose="true">
|
||||||
<fileset dir="${client.src.dir}" includes="**/*.java" />
|
|
||||||
</copy>
|
|
||||||
<copy todir="${common.mcp.srcdir}" overwrite="true" verbose="true">
|
|
||||||
<fileset dir="${common.src.dir}" includes="**/*.java" />
|
<fileset dir="${common.src.dir}" includes="**/*.java" />
|
||||||
</copy>
|
</copy>
|
||||||
</target>
|
</target>
|
||||||
|
@ -97,7 +89,7 @@
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="extract-built-jar">
|
<target name="extract-built-jar">
|
||||||
<property name="jarname" value="${modname}-universal-${version}" />
|
<property name="jarname" value="${modname}-universal-${version.minecraft}-${version}" />
|
||||||
<mkdir dir="${basedir}/target" />
|
<mkdir dir="${basedir}/target" />
|
||||||
<jar destfile="${basedir}/target/${jarname}.zip">
|
<jar destfile="${basedir}/target/${jarname}.zip">
|
||||||
<fileset dir="${mcp.obfoutput.classes}" includes="**/*.class" />
|
<fileset dir="${mcp.obfoutput.classes}" includes="**/*.class" />
|
||||||
|
@ -129,9 +121,6 @@
|
||||||
<target name="clean-source">
|
<target name="clean-source">
|
||||||
<delete verbose="true">
|
<delete verbose="true">
|
||||||
<fileset dir="${client.mcp.srcdir}">
|
<fileset dir="${client.mcp.srcdir}">
|
||||||
<present present="both" targetdir="${client.src.dir}" />
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${common.mcp.srcdir}">
|
|
||||||
<present present="both" targetdir="${common.src.dir}" />
|
<present present="both" targetdir="${common.src.dir}" />
|
||||||
</fileset>
|
</fileset>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
|
@ -13,18 +13,22 @@ import static cpw.mods.ironchest.IronChestType.IRON;
|
||||||
import static cpw.mods.ironchest.IronChestType.SILVER;
|
import static cpw.mods.ironchest.IronChestType.SILVER;
|
||||||
import static cpw.mods.ironchest.IronChestType.CRYSTAL;
|
import static cpw.mods.ironchest.IronChestType.CRYSTAL;
|
||||||
import static cpw.mods.ironchest.IronChestType.WOOD;
|
import static cpw.mods.ironchest.IronChestType.WOOD;
|
||||||
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.common.Configuration;
|
import net.minecraftforge.common.Configuration;
|
||||||
|
|
||||||
public enum ChestChangerType {
|
public enum ChestChangerType {
|
||||||
IRONGOLD(IRON, GOLD, "ironGoldUpgrade", "Iron to Gold Chest Upgrade", "mmm", "msm", "mmm"), GOLDDIAMOND(GOLD, DIAMOND, "goldDiamondUpgrade",
|
IRONGOLD(IRON, GOLD, "ironGoldUpgrade", "Iron to Gold Chest Upgrade", "mmm", "msm", "mmm"),
|
||||||
"Gold to Diamond Chest Upgrade", "GGG", "msm", "GGG"), COPPERSILVER(COPPER, SILVER, "copperSilverUpgrade", "Copper to Silver Chest Upgrade", "mmm",
|
GOLDDIAMOND(GOLD, DIAMOND, "goldDiamondUpgrade", "Gold to Diamond Chest Upgrade", "GGG", "msm", "GGG"),
|
||||||
"msm", "mmm"), SILVERGOLD(SILVER, GOLD, "silverGoldUpgrade", "Silver to Gold Chest Upgrade", "mGm", "GsG", "mGm"), COPPERIRON(COPPER, IRON,
|
COPPERSILVER(COPPER, SILVER, "copperSilverUpgrade", "Copper to Silver Chest Upgrade", "mmm", "msm", "mmm"),
|
||||||
"copperIronUpgrade", "Copper to Iron Chest Upgrade", "mGm", "GsG", "mGm"), DIAMONDCRYSTAL(DIAMOND, CRYSTAL, "diamondCrystalUpgrade",
|
SILVERGOLD(SILVER, GOLD, "silverGoldUpgrade", "Silver to Gold Chest Upgrade", "mGm", "GsG", "mGm"),
|
||||||
"Diamond to Crystal Chest Upgrade", "GGG", "GOG", "GGG"), WOODIRON(WOOD, IRON, "woodIronUpgrade", "Normal chest to Iron Chest Upgrade", "mmm",
|
COPPERIRON(COPPER, IRON, "copperIronUpgrade", "Copper to Iron Chest Upgrade", "mGm", "GsG", "mGm"),
|
||||||
"msm", "mmm"), WOODCOPPER(WOOD, COPPER, "woodCopperUpgrade", "Normal chest to Copper Chest Upgrade", "mmm", "msm", "mmm");
|
DIAMONDCRYSTAL(DIAMOND, CRYSTAL, "diamondCrystalUpgrade", "Diamond to Crystal Chest Upgrade", "GGG", "GOG", "GGG"),
|
||||||
|
WOODIRON(WOOD, IRON, "woodIronUpgrade", "Normal chest to Iron Chest Upgrade", "mmm", "msm", "mmm"),
|
||||||
|
WOODCOPPER(WOOD, COPPER, "woodCopperUpgrade", "Normal chest to Copper Chest Upgrade", "mmm", "msm", "mmm");
|
||||||
|
|
||||||
private IronChestType source;
|
private IronChestType source;
|
||||||
private IronChestType target;
|
private IronChestType target;
|
||||||
|
@ -56,6 +60,7 @@ public enum ChestChangerType {
|
||||||
{
|
{
|
||||||
int itemId = cfg.get(Configuration.CATEGORY_ITEM, itemName, id).getInt(id);
|
int itemId = cfg.get(Configuration.CATEGORY_ITEM, itemName, id).getInt(id);
|
||||||
item = new ItemChestChanger(itemId, this);
|
item = new ItemChestChanger(itemId, this);
|
||||||
|
GameRegistry.registerItem(item, itemName);
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,8 @@ import cpw.mods.fml.common.network.NetworkRegistry;
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||||
|
|
||||||
@Mod(modid = "IronChest", name = "Iron Chests", dependencies = "required-after:Forge@[6.0,)")
|
@Mod(modid = "IronChest", name = "Iron Chests", dependencies = "required-after:Forge@[6.5,)")
|
||||||
@NetworkMod(channels = { "IronChest" }, versionBounds = "[4.2,)", clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class)
|
@NetworkMod(channels = { "IronChest" }, versionBounds = "[4.5,)", clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class)
|
||||||
public class IronChest {
|
public class IronChest {
|
||||||
public static BlockIronChest ironChestBlock;
|
public static BlockIronChest ironChestBlock;
|
||||||
@SidedProxy(clientSide = "cpw.mods.ironchest.client.ClientProxy", serverSide = "cpw.mods.ironchest.CommonProxy")
|
@SidedProxy(clientSide = "cpw.mods.ironchest.client.ClientProxy", serverSide = "cpw.mods.ironchest.CommonProxy")
|
||||||
|
@ -51,8 +51,8 @@ public class IronChest {
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
cfg.load();
|
cfg.load();
|
||||||
blockId = cfg.get(Configuration.CATEGORY_BLOCK, "ironChests", 181).getInt(181);
|
blockId = cfg.getBlock("ironChests", 975).getInt(975);
|
||||||
ChestChangerType.buildItems(cfg, 29501);
|
ChestChangerType.buildItems(cfg, 19501);
|
||||||
CACHE_RENDER = cfg.get(Configuration.CATEGORY_GENERAL, "cacheRenderingInformation", true).getBoolean(true);
|
CACHE_RENDER = cfg.get(Configuration.CATEGORY_GENERAL, "cacheRenderingInformation", true).getBoolean(true);
|
||||||
OCELOTS_SITONCHESTS = cfg.get(Configuration.CATEGORY_GENERAL, "ocelotsSitOnChests", true).getBoolean(true);
|
OCELOTS_SITONCHESTS = cfg.get(Configuration.CATEGORY_GENERAL, "ocelotsSitOnChests", true).getBoolean(true);
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,7 @@ public class IronChest {
|
||||||
public void load(FMLInitializationEvent evt)
|
public void load(FMLInitializationEvent evt)
|
||||||
{
|
{
|
||||||
ironChestBlock = new BlockIronChest(blockId);
|
ironChestBlock = new BlockIronChest(blockId);
|
||||||
GameRegistry.registerBlock(ironChestBlock, ItemIronChest.class);
|
GameRegistry.registerBlock(ironChestBlock, ItemIronChest.class, "BlockIronChest");
|
||||||
for (IronChestType typ : IronChestType.values())
|
for (IronChestType typ : IronChestType.values())
|
||||||
{
|
{
|
||||||
GameRegistry.registerTileEntity(typ.clazz, typ.name());
|
GameRegistry.registerTileEntity(typ.clazz, typ.name());
|
||||||
|
|
|
@ -22,13 +22,13 @@ import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||||
|
|
||||||
public enum IronChestType {
|
public enum IronChestType {
|
||||||
IRON(54, 9, true, "Iron Chest", "ironchest.png", 0, Arrays.asList("ingotIron", "ingotRefinedIron"), TileEntityIronChest.class, "mmmmPmmmm", "mGmG3GmGm"), GOLD(
|
IRON(54, 9, true, "Iron Chest", "ironchest.png", 0, Arrays.asList("ingotIron", "ingotRefinedIron"), TileEntityIronChest.class, "mmmmPmmmm", "mGmG3GmGm"),
|
||||||
81, 9, true, "Gold Chest", "goldchest.png", 1, Arrays.asList("ingotGold"), TileEntityGoldChest.class, "mmmmPmmmm", "mGmG4GmGm"), DIAMOND(108, 12,
|
GOLD(81, 9, true, "Gold Chest", "goldchest.png", 1, Arrays.asList("ingotGold"), TileEntityGoldChest.class, "mmmmPmmmm", "mGmG4GmGm"),
|
||||||
true, "Diamond Chest", "diamondchest.png", 2, Arrays.asList("gemDiamond"), TileEntityDiamondChest.class, "GGGmPmGGG", "GGGG4Gmmm"), COPPER(45, 9,
|
DIAMOND(108, 12, true, "Diamond Chest", "diamondchest.png", 2, Arrays.asList("gemDiamond"), TileEntityDiamondChest.class, "GGGmPmGGG", "GGGG4Gmmm"),
|
||||||
false, "Copper Chest", "copperchest.png", 3, Arrays.asList("ingotCopper"), TileEntityCopperChest.class, "mmmmCmmmm"), SILVER(72, 9, false,
|
COPPER(45, 9, false, "Copper Chest", "copperchest.png", 3, Arrays.asList("ingotCopper"), TileEntityCopperChest.class, "mmmmCmmmm"),
|
||||||
"Silver Chest", "silverchest.png", 4, Arrays.asList("ingotSilver"), TileEntitySilverChest.class, "mmmm3mmmm", "mGmG0GmGm"), CRYSTAL(108, 12, true,
|
SILVER(72, 9, false, "Silver Chest", "silverchest.png", 4, Arrays.asList("ingotSilver"), TileEntitySilverChest.class, "mmmm3mmmm", "mGmG0GmGm"),
|
||||||
"Crystal Chest", "crystalchest.png", 5, Arrays.asList("blockGlass"), TileEntityCrystalChest.class, "GGGGPGGGG"), WOOD(0, 0, false, "", "", -1,
|
CRYSTAL(108, 12, true, "Crystal Chest", "crystalchest.png", 5, Arrays.asList("blockGlass"), TileEntityCrystalChest.class, "GGGGPGGGG"),
|
||||||
Arrays.asList("blockPlanks"), null);
|
WOOD(0, 0, false, "", "", -1, Arrays.asList("blockPlanks"), null);
|
||||||
int size;
|
int size;
|
||||||
private int rowLength;
|
private int rowLength;
|
||||||
public String friendlyName;
|
public String friendlyName;
|
||||||
|
@ -112,16 +112,10 @@ public enum IronChestType {
|
||||||
for (String mat : type.matList)
|
for (String mat : type.matList)
|
||||||
{
|
{
|
||||||
mainMaterial = translateOreName(mat);
|
mainMaterial = translateOreName(mat);
|
||||||
addRecipe(new ItemStack(blockResult, 1, type.ordinal()), recipeSplit, 'm', mainMaterial, 'P', previousTier, /*
|
addRecipe(new ItemStack(blockResult, 1, type.ordinal()), recipeSplit,
|
||||||
* previous
|
'm', mainMaterial, 'P', previousTier, /* previous tier of chest */
|
||||||
* tier
|
'G', Block.glass, 'C', Block.chest,
|
||||||
* of
|
'0', new ItemStack(blockResult, 1, 0), /* Iron Chest */
|
||||||
* chest
|
|
||||||
*/
|
|
||||||
'G', Block.glass, 'C', Block.chest, '0', new ItemStack(blockResult, 1, 0), /*
|
|
||||||
* Iron
|
|
||||||
* Chest
|
|
||||||
*/
|
|
||||||
'1', new ItemStack(blockResult, 1, 1), /* Gold Chest */
|
'1', new ItemStack(blockResult, 1, 1), /* Gold Chest */
|
||||||
'2', new ItemStack(blockResult, 1, 1), /* Diamond Chest */
|
'2', new ItemStack(blockResult, 1, 1), /* Diamond Chest */
|
||||||
'3', new ItemStack(blockResult, 1, 3), /* Copper Chest */
|
'3', new ItemStack(blockResult, 1, 3), /* Copper Chest */
|
||||||
|
|
Loading…
Reference in New Issue