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