diff --git a/IronChests2/build.xml b/IronChests2/build.xml index 8c51b2e..6eeb372 100644 --- a/IronChests2/build.xml +++ b/IronChests2/build.xml @@ -114,12 +114,6 @@ - - - - - - @@ -136,12 +130,6 @@ - - - - - - @@ -168,7 +156,7 @@ - + diff --git a/IronChests2/common/cpw/mods/ironchest/IronChest.java b/IronChests2/common/cpw/mods/ironchest/IronChest.java index 22df701..d7d2176 100644 --- a/IronChests2/common/cpw/mods/ironchest/IronChest.java +++ b/IronChests2/common/cpw/mods/ironchest/IronChest.java @@ -35,21 +35,21 @@ import cpw.mods.fml.common.registry.LanguageRegistry; public class IronChest { public static BlockIronChest ironChestBlock; - @SidedProxy(clientSide = "cpw.mods.ironchest.client.ClientProxy", serverSide = "cpw.mods.ironchest.common.CommonProxy") + @SidedProxy(clientSide = "cpw.mods.ironchest.client.ClientProxy", serverSide = "cpw.mods.ironchest.CommonProxy") public static CommonProxy proxy; @Instance public static IronChest instance; public static boolean CACHE_RENDER = true; public static boolean OCELOTS_SITONCHESTS = true; + private int blockId; @PreInit public void preInit(FMLPreInitializationEvent event) { - Configuration cfg = new Configuration(event.getSuggestedConfigurationFile()); event.getModMetadata().version = Version.fullVersionString(); + Configuration cfg = new Configuration(event.getSuggestedConfigurationFile()); try { cfg.load(); - int bId = cfg.getOrCreateBlockIdProperty("ironChests", 181).getInt(181); - ironChestBlock = new BlockIronChest(bId); + blockId = cfg.getOrCreateBlockIdProperty("ironChests", 181).getInt(181); ChestChangerType.buildItems(cfg, 29501); CACHE_RENDER = cfg.getOrCreateBooleanProperty("cacheRenderingInformation", Configuration.CATEGORY_GENERAL, true).getBoolean(true); OCELOTS_SITONCHESTS = cfg.getOrCreateBooleanProperty("ocelotsSitOnChests", Configuration.CATEGORY_GENERAL, true).getBoolean(true); @@ -62,6 +62,7 @@ public class IronChest { @Init public void load(FMLInitializationEvent evt) { + ironChestBlock = new BlockIronChest(blockId); GameRegistry.registerBlock(ironChestBlock, ItemIronChest.class); for (IronChestType typ : IronChestType.values()) { GameRegistry.registerTileEntity(typ.clazz, typ.name()); diff --git a/IronChests2/common/cpw/mods/ironchest/OcelotsSitOnChestsHandler.java b/IronChests2/common/cpw/mods/ironchest/OcelotsSitOnChestsHandler.java index 683a345..e1bffbf 100644 --- a/IronChests2/common/cpw/mods/ironchest/OcelotsSitOnChestsHandler.java +++ b/IronChests2/common/cpw/mods/ironchest/OcelotsSitOnChestsHandler.java @@ -2,6 +2,7 @@ package cpw.mods.ironchest; import java.util.List; +import net.minecraft.src.EntityAIOcelotSit; import net.minecraft.src.EntityAITaskEntry; import net.minecraft.src.EntityOcelot; import net.minecraftforge.event.ForgeSubscribe; @@ -20,7 +21,7 @@ public class OcelotsSitOnChestsHandler { for (int i=0; i 0) { return null; } diff --git a/IronChests2/server/cpw/mods/ironchest/server/ServerProxy.java b/IronChests2/server/cpw/mods/ironchest/server/ServerProxy.java deleted file mode 100644 index 9958121..0000000 --- a/IronChests2/server/cpw/mods/ironchest/server/ServerProxy.java +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest.server; - -import java.io.File; - -import net.minecraft.src.EntityItem; -import net.minecraft.src.EntityPlayer; -import net.minecraft.src.ModLoader; -import net.minecraft.src.NBTTagCompound; -import net.minecraft.src.TileEntity; -import net.minecraft.src.World; -import cpw.mods.ironchest.ContainerIronChestBase; -import cpw.mods.ironchest.IProxy; -import cpw.mods.ironchest.IronChestType; -import cpw.mods.ironchest.TileEntityIronChest; - -public class ServerProxy implements IProxy { - - @Override - public void registerRenderInformation() { - // NOOP on server - } - - @Override - public void registerTileEntities() { - for (IronChestType typ : IronChestType.values()) { - ModLoader.registerTileEntity(typ.clazz, typ.name()); - } - } - - @Override - public void registerTranslations() { - // NOOP on server - } - - @Override - public File getMinecraftDir() { - return new File("."); - } - - @Override - public void applyExtraDataToDrops(EntityItem entityitem, NBTTagCompound data) { - entityitem.item.setTagCompound(data); - } - - @Override - public boolean isRemote() { - return false; - } - - @Override - public World getCurrentWorld() { - // NOOP on server: there's lots - return null; - } - -}