Remove sendLaserPacket code now it's tested.

This commit is contained in:
DarkholmeTenk 2014-02-27 19:45:35 +00:00
parent 098e5f4191
commit e1d547202e

View file

@ -425,79 +425,6 @@ public class TileEntityLaser extends TileEntityAbstractLaser implements IPeriphe
return null;
}
/*
public void sendLaserPacket(Vector3 source, Vector3 dest, float r, float g, float b, int age, int energy, int radius)
{
Side side = FMLCommonHandler.instance().getEffectiveSide();
if (side == Side.SERVER)
{
ByteArrayOutputStream bos = new ByteArrayOutputStream(8);
DataOutputStream outputStream = new DataOutputStream(bos);
try
{
// Write source vector
outputStream.writeDouble(source.x);
outputStream.writeDouble(source.y);
outputStream.writeDouble(source.z);
// Write target vector
outputStream.writeDouble(dest.x);
outputStream.writeDouble(dest.y);
outputStream.writeDouble(dest.z);
// Write r, g, b of laser
outputStream.writeFloat(r);
outputStream.writeFloat(g);
outputStream.writeFloat(b);
// Write age
outputStream.writeByte(age);
// Write energy value
outputStream.writeInt(energy);
}
catch (Exception ex)
{
ex.printStackTrace();
}
Packet250CustomPayload packet = new Packet250CustomPayload();
packet.channel = "WarpDriveBeam";
packet.data = bos.toByteArray();
packet.length = bos.size();
MinecraftServer.getServer().getConfigurationManager().sendToAllNear(source.intX(), source.intY(), source.intZ(), radius, worldObj.provider.dimensionId, packet);
ByteArrayOutputStream bos2 = new ByteArrayOutputStream(8);
DataOutputStream outputStream2 = new DataOutputStream(bos2);
try
{
// Write source vector
outputStream2.writeDouble(source.x);
outputStream2.writeDouble(source.y);
outputStream2.writeDouble(source.z);
// Write target vector
outputStream2.writeDouble(dest.x);
outputStream2.writeDouble(dest.y);
outputStream2.writeDouble(dest.z);
// Write r, g, b of laser
outputStream2.writeFloat(r);
outputStream2.writeFloat(g);
outputStream2.writeFloat(b);
// Write age
outputStream2.writeByte(age);
// Write energy value
outputStream2.writeInt(energy);
}
catch (Exception ex)
{
ex.printStackTrace();
}
Packet250CustomPayload packet2 = new Packet250CustomPayload();
packet.channel = "WarpDriveBeam";
packet.data = bos.toByteArray();
packet.length = bos.size();
MinecraftServer.getServer().getConfigurationManager().sendToAllNear(dest.intX(), dest.intY(), dest.intZ(), radius, worldObj.provider.dimensionId, packet);
}
}*/
private void playSoundCorrespondsEnergy(int energy)
{