Removed ISpawnHandler references.

This commit is contained in:
SirSengir 2012-08-24 13:41:16 +02:00
parent 7d3889d8df
commit 15c1ce54e0
2 changed files with 16 additions and 18 deletions

View file

@ -9,18 +9,18 @@
package buildcraft.core;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import com.google.common.io.ByteArrayDataInput;
import com.google.common.io.ByteArrayDataOutput;
import cpw.mods.fml.common.registry.IEntityAdditionalSpawnData;
import buildcraft.api.core.Position;
import net.minecraft.src.Entity;
import net.minecraft.src.NBTTagCompound;
import net.minecraft.src.World;
import net.minecraftforge.common.ISpawnHandler;
public class EntityLaser extends Entity implements ISpawnHandler {
public class EntityLaser extends Entity implements IEntityAdditionalSpawnData {
protected Position head, tail;
@ -66,8 +66,7 @@ public class EntityLaser extends Entity implements ISpawnHandler {
}
@Override
public void writeSpawnData(DataOutputStream data) throws IOException {
public void writeSpawnData(ByteArrayDataOutput data) {
data.writeDouble(head.x);
data.writeDouble(head.y);
data.writeDouble(head.z);
@ -77,13 +76,12 @@ public class EntityLaser extends Entity implements ISpawnHandler {
}
@Override
public void readSpawnData(DataInputStream data) throws IOException {
public void readSpawnData(ByteArrayDataInput data) {
head = new Position(data.readDouble(), data.readDouble(), data.readDouble());
tail = new Position(data.readDouble(), data.readDouble(), data.readDouble());
init();
}
@Override
public void onUpdate() {

View file

@ -9,15 +9,17 @@
package buildcraft.core;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import javax.management.RuntimeErrorException;
import com.google.common.io.ByteArrayDataInput;
import com.google.common.io.ByteArrayDataOutput;
import cpw.mods.fml.common.registry.IEntityAdditionalSpawnData;
import buildcraft.api.blueprints.BptSlotInfo;
import buildcraft.api.core.BuildCraftAPI;
import buildcraft.api.core.Position;
@ -27,9 +29,8 @@ import net.minecraft.src.Entity;
import net.minecraft.src.ModLoader;
import net.minecraft.src.NBTTagCompound;
import net.minecraft.src.World;
import net.minecraftforge.common.ISpawnHandler;
public class EntityRobot extends Entity implements ISpawnHandler {
public class EntityRobot extends Entity implements IEntityAdditionalSpawnData {
private Box box;
private int destX, destY, destZ;
@ -85,8 +86,7 @@ public class EntityRobot extends Entity implements ISpawnHandler {
}
@Override
public void writeSpawnData(DataOutputStream data) throws IOException {
public void writeSpawnData(ByteArrayDataOutput data) {
data.writeInt(box.xMin);
data.writeInt(box.yMin);
data.writeInt(box.zMin);
@ -96,7 +96,7 @@ public class EntityRobot extends Entity implements ISpawnHandler {
}
@Override
public void readSpawnData(DataInputStream data) throws IOException {
public void readSpawnData(ByteArrayDataInput data) {
box = new Box();
box.xMin = data.readInt();