Fix up stuff- cats are buggy, but i'm working on it.
This commit is contained in:
parent
8d2a21f082
commit
00b8a500d9
|
@ -114,12 +114,6 @@
|
|||
</antcall>
|
||||
</target>
|
||||
|
||||
<target name="merge-server" depends="init,clean">
|
||||
<antcall target="merge-source">
|
||||
<param name="side" value="server" />
|
||||
</antcall>
|
||||
</target>
|
||||
|
||||
<target name="merge-source">
|
||||
<side prop="merge-to" src="mcp.srcdir" side="${side}" />
|
||||
<side prop="side-from" src="src.dir" side="${side}" />
|
||||
|
@ -136,12 +130,6 @@
|
|||
</antcall>
|
||||
</target>
|
||||
|
||||
<target name="build-server" depends="init,clean,merge-server,buildandreobfmcp">
|
||||
<antcall target="extract-built-jar">
|
||||
<param name="side" value="server" />
|
||||
</antcall>
|
||||
</target>
|
||||
|
||||
<target name="extract-built-jar">
|
||||
<side prop="output" src="mcp.obfoutput" side="${side}" />
|
||||
<property name="jarname" value="${modname}-${side}-${version}" />
|
||||
|
@ -168,7 +156,7 @@
|
|||
</jar>
|
||||
</target>
|
||||
|
||||
<target name="build" depends="merge-client,merge-server,build-client,build-server" />
|
||||
<target name="build" depends="merge-client,build-client" />
|
||||
|
||||
<target name="buildandclean" depends="build">
|
||||
<antcall target="clean" />
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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<tasks.size(); i++)
|
||||
{
|
||||
EntityAITaskEntry task = tasks.get(i);
|
||||
if (task.priority == 6 && !(task.action instanceof IronChestAIOcelotSit))
|
||||
if (task.priority == 6 && (task.action instanceof EntityAIOcelotSit) && !(task.action instanceof IronChestAIOcelotSit))
|
||||
{
|
||||
task.action = new IronChestAIOcelotSit(ocelot, 0.4F);
|
||||
}
|
||||
|
|
|
@ -13,8 +13,6 @@ package cpw.mods.ironchest;
|
|||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import net.minecraft.src.EntityPlayer;
|
||||
import net.minecraft.src.IInventory;
|
||||
import net.minecraft.src.ItemStack;
|
||||
|
@ -305,7 +303,6 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
|
|||
}
|
||||
|
||||
public TileEntityIronChest applyUpgradeItem(ItemChestChanger itemChestChanger) {
|
||||
Mouse.setGrabbed(false);
|
||||
if (numUsingPlayers > 0) {
|
||||
return 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;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue