Fixed EnderIO with IC2.

This commit is contained in:
brad-c committed 2013-08-14 23:20:57 +08:00
1 parent f023560470
commit cb5f833675
4 files changed
+23 -7

No files matched your search

+1 -1
View File
@@ -19,7 +19,7 @@
<property name="mc.version" value="1.6.2"/>
<property name="forge.version" value="9.10.0.828"/>
<property name="project.version" value="0.1.3"/>
<property name="project.version" value="0.1.4"/>
<property name="forge.name" value="minecraftforge-src-${mc.version}-${forge.version}.zip"/>
+1 -1
View File
@@ -49,7 +49,7 @@ import crazypants.enderio.material.ItemIndustrialBinder;
import crazypants.enderio.material.ItemYetaWrench;
import crazypants.enderio.material.MaterialRecipes;
@Mod(name = "EnderIO", modid = "EnderIO", version = "0.1.3", dependencies = "required-after:Forge@[9.10.0.800,)")
@Mod(name = "EnderIO", modid = "EnderIO", version = "0.1.4", dependencies = "required-after:Forge@[9.10.0.800,)")
@NetworkMod(clientSideRequired = true, serverSideRequired = true, channels = { "EnderIO" }, packetHandler = PacketHandler.class)
public class EnderIO {
+20 -4
View File
@@ -1,5 +1,6 @@
package crazypants.enderio;
import java.awt.Container;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
@@ -144,15 +145,30 @@ public class PacketHandler implements IPacketHandler {
int z = data.readInt();
EntityPlayerMP player = (EntityPlayerMP) p;
EntityPlayerMP proxy = createPlayerProxy(player);
net.minecraft.inventory.Container c = player.openContainer;
PlayerProxy pp = new PlayerProxy(player);
EntityPlayerMP proxy = createPlayerProxy(player, pp);
proxy.playerNetServerHandler = player.playerNetServerHandler;
proxy.inventory = player.inventory;
proxy.currentWindowId = player.currentWindowId;
proxy.inventoryContainer = player.inventoryContainer;
proxy.mcServer = player.mcServer;
proxy.openContainer = player.openContainer;
proxy.theItemInWorldManager = player.theItemInWorldManager;
proxy.worldObj = player.worldObj;
player.theItemInWorldManager.activateBlockOrUseItem(proxy, player.worldObj, null, x, y, z, 0, 0, 0, 0);
player.theItemInWorldManager.thisPlayerMP = player;
player.theItemInWorldManager.thisPlayerMP = player;
if(c != proxy.openContainer) {
player.openContainer = proxy.openContainer;
}
}
public static <T> T createPlayerProxy(EntityPlayerMP player) {
public static <T> T createPlayerProxy(EntityPlayerMP player, PlayerProxy proxy) {
Enhancer e = new Enhancer();
e.setCallback(new PlayerProxy(player));
e.setCallback(proxy);
e.setSuperclass(player.getClass());
Class<?>[] argTypes = new Class[] { MinecraftServer.class, World.class, String.class, ItemInWorldManager.class };
+1 -1
View File
@@ -3,7 +3,7 @@
"modid": "EnderIO",
"name": "Ender IO",
"description": "Compact conduits, painted things and access to your stuff through an eye of ender.",
"version": "0.1.0",
"version": "0.1.4",
"mcversion": "1.6.2",
"url": "",
"updateUrl": "",