Major packet work, I think it's done. 34 errors to go!

This commit is contained in:
Aidan C. Brady committed 2014-06-02 17:33:19 +02:00
1 parent 659b963af6
commit 1933723b52
41 files changed
+638 -886

No files matched your search

+2 -10
View File
@@ -12,9 +12,6 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraft.world.chunk.Chunk;
import net.minecraftforge.common.util.ForgeDirection;
import com.google.common.io.ByteArrayDataInput;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
/**
@@ -175,22 +172,17 @@ public class Coord4D
* @param data - tag compound to read from
* @return the Coord4D from the tag compound
*/
public static Coord4D read(ByteBuf data)
{
return new Coord4D(data.readInt(), data.readInt(), data.readInt(), data.readInt());
}
public static Coord4D read(NBTTagCompound tag)
{
return new Coord4D(tag.getInteger("x"), tag.getInteger("y"), tag.getInteger("z"), tag.getInteger("id"));
}
/**
* Returns a new Coord4D from a ByteArrayDataInput.
* Returns a new Coord4D from a ByteBuf.
* @param dataStream - data input to read from
* @return the Coord4D from the data input
*/
public static Coord4D read(ByteArrayDataInput dataStream)
public static Coord4D read(ByteBuf dataStream)
{
return new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
}