Initial fixup for 1.2.3 and forge 1.3.4.33 - no custom handling code yet
This commit is contained in:
parent
2ec8e30faa
commit
7ad52f475a
|
@ -4,6 +4,6 @@
|
|||
<classpathentry kind="src" path="common"/>
|
||||
<classpathentry kind="src" path="server"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/minecraft1.1-client"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/forge1.3.4.33-client"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
</description>
|
||||
|
||||
<property name="modname" value="mod_ironchests" />
|
||||
<property name="version" value="2.5" />
|
||||
<property name="mcp.home" location="/home/cpw/minecraft1dev/forge1.3.3.12" />
|
||||
<property name="version" value="3.0-alpha" />
|
||||
<property name="mcp.home" location="/home/cpw/projects/mcworkspace/forge1.3.4" />
|
||||
<property name="mcp.obfoutput" location="${mcp.home}/reobf" />
|
||||
<property name="client.mcp.obfoutput" location="${mcp.obfoutput}/minecraft" />
|
||||
<property name="server.mcp.obfoutput" location="${mcp.obfoutput}/minecraft_server" />
|
||||
|
@ -54,7 +54,9 @@
|
|||
<antcall target="clean-source">
|
||||
<param name="side" value="server" />
|
||||
</antcall>
|
||||
<exec executable="${mcp.home}/updatemd5.sh" dir="${mcp.home}" />
|
||||
<exec executable="${mcp.home}/updatemd5.sh" dir="${mcp.home}">
|
||||
<arg value="-f"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="build-client" depends="init,clean,merge-client,buildandreobfmcp">
|
||||
|
|
|
@ -30,17 +30,17 @@ public class ClientProxy extends BaseModMp implements IProxy {
|
|||
@Override
|
||||
public void registerTileEntities() {
|
||||
for (IronChestType typ : IronChestType.values()) {
|
||||
ModLoader.RegisterTileEntity(typ.clazz, typ.name(), new TileEntityIronChestRenderer());
|
||||
ModLoader.registerTileEntity(typ.clazz, typ.name(), new TileEntityIronChestRenderer());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerTranslations() {
|
||||
for (IronChestType typ : IronChestType.values()) {
|
||||
ModLoader.AddLocalization(typ.name() + ".name", typ.friendlyName);
|
||||
ModLoader.addLocalization(typ.name() + ".name", typ.friendlyName);
|
||||
}
|
||||
for (ChestChangerType typ : ChestChangerType.values()) {
|
||||
ModLoader.AddLocalization("item."+typ.itemName+".name", typ.descriptiveName);
|
||||
ModLoader.addLocalization("item."+typ.itemName+".name", typ.descriptiveName);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ public class GUIChest extends GuiContainer {
|
|||
public static void showGUI(TileEntityIronChest te, EntityPlayer player) {
|
||||
GUIChest gui=buildGUI(te.getType(),player.inventory,te);
|
||||
if (gui!=null) {
|
||||
ModLoader.OpenGUI(player, gui);
|
||||
ModLoader.openGUI(player, gui);
|
||||
} else {
|
||||
player.displayGUIChest(te);
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer {
|
|||
lidangle = 1.0F - lidangle * lidangle * lidangle;
|
||||
model.chestLid.rotateAngleX = -((lidangle * 3.141593F) / 2.0F);
|
||||
// Render the chest itself
|
||||
model.func_35402_a();
|
||||
model.renderAll();
|
||||
glDisable(32826 /* GL_RESCALE_NORMAL_EXT */);
|
||||
glPopMatrix();
|
||||
glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
@ -115,7 +115,7 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer {
|
|||
shift++;
|
||||
ICustomItemRenderer customRenderer = MinecraftForgeClient.getCustomItemRenderer(item.itemID);
|
||||
float localScale = blockScale;
|
||||
if (item.itemID < Block.blocksList.length) {
|
||||
if (item.itemID < Block.blocksList.length && Block.blocksList[item.itemID]!=null) {
|
||||
int j = Block.blocksList[item.itemID].getRenderType();
|
||||
if (j == 1 || j == 19 || j == 12 || j == 2) {
|
||||
localScale = 2 * blockScale;
|
||||
|
@ -138,13 +138,13 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer {
|
|||
bindTextureByName("/terrain.png");
|
||||
ForgeHooksClient.overrideTexture(item.getItem());
|
||||
ForgeHooksClient.renderCustomItem(customRenderer, renderBlocks, item.itemID, item.getItemDamage(), 1.0F);
|
||||
} else if (item.itemID < Block.blocksList.length && RenderBlocks.renderItemIn3d(Block.blocksList[item.itemID].getRenderType())) {
|
||||
} else if (item.itemID < Block.blocksList.length && Block.blocksList[item.itemID]!=null && RenderBlocks.renderItemIn3d(Block.blocksList[item.itemID].getRenderType())) {
|
||||
bindTextureByName("/terrain.png");
|
||||
ForgeHooksClient.overrideTexture(Block.blocksList[item.itemID]);
|
||||
renderBlocks.renderBlockAsItem(Block.blocksList[item.itemID], item.getItemDamage(), 1.0F);
|
||||
} else {
|
||||
int i = item.getIconIndex();
|
||||
if (item.itemID >= Block.blocksList.length) {
|
||||
if (item.itemID >= Block.blocksList.length || Block.blocksList[item.itemID]==null) {
|
||||
bindTextureByName("/gui/items.png");
|
||||
ForgeHooksClient.overrideTexture(Item.itemsList[item.itemID]);
|
||||
} else {
|
||||
|
|
|
@ -95,7 +95,7 @@ public enum IronChestType {
|
|||
}
|
||||
|
||||
public static void addRecipe(ItemStack is, Object... parts) {
|
||||
ModLoader.AddRecipe(is, parts);
|
||||
ModLoader.addRecipe(is, parts);
|
||||
}
|
||||
|
||||
public int getGUI() {
|
||||
|
|
|
@ -361,4 +361,18 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public ItemStack func_48081_b(int par1)
|
||||
{
|
||||
if (this.chestContents[par1] != null)
|
||||
{
|
||||
ItemStack var2 = this.chestContents[par1];
|
||||
this.chestContents[par1] = null;
|
||||
return var2;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ public class mod_IronChest extends BaseModMp {
|
|||
cfg.save();
|
||||
}
|
||||
|
||||
ModLoader.RegisterBlock(ironChestBlock, ItemIronChest.class);
|
||||
ModLoader.registerBlock(ironChestBlock, ItemIronChest.class);
|
||||
MinecraftForge.registerOreHandler(new IOreHandler() {
|
||||
@Override
|
||||
public void registerOre(String oreClass, ItemStack ore) {
|
||||
|
|
|
@ -61,12 +61,12 @@ public class ServerProxy implements IProxy {
|
|||
|
||||
@Override
|
||||
public Packet getDescriptionPacket(TileEntityIronChest tile) {
|
||||
return ModLoaderMp.GetTileEntityPacket(ModLoaderMp.GetModInstance(mod_IronChest.class), tile.xCoord, tile.yCoord, tile.zCoord, tile.getType().ordinal(), tile.buildIntDataList(),null,null);
|
||||
return ModLoaderMp.getTileEntityPacket(ModLoaderMp.GetModInstance(mod_IronChest.class), tile.xCoord, tile.yCoord, tile.zCoord, tile.getType().ordinal(), tile.buildIntDataList(),null,null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendTileEntityUpdate(TileEntityIronChest tile) {
|
||||
ModLoaderMp.SendTileEntityPacket(tile);
|
||||
ModLoaderMp.sendTileEntityPacket(tile);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue